Ad Widget

Collapse

Test Trigger functions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • y00p
    Junior Member
    • Sep 2010
    • 6

    #1

    Test Trigger functions

    Hi, everyone. i appreciated any clue to test a trigger function, to do that i want to know the result returned by the function applied to the item key in "X" moment or is there a way to debug the trigger ?


    Thanks
    Regards
  • bashman
    Senior Member
    • Dec 2009
    • 432

    #2
    Take a look at:

    http://www.zabbix.com/documentation/...gger_functions
    978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

    Comment

    • y00p
      Junior Member
      • Sep 2010
      • 6

      #3
      Thanks for the the tip, i already read it, there are examples how to use the trigger but i didn't find how to test it

      i need to know the value return of the function
      specially for the functions delta, last, sum

      any advise?

      Regards

      Comment

      • bashman
        Senior Member
        • Dec 2009
        • 432

        #4
        Return value for delta can be an integer or float number, it does max()-min() for the time or the number of values you specify as parameter.

        Last can be any value (integer, float, string, text, or log), it depends on the value type of your item. It returns the item latest value.

        Sum can be an integer or float number, it adds the values within the time or value numbers you specify as parameter.
        978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

        Comment

        • y00p
          Junior Member
          • Sep 2010
          • 6

          #5
          Again thanks for reply
          but i want to know the result returned of the function
          or is there a way to see what's the last value like in the page
          "Monitoring - Last Data" for triggers function?

          THANKS

          Regards

          Comment

          • alixen
            Senior Member
            • Apr 2006
            • 474

            #6
            Hi,

            Originally posted by y00p
            is there a way to see what's the last value like in the page
            "Monitoring - Last Data" for triggers function?
            Short answer, no.
            Trigger expressions are evaluated on the fly and results are not stored anywhere.

            If you want to know the result of your trigger expression, you can create a "Calculated item" that uses the same expression as your trigger.
            Beware, syntax is slightly different for triggers and calculated items.
            You can check the manual for details : http://www.zabbix.com/documentation/...lculated_items

            Regards,
            Alixen
            http://www.alixen.fr/zabbix.html

            Comment

            • y00p
              Junior Member
              • Sep 2010
              • 6

              #7
              THANKS SO MUCH alixen

              I'm going to create the "Calculated item"

              Regards

              Comment

              Working...