Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
This is identical to the original CheckFileCount done by Bernd Mueller. I've just updated it to include performance data as well for graphing by external programs. I also did a simple change that added the checked directory in the status text.
Current Version
1.0
Last Release Date
2011-12-27
Owner
Michael Clark
Website
http://www.masergy.com
License
GPL
Compatible With
Plugin for Nagios to monitor how many files a directory contain
Written by Bernd Mueller (http://www.lisega.de/)
Change History 2011/12/27 -- Added perf data for graphing - Mike Clark, Masergy Communications, Inc (www.masergy.com)
You are free to use this script under the terms of the Gnu Public License. No guarantee - use at your own risc.
Usage: ./check_nomoffiles -d <path> -w <warn> -c <crit>
Description:
This plugin determines the number of files in a directory and compares it with the supplied thresholds.
Output:
The plugin prints the Count of Files in the directory followed by "ok" or either "warning" or "critical" if the corresponing threshold is reached.
Exit Codes 0 OK Directory Count of files checked and everything is ok 1 Warning Directory Count of files above "warning" threshold 2 Critical Directory Count of files above "critical" threshold 3 Unknown Invalid command line arguments or could not determine directory size
Example: check_numoffiles -d . -w 1000 -c 1400
121 Files in . - ok|files=121;1000;1400 (exit code 0) 1234 Files in . - warning|files=1234;1000;1400 (exit code 1) 1633 Files in . - critical|files=1633;1000;1400 (exit code 2)
You must be logged in to submit a review.
To:
From: