Search All Sites
Nagios Live WebinarsLet our experts show you how Nagios can help your organization.
Don't miss your chance to attend the 2014 Nagios World Conference, Oct 13-16th. Informative Sessions, Networking, Food and Cocktails! Visit go.nagios.com/conference/ for more information or to register.
nagios plugin to monitor directories for files older than a given # of milliseconds (java source)
Author: Sergei Haramundanis
This plugin will scan a list of directories contained in the data file specified to determine if any files in those directories have not been modified for longer than the specified target file age in milliseconds
Lines beginning with # or blank lines in the data file are ignored.
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:
 "/ftp/inbound/filename.pdf" is older than 1800000 ms
in this case the  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:
no files found older than ms
10-Nov-2006 version 1.2 update includes:
1. type checking target_file_age_ms to ensure it is a valid integer
2. returning elapsedTimeMillisecs performance data
22-May-2007 version 1.4 update includes:
1. support for check_from_time and check_to_time to control monitor timeframe (if you don't want to use this specify values 0000 and 2359)
2. report target_file_age_ms in human readable format