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

Alert when no files in directory #8

Closed kurtabersold closed 7 years ago

kurtabersold commented 7 years ago

If there are no files in the specified directory, check_newest_file_age still exits OK. Is this behavior intended? I think if there are no files it should exit UNKNOWN, but maybe I don't fully understand the intent of this plugin.

Sample output:

$ ./check_newest_file_age -d /tmp/test
OK: 1/1 -- /tmp/test: No files
thehunmonkgroup commented 7 years ago

Use the -W or -C args if you want different behavior in the no files case.