Ad Widget

Collapse

Monitoring disk backup file for age

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dpbaker57
    Member
    • Aug 2010
    • 33

    #1

    Monitoring disk backup file for age

    I backup to disk once each night. The files are named blah.1.tar .... blah.6.tar. I have a check to make sure that they are no smaller than 5GB. I would like to make sure that they are no older than a week. vfs.file.time returns the seconds since the epoch of the mtime. That's great but I need to now what is the value of the same counter now. If the difference is > 604800 the file is too old and someone needs to know.

    I thought about running the test just once a week but I would like to know that the backup in the wee hours of the morning failed that morning. I don't know how to set the trigger to run say at 8AM Monday morning. Having the alert trigger for Monday on Wednesday just because it is 604800 seconds since the last check, means we have likely missed 3 days of backups.

    Any suggestions?
  • roxx
    Junior Member
    • Mar 2011
    • 1

    #2
    Hello,

    try this

    vfs.file.time[blah.1.tar,modify].delta(604800)}=0

    Comment

    • mtneagle
      Junior Member
      • Oct 2011
      • 4

      #3
      vfs.file.time

      I had a daily file to monitor with 1.8.7. Probably just me, but I couldn't get fuzzytime, delta or diff to work for this. So after creating the vfs.file.time item, I created another calculated item from that and system.localtime

      item node-01.domain.com:stale.age

      last(node-01.domain.com:system.localtime)-last(node-01.domain.com:vfs.file.time[/home/mtneagle/daily-log.txt])

      the resulting item was easy to monitor with a trigger (once a day) to make sure it was not older than 25 hours

      {node-01.domain.com:stale.age.last(0)}>90000

      Comment

      Working...