Copyright (C) >2008 Marco Saglibene <oss@baseware.nl>

<check_file_count> README

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; the latest version
of the GNU General Public License is applicable.

This is a Nagios plugin which checks the number of files and/or
directories in some directory. If you want you can include
subdirectories (and -files) in the check.
It produces warnings and criticals if the count becomes too high
or too low, depending on the user input. It can also be set up
to produce a critical if the count is not equal to a given value.
If you want it can produce performance output for graphs.

This plugin can be handy for monitoring your FTP or SMB. Or just
to see whether some program is cleaning up it's logfiles and so on.

It has been tested on Nagios 3.x and PNP4Nagios 0.4.x (works with
default template or, a bit nicer, with the check_file_count
template) but because of it's simplicity should run on any version.



Place check_file_count in your Nagios plugins directory, e.g. /usr/lib/nagios/plugins/
For a detailed help for how to use the plugin, use the --help option.



Place check_file_count.php in your pnp/templates directory e.g. /usr/share/pnp/templates
The default PNP4Nagios template can also be used. It produces one graph for the total
count, one for the file count and one for the directory count. With the
check_file_count.php plugin, it will be placed in one graph, using different colors for
files and directories.


Enjoy <check_file_count>
Marco Saglibene
