Ad Widget

Collapse

trigger once a day within a time frame? Possible?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Govenor
    Junior Member
    • Dec 2009
    • 11

    #1

    trigger once a day within a time frame? Possible?

    Wasn't sure what thread this needs to be in so I am posting here too...


    I am trying to setup a few items and triggers to monitor file movement. Currently we have a process that takes a .dat file, moves it to a server, processes it, and creates a log file. That log file is what I am trying to get Zabbix to monitor and I need it to three things.

    1. Once a day the errorlog.txt should have been modified by no latter than 7am starting at 650am. If it has not been modified by 7am, to send an alert.

    I am not sure what function for the trigger I should set for it to only check once a day at this time, or if even Zabbix can do that?

    2. After this log file has been modified, and contains the words Error, Zero, or Failed in it, it needs to send an alert. I have already set the item as log[<filepathname on the host>\errorlog.txt,Error|Failed|Zero] and I dont know why but to see if the item is working i went into Monitoring>Latestdata and the item on that host says "Accessible Only as Active Check" Which I am not sure that means considering the status of it is Active, and the Type is Zabbix Agent (active), so I dont know why Zabbix isnt able to collect data on that item.

    I just dont know how to set the trigger, again, to only do this once a day?

    3. To check that .dat file that resides on that server to make sure that the file has been modified and if it process stagnant data (data that hasnt changed in 24hrs) to also alert someone that our process has (or is about to) process old data.


    Also, is there a Maximum number for the delta trigger function? If not I guess i could just set it to 86400 or so to equal one day? I know it sounds like alot, but any help would be GREATLY appreciated, for I feel myself going gray, as I type this up....

    (And yes I have been staring at the Manuel for a few hours with not help, and I am using Zabbix 1.6.8)

    Regards
  • tighep
    Senior Member
    • Dec 2007
    • 124

    #2
    You can use the .time syntax to only alert during that specified window. Here's an example:
    {host1:dr_validate. last( 0 ) }=1&{host1:dr_validate.time( 0 ) }>120000&{host1:dr_validate.time( 0 ) }<130000

    This trigger only fires between 12:00 and 13:00.

    Comment

    • Govenor
      Junior Member
      • Dec 2009
      • 11

      #3
      Good info! I will have to use that so I only get alerted during that time frame, thanks alot! I always seem to have a hard time with the syntax

      Thanks for your help!

      Comment

      • Govenor
        Junior Member
        • Dec 2009
        • 11

        #4
        Quick question, do I need to put the last(0) in there as well, or will it work with just the two time statements with a min value and max value to set the time between 630 and 830 ?

        Comment

        • Govenor
          Junior Member
          • Dec 2009
          • 11

          #5
          Tried the last but I cant use [log] with it.. i get this when updating the trigger


          # Function (last) available only for items with value types [Numeric (float),Numeric (unsigned),Character,Text]

          anything else i can use?

          Comment

          Working...