Ad Widget

Collapse

Trigger for item with long interval

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jangi
    Junior Member
    • May 2016
    • 16

    #1

    Trigger for item with long interval

    We have a custom zabbix trapper item that is for monitoring the status of a camera on an NVR. If the camera goes down (or comes back online) the NVR immediately sends a trapper message. It sends the current state of all cameras every so often, like when the service restarts.

    My issue is with defining an appropriate trigger on Zabbix to alert me when a camera is offline. I don't want alerts for momentary outages, only if the camera remains down for at least a few minutes. I've tried using min/max but the issue is this: if the camera has been online and then goes offline then min(2m) doesn't really help, since the only value within the last 2m IS the offline message that just came in.

    I think I need a more complex trigger definition but I'm having trouble coming up with the expression. I basically don't want the trigger firing for at least X minutes after the value goes to offline, but there will be only one value in the DB from that time period.
  • mauro
    Member
    • Jan 2017
    • 94

    #2
    if sometimes the online status is also sent (once a minute, or every two minutes), you can think of having a numeric-type trap: 0 offline, 1 online
    triggered the trigger when my_status_item.avg(10m)=0
    and maybe you put as an expression for the resolved:
    avg(10m)=1

    Comment

    • mauro
      Member
      • Jan 2017
      • 94

      #3
      or max(10m)=0
      and for restore:
      min(10m)=1

      Comment

      • jangi
        Junior Member
        • May 2016
        • 16

        #4
        That's the issue... the online status is not sent often. I was hoping to have a way to delay the trigger ie: myitem.max(2m)=0 AND now - myitem.lastvaluetimestamp > 2m
        I realize that second part is made up... I just wanted to illustrate the functionality I'm looking for.

        Comment

        Working...