=pod

=head1 NAME

C<check_dir> - a Nagios plugin to monitor the number of files in one or
more directories.

=head1 DESCRIPTION

check_dir is a Nagios plugin to monitor the number of files in one or
more directories.

=head1 VERSION

Version 3.0.1

=head1 SYNOPSIS

 check_dir  --dir=dirname --critical=critical --warning=warning
            [--recursive] [--verbose]
            [--version|--help]

 Mandatory arguments:
  --dir,-d        dirname    specify directory (can be repeated)
  --critical,-c   critical   specify the critical number (or range)
                             of files
  --warning,-w    warning    specify warning threshold (range) for
                             the number of files

 Options:
  --recursive,-r             perform recursive traversal
  --version,V                print version number
  --verbose,-v               be more verbose (can be repeated)

=head1 REQUIRED ARGUMENTS

--dir, --critical and --warning

=head1 OPTIONS

    --dir,-d            directory to check (mandatory, can be repeated)

    --critical,-c       critical number (or range) of files (mandatory)

    --warning,-w        warning threshold (range) for the number of
                        files (mandatory)

    --help,-h,-?        this help screen

    --recursive,-r      include subdirectories
    
    --verbose,-v        increase verbosity (can be repeated)

    --version,-V        prints version information

=head1 EXAMPLE

check_dir --dir=/tmp --dir=/var/tmp --critical=1000 --warning=800

check_dir will check if both the /tmp and /var/tmp have less than 800,
respectively 1000 files

=head1 DIAGNOSTICS

You can specify multiple --verbose options to increase the program
verbosity.

=head1 EXIT STATUS

0 if OK, 1 in case of a warning, 2 in case of a critical status and 3
in case of an unknown problem

=head1 DEPENDENCIES

check_dir depends on

=over 4

=item * English

=item * Getopt::Long

=item * Monitoring::Plugin

=item * Monitoring::Plugin::Getopt

=item * Monitoring::Plugin::Range

=item * Monitoring::Plugin::Threshold

=item * version

=back

=head1 CONFIGURATION

=head1 INCOMPATIBILITIES

None reported.

=head1 SEE ALSO

Nagios documentation

=head1 BUGS AND LIMITATIONS

No bugs have been reported.


Please report any bugs or feature requests to matteo@corti.li,
or through the web interface at https://github.com/matteocorti/check_updates/issues

=head1 AUTHOR

Matteo Corti <matteo@corti.li>

=head1 LICENSE AND COPYRIGHT

Copyright (c) 2007-2017, Matteo Corti
Copyright (c) 2007, ETH Zurich.

This module is free software; you can redistribute it and/or modify it
under the terms of GNU general public license (gpl) version 3.
See the LICENSE file for details.

=head1 DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE
TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

=head1 ACKNOWLEDGMENTS

