Nagios plugin for files/directories

1 min read


check-file is a Nagios plugin for checking simple files or files in directories by using various types of filters like file count, size, age or name match. It previously existed as check_file or check_winfile.

Examples:

check-file.exe --target c:\temp --warn 100 --critical 250
Counts all files in the directory c:\temp. Returns WARNING for more
than 100 files or CRITICAL for more than 250 files.
check_file.exe -t c:\backup\db1,c:\backup\db2 --age 24 --critical 0
Returns CRITICAL if at least one of the files c:\backup\db1 and
c:\backup\db2 is 24 hours old.
check_file.exe --target "c:\logfiles" --size 10485760 --age 720 --warning 10 --critical 50
Counts files which are not modified last 720 hours (30 days) AND are
larger than 10 MB. Returns WARNING if there are more than 10 files
meeeting the criteria, CRITICAL for more than 50 files.

Git Repo