Ad Widget

Collapse

Trigger question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Sean35
    Junior Member
    • Jan 2015
    • 19

    #1

    Trigger question

    Hi everyone,

    This isn't an Zabbix issue, it's a lack of understanding on my side and I'm hoping for some guidance.

    I have a SNMP item which I'm monitoring which will return either a 0 or a 1, both are actually acceptable values and not the sign of an issue.

    What I'm after is generating an alert when the value changes, and having it static on the dashboard for a period of time.

    The monitoring interval is 30s and I'd like the value to persist on the dashboard for 60min.

    How would I construct a trigger to achieve this?


    Many thanks,
    S
  • celso.lom
    Junior Member
    • Jan 2017
    • 2

    #2
    Use this:

    {HOSTNAME:snmp.item.last(,3600)}=0 or {HOSTNAME:snmp.item.last(,3600)}=1


    Comment

    • batchenr
      Senior Member
      • Sep 2016
      • 440

      #3
      Originally posted by Sean35
      Hi everyone,

      This isn't an Zabbix issue, it's a lack of understanding on my side and I'm hoping for some guidance.

      I have a SNMP item which I'm monitoring which will return either a 0 or a 1, both are actually acceptable values and not the sign of an issue.

      What I'm after is generating an alert when the value changes, and having it static on the dashboard for a period of time.

      The monitoring interval is 30s and I'd like the value to persist on the dashboard for 60min.

      How would I construct a trigger to achieve this?


      Many thanks,
      S

      hi,

      you can set a trigger like this :
      {ITEM.LASTVALUE} on {HOST.NAME}
      that way you'll see the item value 0 or 1
      and the trigger {hostname:ITEM.KEY.diff()}=1

      that means that if the value change it will fire a trigger.
      the time the trigger will appear depends on item Update interval
      you cant make it stay that long.

      if you want to make it stay all the time make 2 separate triggers one will fire when its 0 one will fire when its 1 so in any time you will have a trigger on the dashboard. using .last() expression

      Comment

      • Sean35
        Junior Member
        • Jan 2015
        • 19

        #4
        celso.lom - Your suggestion below didn't quite do what I needed, but it put me on the right track, thanks!

        I ended up with the following:

        Code:
        ({HOSTNAME:snmp.item.last()}=0 and {HOSTNAME:snmp.item.last(,3600)}=1)
        or
        ({HOSTNAME:snmp.item.last()}=1 and {HOSTNAME:snmp.item.last(,3600)}=0)
        batchenr - Diff wasn't sufficient as I only want the trigger to clear after a period of time, above gives me 1 hour.

        Comment

        Working...