README
______

check_rrdtraf is a shell-script plugin for nagios to check the value in a RRD 
log file, such as those generated by MRTG. It may work with RRD files generated
by other programs as well, however it was specifically designed for MRTG Log 
files, and you are on your own if you try to use it with something else :). 
This script is based heavily on the check_rrd_bw script by Garry Cook, and he 
continues to remain involved in its development.

check_rrdtraf was modified from the check_rrd_bw script by me, Israel Brewster,
and the original author, Garry Cook, and is freely available for general use. 
I only request that you notify me of any changes you make or problems you 
encounter so I can improve the plugin for other users. 

Usage:
 check_rrdtraf -f <rrd_file> -w <warning_pair> -c <critical_pair>
           [-v][-e expire_seconds] [-l label_units]
 check_rrdtraf (-V | --version)
 check_rrdtraf (-h | --help)
 
Options:
-h, --help
        Print detaiiled help screen
-V, --version
        Print version information
-v      Verbose output. Can be specified twice for more verbosity
-vv     More verbose output, same as -v -v
-f      Full path to RRD file to read data from
-w      Warning threshold <rate> or pair <incoming>,<outgoing>
-c      Critical threshold <rate> or pair <incoming>,<outgoing>
-e      Log age threshold (in seconds, 5min=300)
-l      Data display label, one of B,K,M or G

Notes:
-Warning and critical thresholds are MAX values,
 going above the threshold will trigger an alert.
-Labels and units for warning and critical values
 are determined by the -l argument (if specified):
 B=bps; K=Kbps; M=Mbps; G=Gbps
-If the -l switch is specified, input values are assumed to
 be in the same units as specified in the -l switch
-If the -l switch is not specified, output values are scaled
 appropriately, and input values are assumed to be in Kbps

To use this script in nagios, you will need to define a new check command, such
as the following:

define command{
       command_name    check_rrdtraf
       command_line    $USER1$/check_rrdtraf -f $ARG1$ -c $ARG2$ -w $ARG3$
       }

and then use this command in your service definition. See the Nagios 
documentation for more information.

If you have any feedback on this plugin, bug reports, feature requests, money 
to throw away ;), please don't hesitate to contact the authors at:

Israel Brewster <israel@frontierflying.com>
Gary Cook <gwc@cookbros.net>
