Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

checkFileAgeExec

Rating
0 votes
Favoured:
0
Hits
148332
Files:
FileDescription
checkFileAgeExec.javacheckFileAgeExec 1.1 nagios plugin
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
nagios plugin to monitor for files returned from shell commands which are older than a given # of milliseconds (java source)
nagios plugin to monitor for files returned from shell commands which are older than a given # of milliseconds

Author: Sergei Haramundanis
Date: 24-Apr-2007
Update: [1.1] 22-May-2007 by S. Haramundanis to report target_file_age_ms in human readable format

usage: java checkFileAgeExec command_filename target_file_age_ms check_from_time check_to_time

Description:

This plugin will scan files returned from commands contained in the command file specified to determine if any of
the files have not been modified for longer than the specified target file age in milliseconds

Lines beginning with # or blank lines in the command file are ignored.

Example commands:

Unix:

find /clareonProd/sched -name 'encrypted*'
find /clareonProd/sched -name 'non-encrypted*'

Windows:

C:cygwinbinfind . -name 'encrypted*'
C:cygwinbinfind . -name 'non-encrypted*'

Output:

During any run of the plugin, if it finds any files older than the specified number of milliseconds
it will return a WARNING state with the last file found prefixed by the number of files that were found
to be older as in the following example:

[WARNING] [5] "/ftp/inbound/filename.pdf" is older than 1800000 ms

in this case the [5] indicates that it found five files older than 30 minutes (1800000 ms) and
filename.pdf is the last one it found

if no files are found to be older in the directory list it will return an OK state with the message:

[OK] no files found older than ms

If the current time falls outside the specified check_from_time and check_to_time it will return on OK state with the message:

[OK] current time outside of monitoring timeframe 1600 and 1800