=pod

=head1 NAME

C<check_traffic> - A Nagios plugin to monitor the amount of network traffic


=head1 DESCRIPTION

check_traffic is a nagios Nagios plugin to monitor the amount of network traffic

check_traffic uses the /proc/net/dev Linux entry to compute the
amount of transferred bytes from the last plugin execution (temporary
data is stored in the /tmp/check_traffic-iface file)

=head2 32 bit kernels

Since /proc/net/dev uses 32bit counters overflows are a problem
(especially on a fast interface)

 Speed           Maximum safe check period
 -----           -------------------------

 10Mbit/s        55'
 100Mbit/s       5'8"
 1GBit/s         32s

=head1 VERSION

Version 2.2.7

=head1 SYNOPSIS

 check_traffic --critical=crit --warning=warn --interface=iface --speed=speed
                  [--verbose] [--reset] [--help]

 Required arguments
  --critical,c  crit      critical range
  --warning,w   warn      warning range
  --interface,i iface     network interface
  --speed,s               speed (in Mbit/s)

 Options
  --debug,d               debugging output
  --debug_log=file        generates a log with debugging information
  --help,-h,-?            this help message
  --reset,r               initialize counter
  --version,V             print version and exit
  --verbose,v             verbose
  

=head1 REQUIRED ARGUMENTS

 --speed, --interface, --critical and --warning

=head1 OPTIONS

  --interface=name,-i name      network interface

  --critical=value,-c value     critical number of sectors/s

  --warning=value,-w value      number of sectors/s which generates a warning

  --debug,d                     debugging output

  --debug_log=file              generates a log with debugging information

  --help,-h,-?                  help message

  --reset,r                     initialize counter

  --speed=value,-s value        speed (in Mbit/s)

  --version,V                   print version and exit

  --verbose,v                   verbose output

=head1 EXAMPLE

check_traffic --warning=20971520 --critical=83886080 --interface=eth0

check_traffic checks that the number of transferred bytes on eth0 will
stay below the specified limits

=head1 DIAGNOSTICS

You can specify multiple --verbose options to increase the program
verbosity. --debug will generate even more debugging output and
--debug_log will save the debugging information to a file.

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

=over 4

=item * Carp

=item * English

=item * File::Basename

=item * Monitoring::Plugin

=item * Monitoring::Plugin::Getopt

=item * Monitoring::Plugin::Threshold

=item * Monitoring::Plugin::Range

=item * Readonly

=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 by opening an issue at
https://github.com/matteocorti/check_updates/issues

=head1 AUTHOR

Matteo Corti <matteo@corti.li>

=head1 LICENSE AND COPYRIGHT

Copyright (c) 2010-2011, ETH Zurich
Copyright (c) 2010-2016, Matteo Corti

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

