Ad Widget

Collapse

same value line trigger detection

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Spirou
    Member
    • Jun 2016
    • 62

    #1

    same value line trigger detection

    Hi,

    i have an item "SNMP Trap" and it work well. Now i make a trigger and want check if a new line is detected in the item snmptrap but the problem is i have the same line value but ofc not the same date :

    Click image for larger version

Name:	trigger.JPG
Views:	1
Size:	25.5 KB
ID:	317629

    How to detect with functions there is a new line appear ?

    regards.
  • DmitryL
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • May 2016
    • 278

    #2
    Hello Spirou,

    Did you considered diff function?

    Checking if last and previous values differ.
    Supported value types: float, int, str, text, log
    Returns:
    1 - last and previous values differ
    0 - otherwise




    Best regards,
    Dmitry

    Comment

    • Spirou
      Member
      • Jun 2016
      • 62

      #3
      Originally posted by Dmitryb
      Hello Spirou,

      Did you considered diff function?

      Checking if last and previous values differ.
      Supported value types: float, int, str, text, log
      Returns:
      1 - last and previous values differ
      0 - otherwise




      Best regards,
      Dmitry
      Hi,

      I try with "nodata" fonction :

      {Host:snmptrap[.1.3.6.1.4.1.674.10892.2.0.2000].nodata(30)}=0

      but cant acknowledge ....

      Comment

      • Spirou
        Member
        • Jun 2016
        • 62

        #4
        The problem with "diff" fonction is it check difference between last and previous "value" and my value is the same ! the only difference is on the "TIMESTAMP" and "LOCAL TIME".

        Comment

        • DmitryL
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • May 2016
          • 278

          #5
          Yes, but your value contains timestamp.
          So the strings are different.

          Comment

          • Spirou
            Member
            • Jun 2016
            • 62

            #6
            right, i try with "diff(log)=1" and it work !
            now i must acknowledge the trigger, any idea ?

            Comment

            • DmitryL
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • May 2016
              • 278

              #7
              Could you please explain what do you meen by acknowledge trigger?

              Comment

              • Spirou
                Member
                • Jun 2016
                • 62

                #8
                ofc,

                now i have my trigger detecting new line diff(log) for my trap.
                But the trigger is always "disaster" and i dont know how to reset trigger.

                Comment

                • DmitryL
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • May 2016
                  • 278

                  #9
                  Ok, so you want to set trigger state to OK.
                  ACK is something different

                  What condition would you like to OK state?

                  Comment

                  • Spirou
                    Member
                    • Jun 2016
                    • 62

                    #10
                    yes

                    i explain you :

                    i have my trigger alert (disaster) with OID : x.x.2002
                    I want reset the x.x.2002 trigger if i have another trigger (x.x.2004) set to 1 !

                    in another term :

                    if x.x.2004 = 1 then reset x.x.2002 to 0

                    ill hope i am clear

                    regards
                    Last edited by Spirou; 16-06-2016, 13:35.

                    Comment

                    • DmitryL
                      Senior Member
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • May 2016
                      • 278

                      #11
                      Ok now i get it

                      Look in documentation

                      Under Hysteresis

                      You need one trigger, like
                      Code:
                      ({TRIGGER.VALUE}=0 and {server:item.diff(log)}=1) OR
                      ({TRIGGER.VALUE}=1 and {server2.item.diff(log)]=0)
                      This trigger will fire when your server1 item will get new value line, and go to OK state when server2 item gets new value line.
                      Last edited by DmitryL; 16-06-2016, 13:56. Reason: Edited trigger

                      Comment

                      • Spirou
                        Member
                        • Jun 2016
                        • 62

                        #12
                        Ok i see, i go check tyvm

                        Comment

                        • Spirou
                          Member
                          • Jun 2016
                          • 62

                          #13
                          I make this but seems not work :

                          {hostest:snmptrap[.1.3.6.1.4.1.674.10892.2.0.2002].diff(log)}=0 and {hostest:snmptrap[.1.3.6.1.4.1.674.10892.2.0.2004].diff(log)}=0

                          Comment

                          • Spirou
                            Member
                            • Jun 2016
                            • 62

                            #14
                            should i need to create another trigger ?

                            what does mean {TRIGGER.VALUE}=1 : is it the value of the current trigger ?

                            Comment

                            • DmitryL
                              Senior Member
                              Zabbix Certified SpecialistZabbix Certified Professional
                              • May 2016
                              • 278

                              #15
                              Try this. Whole expression is one trigger.

                              Code:
                              ({TRIGGER.VALUE}=0 and {hostest:snmptrap[.1.3.6.1.4.1.674.10892.2.0.2002].diff(log)}=0) OR
                              ({TRIGGER.VALUE}=1 and {hostest:snmptrap[.1.3.6.1.4.1.674.10892.2.0.2004].diff(log)}=0)
                              {TRIGGER.VALUE}=0 means that trigger is in OK status =1 PROBLEM

                              Comment

                              Working...