check_iftraffic64

General

This is a 64 (and 32) bit Nagvis compatible SNMP iftraffic check. Renamed to highlight the change from 32 to 64 bit as the default counters used. Tested with Windows 2003/08/12, Linux (RedHat), and Cisco devices.

Notes

Alert: If you are having problems with results sometimes returning higher than 100% IN or OUT utilization try setting the check command to forced 32 or 64 bit mode with the --force switch. Several reviewers have posted this problem but I did not understand what was happening until Rafael van den Berg helped me see the cause, thanks Rafael. I don't know if this will resolve everyone’s issue but if Rafael is right then this should address most if not all of the over 100% utilization scenarios. By default, check_iftraffic64 auto detects between 32 and 64 bit counters, trying 64 bit first. In cases where the 64 bit SNMP query doesn't always respond (but does sometimes) you will get mixed results (64 bit results last check 32 bit next time) and your output will be nonsensical (over 100%). Setting the check to force 32 or 64 will prevent this from affecting your results negatively in those cases. See examples below for how to use the force switch.

Examples

Simple 64 bit check of interface used as the primary host interface (based on IP address of host1)

check_iftraffic64.pl -H host1 -C sneaky 

32 bit mode check of interface index 5 in bits/s with 100m bandwidth limit

check_iftraffic64.pl -H host1 -C sneaky -i 5 -B -b 100 -u m --32bit 

Check of interface using address 192.168.1.1 in bits/s running 50m down (in) and 10m up (out)

check_iftraffic64.pl -H host1 -C sneaky -A 192.168.1.1 -B -I 50 -O 10 -u m

Changelog

Check_iftraffic64 is an updated version of (check_iftraffic3) and has been changed to use 64 bit SNMP counters but can still handle 32 bit. Some math issues found in check_iftraffic3 were resolved as well.

Version .76: Thanks to Mark Rittinghaus for pointing out and recommending solutions to a couple of bugs in the perfdata. These have been addressed in this release. This release changes the units for the in_ave/out_ave perfdata from bits (if you specify bits on the command line) to Bytes and changes inAbsolut/outAbsolut from Bytes to Continuous. Both of these changes may disrupt your perfdata graphing if you use PNP4Nagios (RRD). It does not affect the in_ave_pct/out_ave_pct perfdata output.

Version .75: Thanks to Philip Ho and Fai Wong (and subsequently others) for pointing out that the inbandwidth and outbandwidth perfdata needed to be a fixed unit for rrd based processing of perfdata (PNP4Nagios). This has been fixed based on the switches used to either bits or bytes. The other bug which has plagued this plugin for a while is the nefarious and random 'Return code of 25 is out of bounds' result. This has also been fixed, again thanks to the guidance of Philip Ho .

Version .74: Thanks to the help of Rogerio Tomassoni de Araujo Junior we now have SNMPv3 support! The check can use three v3 levels (NoauthNoPriv, authNoPriv, and authpriv). You can also specify the Auth method (MD5 or SHA) and or the encryption method (DES, AES, or 3DES). Thanks Rogerio!

Version .73: Fixed a couple of bugs, they are listed in the comments at the top of the script.

Version .7: The check script now has an 64|32 bit auto detection, you can also force 64 or 32 bit on the cmd line. Added logic to handle invalid interface speed results (thanks Mathieu GRZYBEK).

Version .6: I've removed text from the output that was not necessary. Thanks Nicholas Coulin for pointing it out.

Version .5: Significant features in this check include the following:

  1. Capable of handling 32 and 64 (default) bit SNMP counters
  2. Auto detects max bandwidth (unless specified)
  3. Supports asymetric links, i.e. Ability to specify different BW limits (in and out) other than what is automatically detected. Good for Internet connections that have different up and down speeds
  4. NagVis weathermap line compatible perfdata output
  5. Returns CRITICAL status when the interface is down.