Ad Widget

Collapse

trigger time()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thomh
    Junior Member
    • Oct 2008
    • 1

    #1

    trigger time()

    hi

    i'm hoping someone can point out where i'm going wrong with the trigger time() function.

    i'm using the folllowing expression to monitor a process called MailStats ourtside of the hours of 00:00 & 02:00 (when the process is stopped for backups):

    {myhostroc.num[,,,MailStats].last(0)}=0 & {myhostroc.num[,,,MailStats].time(0)}>020000 & {myhostroc.num[,,,MailStats].time(0)}<000000

    but the trigger keeps paging. i''ve played around with variations on the above such as:

    {myhostroc.num[,,,MailStats].last(0)}=0 & (({myhostroc.num[,,,MailStats].time(0)}>020000)|({myhostroc.num[,,,MailStats].time(0)}<000000))

    but same result - the zabbix server seems to ignore the time function. worse, it seems that outside the period defined (00:00 - 02:00) the trigger doesn't trigger anymore.

    and of course if i remove the time functions the trigger alerts fine...

    i've also tested using a basic icmpping trigger and i get the same results so it's not specific to the proc.num function

    is there something i'm missing here to get the time function to work?

    i've tested the same expression on zabbix 1.6.5 and 1.4.2 so i'm pretty sure it's something i'm doing (or not doing).

    any help much appreciated!
  • harmonica
    Senior Member
    • Jan 2009
    • 251

    #2
    Hi,

    Try ({myhost: proc.num[,,,MailStats].last(0)}=0)&(({myhost: proc.num[,,,MailStats].time(0)}>020000)|({myhost: proc.num[,,,MailStats].time(0)}<000000))
    Last edited by harmonica; 15-09-2009, 11:22.

    Comment

    • Calimero
      Senior Member
      • Nov 2006
      • 481

      #3
      Sound weird. We use that trigger for a web scenario monitoring one of our flash media servers that is restarted everyday around 5 o'clock.

      Code:
      ({myserver:web.test.fail[FMS].min(#3)}>0)
      &
      (
          ({myserver:web.test.fail[FMS].time(0)}<045900)
          |
          ({myserver:web.test.fail[FMS].time(0)}>051500)
      )
      Or, on a single line as you would give it to zabbix:

      Code:
      ({myserver:web.test.fail[FMS].min(#3)}>0)&(({myserver:web.test.fail[FMS].time(0)}<045900)|({myserver:web.test.fail[FMS].time(0)}>051500))

      Comment

      • otheus
        Member
        • Mar 2009
        • 53

        #4
        Why are you testing for a time LESS than 0? Don't you want it < 23:59, or {item} < 235959 ?
        Last edited by otheus; 13-10-2009, 17:47.

        Comment

        • sevan
          Junior Member
          • Aug 2011
          • 11

          #5
          trigger timer

          Guys,

          would you please explain what this trigger mean:
          ({myserver:web.test.fail[FMS].min(#3)}>0)
          &
          (
          ({myserver:web.test.fail[FMS].time(0)}<045900)
          |
          ({myserver:web.test.fail[FMS].time(0)}>051500)
          )

          Comment

          Working...