Ad Widget

Collapse

Hysteresis creates flapping with .count and .last

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • siegmarb
    Junior Member
    • Nov 2014
    • 25

    #1

    Hysteresis creates flapping with .count and .last

    Dear Users,

    following trigger is causing flapping all the time and i do not see why.

    Code:
    ({TRIGGER.VALUE}=0 and {linux_ubuntu_updatestatus:system.run["/usr/lib/update-notifier/apt-check 2>&1 |cut -d\";\" -f2 "].count(#288,0,"gt")}>=288)
    or
    ({TRIGGER.VALUE}=1 and {linux_ubuntu_updatestatus:system.run["/usr/lib/update-notifier/apt-check 2>&1 |cut -d\";\" -f2 "].last()} < 1)
    What i want:

    If for the last 24 hours, the value is greater than 0, the trigger should be active.
    If the last value is smaller than 1, the trigger should be inactive.

    Any help is greatly appreciated.

    Thank you.
  • guzzijason
    Senior Member
    • Dec 2015
    • 106

    #2
    You seem to be doing the opposite of that.
    The second half of your expression is saying "if the trigger is active" (true) AND the last() value is < 1 (TRUE if value is "0"), then keep the alert active.

    The expression needs to evaluate to FALSE if you want it to reset the trigger.

    However, I think you're overcomplicating this. If your last() value is "0", then the first half of your expression should automatically evaluate to FALSE, no? In which case, you should be able to simply get rid of the entire second half of your expression, because it would be redundant.

    __Jason

    Comment

    Working...