
=pod

=head1 NAME

C<check_bandwidth> - a Nagios plugin to monitor a connection's bandwidth using iperf

=head1 DESCRIPTION

check_bandwidth is a Nagios plugin to monitor a connection's bandwidth using iperf

Note that that it requires iperf running in server mode on the connected server

=head1 VERSION

Version 0.9.6

=head1 SYNOPSIS

 check_bandwidth --host hostname
            [--iperf path]
            [--localport port] [--hostport port]
            [--verbose]
            [--version|--help]

 Mandatory arguments:
  --host,-h       hostname   check the bandwidth from localhost to 'hostname'

 Options:
  --iperf         path       path of the iperf utility
  --localport,-l  port       local port
  --hostport,-p   port       remote port
  --swap,-s                  swap down- and upstream statistics
  --version,V                print version number
  --verbose,-v               be more verbose (can be repeated)

=head1 REQUIRED ARGUMENTS

--host

=head1 OPTIONS

    --host,-h       hostname   check the bandwidth from localhost to 'hostname'

    --iperf         path       path of the iperf utility

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

    --hostport,-p   port       remote port

    --localport,-l  port       local port

    --swap,-s                  swap down- and upstream statistics

    --verbose,-v               increase verbosity (can be repeated)

    --version,-V               prints version information

=head1 EXAMPLE

check_bandwidth --iperf /opt/bin/iperf --host example.com --localport 5002 --hostport 5001

check_bandwidth check is the percentage of free memory is lower than 10% or 5% respectively
by connecting to an iperf server running on example.com at port 5001. The server will then
connect to our client to port 5002 for the test in the other direction. See the documentation
of iperf for the details.

=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_bandwidth depends on

=over 4

=item * Carp

=item * English

=item * File::Slurp

=item * Getopt::Long

=item * Monitoring::Plugin

=item * Monitoring::Plugin::Threshold

=item * Net::DNS::Resolver

=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 installation problem to <matteo@corti.li> or
open a ticket at https://github.com/matteocorti/check_bandwidth/issues

=head1 AUTHOR

Matteo Corti <matteo@corti.li>

=head1 LICENSE AND COPYRIGHT

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

