thehunmonkgroup / nagios-plugin-newest-file-age

Nagios plugin, pulls the most recently created file in each specified directory, and checks its created time against the current time.
MIT License
11 stars 10 forks source link

File age for particular file. Plugin needed. #6

Open gopalvd opened 7 years ago

gopalvd commented 7 years ago

I am running this plugin on aix machine. Donno why i am getting the below message even though i have given the time unit.

(root@XXXXXX)/etc/sensu/plugins> ./check_file_age.sh -d \"/etc/sensu/plugins\" -w 10 -c 20 -t seconds Time unit must be one of: seconds, minutes, hours, days.

Is there any plugin available to check for the file age for a particular file in a directory.

thehunmonkgroup commented 7 years ago

working fine for me with a quick test on OS X:

[hunmonk:~/git/nagios-plugin-newest-file-age] master ± ./check_newest_file_age -w 10 -c 20 -t seconds -d ~/git/nagios-plugin-newest-file-age
OK: 1/1

are you using the latest master?

also, i only officially support OS X, Linux, FreeBSD. if you provide a fix for AIX that doesn't break the others, i would consider merging it.