Ad Widget

Collapse

Trigger that Compares timestamps

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pan9
    Junior Member
    • Nov 2011
    • 3

    #1

    Trigger that Compares timestamps

    Hi Everybody

    I'm trying to create a trigger that would compare a unix timestamp with current time where the difference of the 2 cant be more than 60 sec.


    I thought i could do something like this in the expression:

    {Template_Linux:mongo.expert_queue_timestamp.last( 0)>(now()-120)}

    But that does not work !
    any ideas how to do a trigger on this one ?

    btw i have rtfm but seems at loss here and could really use some help with this one.
  • JiP
    Member
    • Nov 2011
    • 41

    #2
    try this:

    {Template_Linux:mongo.expert_queue_timestamp.last( #1)}-{Template_Linux:mongo.expert_queue_timestamp.last( #2)}<60 &
    {Template_Linux:mongo.expert_queue_timestamp.last( #2)}-{Template_Linux:mongo.expert_queue_timestamp.last( #3)}<60

    Comment

    • pan9
      Junior Member
      • Nov 2011
      • 3

      #3
      Problem solved as you gave me the clue to my mistake ;-)

      {Template_Linux:mongo.expert_queue_timestamp.last( 0)}-{Template_Linux:mongo.expert_queue_timestamp.now(0 )}<-60

      The difference is last data - now() gives a dif with a negative number so it has to be smaller than -60 to trigger.

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        or a much more simple one... fuzzytime(60)
        see trigger documentation for more detail
        Zabbix 3.0 Network Monitoring book

        Comment

        • pan9
          Junior Member
          • Nov 2011
          • 3

          #5
          Yeah i'm starting to get the more complex trigger creation format ....
          My Primary problem was understanding the format you create the trigger's in.

          Thanks a bunch for the help !!

          Comment

          Working...