Ad Widget

Collapse

Issue monitoring if file timestamp is modified

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • aic
    Member
    • Oct 2010
    • 50

    #1

    Issue monitoring if file timestamp is modified

    Hi,

    I am using Zabbix version 1.8.3 over Linux and I am in trouble to check if modified or not in the last 5 minutes.

    When I added an key like that I got an error and finally I didn't do it:

    {hostname:vfs.file.time[/file/to/mon.log.0,modify].fuzzytime(60)}=1

    So I implemented the following but I am not so sure if this is the best way to do it. Following the documentation I am not happy with the results:

    {hostname:vfs.file.time[/file/to/mon.log.0,modify].diff(0)}=0

    FYI: I dicided not to use vfs.file.chksum because most of the time the file is empty, is not like /etc/passwd...

    Maybe I just need an extra pair of eyes

    Thank you for any help!
  • frater
    Senior Member
    • Oct 2010
    • 340

    #2
    Originally posted by aic
    Hi,

    I am using Zabbix version 1.8.3 over Linux and I am in trouble to check if modified or not in the last 5 minutes.

    When I added an key like that I got an error and finally I didn't do it:

    {hostname:vfs.file.time[/file/to/mon.log.0,modify].fuzzytime(60)}=1

    So I implemented the following but I am not so sure if this is the best way to do it. Following the documentation I am not happy with the results:

    {hostname:vfs.file.time[/file/to/mon.log.0,modify].diff(0)}=0

    FYI: I dicided not to use vfs.file.chksum because most of the time the file is empty, is not like /etc/passwd...

    Maybe I just need an extra pair of eyes

    Thank you for any help!
    Isn't {hostname:vfs.file.time[/file/to/mon.log.0,modify].diff(0)}=1 doing what you want (you have 0)?
    Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

    Comment

    • aic
      Member
      • Oct 2010
      • 50

      #3
      Thanks for you reply.

      I changed 0 by 1, the file has not been modified in the last hour and there is no news about the Trigger alerting that the file was not modified in the last 5 minutes

      Comment

      • Ori0n
        Member
        • Dec 2010
        • 35

        #4
        The logic seems sound. Have you verified the actual item itself (vfs.file.time[/file/to/mon.log.0,modify]) is working as expected?


        Originally posted by aic
        I changed 0 by 1, the file has not been modified in the last hour and there is no news about the Trigger alerting that the file was not modified in the last 5 minutes

        Comment

        • frater
          Senior Member
          • Oct 2010
          • 340

          #5
          You wanted a trigger to see if the file hasn't changed...
          I didn't get that...

          If you go to 'latest data' can you see the item change?

          You have an item named "vfs.file.time[/file/to/mon.log.0,modify]" ?
          Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

          Comment

          • aic
            Member
            • Oct 2010
            • 50

            #6
            Issue monitoring if file timestamp is modified

            Checking the "Latest Data" details I can see the monitor run correctly. I am seeing this:

            Monitor Status Master 20 Sep 2011 15:55:40 1316544914

            Now I changed the interval of checking from 30 seconds to 300 second too.

            Comment

            • frater
              Senior Member
              • Oct 2010
              • 340

              #7
              If you use diff you should set the interval to 300
              Does it work now?

              If not... does this one work?

              vfs.file.time[/file/to/mon.log.0,modify].last(#1)}=vfs.file.time[/file/to/mon.log.0,modify].last(#2)}


              I'm not sure, but if I understand the manual correctly this should work when the interval is less than 300

              vfs.file.time[/file/to/mon.log.0,modify].last(0)}=vfs.file.time[/file/to/mon.log.0,modify].last(0,300)}

              I'm interested in the results
              Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

              Comment

              Working...