Ad Widget

Collapse

Help with flapping triggers - Hysteresis (3.0)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Psondag
    Junior Member
    • Oct 2016
    • 2

    #1

    Help with flapping triggers - Hysteresis (3.0)

    Hi, i'm relative new to Zabbix and installed the 3.0 VMware Virtual Appliance.
    When monitoring a queue on ESB environment i want to create the following trigger:

    My item check retrieves the number of messages in a queue.

    1) When trigger status = OK (OK = 0 messages), and 1 or more message(s) are in a queue, set trigger status to Problem and send a email.
    2) when there remains 1 message in the queue, don't send a new email, but trigger status should remain on PROBLEM.
    3) When a extra message is put in a queue (value changes from 1 to 2), send a new email

    See below my trigger:
    Code:
    ({TRIGGER.VALUE}=0 and {Sonic Productie FT2:queue.messages.Count[ctBR_CCC,BR_CCC,Gemeld_aan_Team_E-business].change()}>0)
    or 
    ({TRIGGER.VALUE}=1 and {Sonic Productie FT2:queue.messages.Count[ctBR_CCC,BR_CCC,Gemeld_aan_Team_E-business].change()}>0)
    The trigger above does not work, because it sends a OK message when there is 1 message in the queue for multiple checks (value stays 1, so no change and trigger will be set to OK)

    The trigger below also doesn't work, because i now will get a trigger each time the value stays the same (i only want a trigger generated when the amount increases)

    I need to check the 'Multiple PROBLEM events generation' option, because i want to receive multiple mails whenever the amount of errors increase and the value of the trigger should remain to "PROBLEM" (i use different email templates for PROBLEM and OK mails, so i only want to see a PROBLEM generated).

    Code:
    ({TRIGGER.VALUE}=0 and {Sonic Productie FT2:queue.messages.Count[ctBR_CCC,BR_CCC,Gemeld_aan_Team_E-business].change()}>0)
    or 
    ({TRIGGER.VALUE}=1 and {Sonic Productie FT2:queue.messages.Count[ctBR_CCC,BR_CCC,Gemeld_aan_Team_E-business].change()}=0)

    Any help on this?

    Thanks in advance!
  • guzzijason
    Senior Member
    • Dec 2015
    • 106

    #2
    I'm not sure it will work the way you want it to. A trigger value is either "0" (inactive) or "1" (active). Once a trigger is active, you can suppress notifications after the first one, but there is not a way to make it "more active" and start sending notifications again once it stopped.

    I think you might need to define separate triggers for different item thresholds that you define, and handle them independently, like one trigger if your queue size value is greater than "0", and another separate trigger if the queue size value is greater than "10" (or whatever threshold you think is appropriate), and so on. I've done similar things like this in the past.

    Otherwise, there *might* be something you can do with a custom alertscript to build in some additional logic that the trigger expression itself can't do.

    __Jason

    Comment

    Working...