Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1


Remember Me

Directory Tree


Current Version
Last Release Date
Compatible With
  • Nagios 3.x
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
1) Scan network interfaces of a Cisco Switch
2) Measure average bitrate from last measurement for all ports or one interface
3) Display peak bitrate and the port associated with it with warning and critical thresholds
4) Produce performance data for all or one interface
Expands on the SNMP commands used in "Check SNMP Cisco Traffic" plugin to discover the ports of a Cisco Device and record performance data for them.

Usage: check_snmp_cisco_ports_bandwidth -h -s -o -p -i -f -e -w -c
or: check_snmp_cisco_ports_bandwidth --help
or: check_snmp_cisco_ports_bandwidth --list-interfaces -h -s -f -e
or: check_snmp_cisco_ports_bandwidth --clear-temp-files -h -s
-h is the hostname or IP address of the Cisco device.
-s is the commuity string e.g. 'public'.
-w is the warning level in bits/sec, postfix with K,M or G as required.
-c is the critical level in bits/sec, postfix with K,M or G as required.
-o Can be b for bits/sec, K for Kbits/sec, M for Mbits/sec or G for Gbits/sec. Default b.
-p Can be b for bits/sec, K for Kbits/sec, M for Mbits/sec, G for Gbits/sec or - for no performance data. Default -.
-i The number of the interface to report. Default is all of them.
-f Interface name filter in egrep format.
-e Interface name exclude filter in egrep format.

Output is the average bitrate in and out from each port taken between now and the previous reading.
The first reading will report 'unknown' since at least two timepoints are required for an average.

21 Nov 2012 - 0.1.0 Initial Release
27 Nov 2012 - 0.1.1 Fix incorrect bandwidth calculation and previous time counter
6 Dec 2012 - 0.2.0 Interface list filtering added plus command switches to clear temp files and list interfaces
8 Dec 2012 - 0.3.0 Fixed incorrect previousOutByteCount. Removed requirement to re-run --clear-temp-files every time filters are changed
8 May 2013 - 0.3.1 performance_data() pointed to the wrong arguments in the data file (Thanks to Edgar Matzinger for reporting)
9 Mar 2015 - 0.4.0 Interface number grep updated to handle output from newer versions of snmpwalk.
03 Nov 2016 - 0.5.0 Incorporate bit rate detection bug fix from broerman. Also replace egrep with grep -E since Gnu egrep is now deprecated.
Reviews (3)
--- /usr/local/nagios/libexec-external/check_snmp_cisco_ports_bandwidth.orig 2016-01-18 11:19:52.471432283 +0100
+++ /usr/local/nagios/libexec-external/check_snmp_cisco_ports_bandwidth 2016-01-18 11:20:54.836569707 +0100
@@ -135,8 +135,8 @@

- inBitRate=$( echo "$line" | awk '{print $5}' )
- outBitRate=$( echo "$line" | awk '{print $6}' )
+ inBitRate=$( echo "$line" | awk '{print $6}' )
+ outBitRate=$( echo "$line" | awk '{print $7}' )

echo -n "Interface $interfaceNumber In=$( apply_units $inBitRate $pUnits );$( apply_units $warn $pUnits );"
echo -n "$( apply_units $crit $pUnits );0;0
byMajed, August 13, 2015
how about make it support snmpv3 instead of just the previous versions?
bydasgeek, February 25, 2013
0 of 1 people found this review helpful
Nice plugin however can you make an option for the output to be in Mb or MB instead of octets?