I’m simply trying to see if a field is not equal to 0, and I’m failing spectacularly, much to my frustration. This is my code:
rule “alert on rsync failures”
when
has_field(“qa_node_num”) AND to_long(“qa_node_num”) != 0
then
set_field(“alert”, “1”);
end
I thought this should be pretty simple, but I’ve now tried about 6 permutations of the ‘when’ section, and either it matches on any number including 0, or never at all. It has to be something simple I’m missing here.