Network Connections, Stats and Bandwidth

check_iftraffic5.pl

Description:

Supports all Cisco standard interfaces: TenGigabitEthernet, GigabitEthernet, FastEthernet,
Ethernet, Port-channel, Vlan. Also works on standard NIC adaptors.
Checks input/output traffic, unicast pkts, multicast pkts, broadcast pkts, errors and discards on a single interface.
Checks Port-channel member status. Performance data formatting meets Nagios standards.

Current Version

5

Last Release Date

2012-11-13

Compatible With

  • Nagios 3.x

Owner

License

GPL


Project Files
Project Notes
check_iftraffic5.pl - Nagios(r) network traffic monitor plugin Copyright (C) 2012 Mike Pagano Based on Gerd Mueller's check_iftraffic.pl Contributions by: Adrian Wieczorek, Ektanoor, Markus Werner, Greg Frater and Richard Walraven Remarks: * Supports all Cisco standard interfaces: TenGigabitEthernet, GigabitEthernet, FastEthernet, Ethernet, Port-channel, Vlan. Also works on standard NIC adaptors. * Checks input/output traffic, unicast pkts, multicast pkts, broadcast pkts, errors and discards on a single interface. * Checks Port-channel member status by comparing port-channel speed to number. * Performance data formatting meets Nagios standards. + Provides stats for bandwidth by percentage and integer values. + Packets in/out for unicast, multicast & broadcast. + Number of in/out packet discards & errors. + Designed specifically for charting with "Splunk for Nagios". + Other reporting programs can use perfdata. IE RRD. * Checks for interface administrative and operational status up/down. Down on either returns a critical state. * Allows either textual or the numeric index value of an interface. * If the interface speed is not specified on the command line it gets it automatically from IfSpeed. * Bandwidth options allow checks of: Asymmetrical links such as a DSL line or cable modem where the download and upload speeds are different. Minimum input bandwidth useful for IPSEC tunnels. * Can determine interface to query by matching IP address of host with entry in ipAdEntIfIndex (.1.3.6.1.2.1.4.20.1.2). * Bits per second are the default now. Use -B for bytes. * RX, TX and absolute values show bytes/octets only. * SNMP version 2 as we need 64-bit counters. The 32-bit overflows too fast and too frequently. * Automatic detection of snmp overflows generates a warning state. Max value used -M. * Perl's given-where "switch" in some places. Look for the correct "use" for your version of perl. * Supports Perl 5.10 * -h displays help information to see avaliable options. Suggestions: Use -b, --bandwidth with -u, --units. This allows for simple input of interface parameters. Usage -u g=gigabits/s,m=megabits/s,k=kilobits/s,b=bits/s. Example for a 1 Gig interface: check_iftraffic42.pl -H host1 -C sneaky -i GigabitEthernet1/2 -b 1 -u g Nagios command: $USER1$/check_iftraffic42.pl -H $HOSTADDRESS$ -C $USER3$ -i $ARG1$ -b $ARG2$ -u $ARG3$ -w $ARG4$ -c $ARG5$ Example for a 2 Gig Port-channel check_iftraffic42.pl -H host1 -C sneaky -i Port-channel1 -b 2 -u g –P 2000000000 Nagios command: $USER1$/check_iftraffic42.pl -H $HOSTADDRESS$ -C $USER3$ -i $ARG1$ -b $ARG2$ -u $ARG3$ -P $ARG4$ -w $ARG5$ -c $ARG6$
Reviews (9) Add a Review
Graph not showing
by sujit_m, January 31, 2022

while using this plugin graph is showing empty with no data. could you please help with this?



nagvis
by thiccboi, February 29, 2020

Will this plugin work with nagvis? Anyone tried it out?



how about snmp v3 support
by Majed, August 31, 2015

i wanted to monitor cisco nexus 5000 but it needs snmpv3 so why not support it?



work well but needs PPS
by struiaj17, October 31, 2014

The script worked well once I created the directory for storing the cache files. The path was different in Ubuntu. Also, it would be really nice to have an option to track packets per second. A patch (check_iftraffic5-pps.pl.patch.txt) was available at one point but is now offline.



PPS
by ugenk, March 31, 2013

I've added ability to monitor not only bandwidth, but also PPS (unicast packets per second). Here is the patch: http://download.datahata.by/check_iftraffic5-pps.pl.patch.txt



help
by galid_elmouha, March 31, 2013

Hi Im using a catalyst 3550 and if i use the script true commandline i get 0 values everywhere.. AverageIn:0.00bps, AverageOut: 0.00bps,.. any ideas? tnx



event handler
by rwalraven, January 31, 2012

need help as to why the exit status is not trigger eventhandlers to run.



Needed to reverst to 32-bit for Windows
by sjorge, October 31, 2011

I had to change to the old 32-bit counters for my windows server, took me about 30 min to figure out. I added an extra switch (x) to set it to 32 when needed. Patch Below: -------------- nagios@deimos ~/test $ diff check_iftraffic42.pl check_iftraffic42.pl.original 123,126c123,128 #Older 32-bit counter: > #my $snmpIfOutOctets = '1.3.6.1.2.1.2.2.1.16'; > my $snmpIfOutOctets = '1.3.6.1.2.1.31.1.1.1.10'; 150d151 tOctets32;



64 bit counter madness
by themtz, September 30, 2011

Since the switch to 64 bit counters i am getting totally weird average values like: CRITICAL - Average IN: 3.41Tbps (170252.50%), Average OUT: 970.95Gbps (48547.45%) Total RX: 5.81TBytes, Total TX: 1.66TBytes|inUsage=170252.50%;85;98 outUsage=48547.45%;85;98 inBandwidth=3405050072654.40bps outBandwidth=970948946016.00bps inAbsolut=6384549288059 outAbsolut=1820440453052 Bandwidth=2000000000 The old version with 32 bit counters works fine, but of course it loops all the time on my fast interfaces. Any idea ? PS: Checked system is a Cisco Catalyst 4510 and several 2960



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.3 (11)
Favorites
1
Views
105,801