Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
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
Owner
Mike Pagano
License
GPL
Compatible With
Perl 5.10
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$
while using this plugin graph is showing empty with no data. could you please help with this?
Will this plugin work with nagvis? Anyone tried it out?
i wanted to monitor cisco nexus 5000 but it needs snmpv3 so why not support it?
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.
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
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
need help as to why the exit status is not trigger eventhandlers to run.
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;
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
At line 547 please change %.01d to %s. This should take care of it. if ( open(FILE,">".$TRAFFIC_FILE."_if".$iface_number."_".$host_address )) { printf FILE ("%s:%s:%s ", $update_time, $in_bits, $out_bits ); close(FILE); };
You must be logged in to submit a review.
To:
From:
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!