logical OR statement in ELK rules?

frijoli

Member
I can't figure out how this is done. I come from an industrial PLC programming background. I "sort of like" the rule programming but I am finding it a little difficult to make the transition.

Also you can't do a search for "OR" haha.

Clay
 
Duplicate rules with different conditions is the logical equivalent. It is not really a waste of space it is just cosmetic. AND conditions count as multiple rules also, so it is basically the same thing they are just doing more for you "under the hood" with AND, because the conditions are dependent on each other.

You are just a little closer to the hardware programming with the Elk vs. high level programming languages that hide this stuff...
 
And when writing your rules to account for both conditions, order can often matter! It's not uncommon for the rules to both fire when only one should; simply reversing the order can fix it.
 
And when writing your rules to account for both conditions, order can often matter! It's not uncommon for the rules to both fire when only one should; simply reversing the order can fix it.
Not sure I understand this. An OR statement has one output with multiple inputs. How can both fire?
 
I have never seen that myself. Perhaps the first to trigger is changing the conditions causing the second to fire, or is it bug? I think Spanky once said the rules are evaluated in order but it is not clear when the list is re-evaluated, if the ruleset evaluation continues after a rule is run, etc.
 
The rule orders do count when inputting them. The M1 evaluates from Rule 1, then goes down the list. If there is a condition that is met first in rule #4, then it's a modified version in #17, the first rule will fire before #17.
 
Back
Top