Ad Widget

Collapse

Alerting on file timestamp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Andrewr
    Junior Member
    • May 2011
    • 2

    #1

    Alerting on file timestamp

    Hi all,

    I've been reading and searching through the forums and haven't found what I'm looking for so I figured I'd post and see if someone knows the answer.

    I have a file that gets updated every 5 minutes and what I'd like to have is an alert happen if the time stamp on the file shows that it's older than 7 minutes.

    I've tried creating the item and then a trigger but I'm not having much luck. One of the things that I think might be an issue is the Zabbix server is in another timezone, 2 hours ahead of the server that the file resides on, so I'm wondering if this may also be causing me an issue.

    What I'm hoping is that someone can help with confirming how I should create the item and then the trigger .

    Thanks very much for your help.

    Cheers
    Andrew
  • Bennie
    Member
    Zabbix Certified Specialist
    • Feb 2010
    • 73

    #2
    Hey Andrew,

    easiest and quickest way might be this item: vfs.file.time[file,<mode>] ( manual link )

    It tells you how many seconds ago the last access/change was. Create a trigger that checks if the file last value is over your 7 minutes and you have the information you need.

    Comment

    • Andrewr
      Junior Member
      • May 2011
      • 2

      #3
      Hiya Bennie

      Thanks for the prompt response. You've made me feel better as this is what I was trying for but I am having issues with the setting up of the trigger.

      My item is set up as:

      vfs.file.time["e:/program files/cattech/profiles.dat",access>]

      and the trigger is:

      {rapwaneiw3:vfs.file.time["e:/program files/cattech/profiles.dat",access>].now(0)}>7620

      Where rapwaneiw3 is the host machine and profiles.dat is the file that gets updated constantly.

      The problem that I have is that it shows an error under the item and trigger saying Zabbix Agent is not supported. Plus it doesn't send out the email alerts as it should so I think I don't have the trigger set up correctly.

      Thanks again for the help.

      Andrew

      Comment

      • Bennie
        Member
        Zabbix Certified Specialist
        • Feb 2010
        • 73

        #4
        try different notation, its windows afterall.

        e:\program files\cattech\profiles.dat

        Comment

        Working...