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
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_iftraffic4.pl

Rating
9 votes
Favoured:
2
Current Version
4.1
Last Release Date
2011-01-15
Compatible With
  • Nagios 3.x
License
GPL
Hits
110567
Files:
FileDescription
check_iftraffic4.plcheck_iftraffic4.pl
check_iftraffic41.plcheck_iftraffic41.pl
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Update to the check_iftraffic3 plug-in first released by Gerd Mueller (Netways GmbH) and updated by Markus Werner, 'sos' and Greg Frater.

Works with 64-bit SNMP counters to avoid frequent overflows on highly loaded and large interfaces (>1gbps).

Several corrections and tweaks to make the code more consistent.

In general one shall take into account that this plugin is far from perfect.

Tested on Cisco devices only.
Version 4.0.1 carries some little corrections to the output format.

Version 4.1 - Several changes, most of them to fit better an ISP environment:
- bits per second are the default now. Use -B for bytes.
- RX, TX and absolute values show bytes/octets only.
- We now use Perl's given-where "switch" in some places. Look for the correct "use" for your version of perl.

Reviews (8)
./check_iftraffic4.pl
Perl v5.12.0 required--this is only v5.8.8, stopped at ./check_iftraffic4.pl line 85.
BEGIN failed--compilation aborted at ./check_iftraffic4.pl line 85.
bywiede, August 8, 2012
Sorry, but for me it doesn't work :(

Here is the data which I got with check_iftraffic41, which looks really strange (e.g. IN with 11536.25%):
Average IN: 1.15KBs (11536.25%), Average OUT: 431.12Bs (4311.25%) Total RX: 2.15GBytes, Total TX: 2.07GBytes|inUsage=11536.25%;98;99 outUsage=4311.25%;98;99 inBandwidth=1153.62Bs outBandwidth=431.12Bs inAbsolut=2305851750 outAbsolut=2223394934

And here are the data which I got with check_iftraffic3, which looks better:
Average IN: 0Kbs (0.00%), Average OUT: 0Kbs (0.00%)Total RX: 144115734.38 Mbits, Total TX: 138962183.38 Mbits|inUsage=0.00%;85;98 outUsage=0.00%;85;98 inBandwidth=0Kbs outBandwidth=0Kbs inAbsolut=18889537536000 outAbsolut=18214051299328

\Wiede
Pretty good plugin, i had to delete the line :
#$output .= "Total RX: ".$rx.$label.", Total TX: ".$tx.$label;

Because i use this with nagiosgraph, i couldnt see any of the Average's only the Totals which were >50gb

Question: how do you lower the average time for Average IN and Average OUT? i would like to know if our bandwidth every maxes out over, say 5 minutes.
byrwalraven, January 23, 2012
Added a minnium value, because this can also happen with data that is in a tunnel and only one way traffic works
if (($in_traffic
byalfred, August 4, 2011
hoi,
the plugin works good for me on HP and cisco switches. i made a small fix for links that are unused (traffic lower than 1kbit/s) to avoid an uninitialized $prefix_x error.

after line 349:

if ( $x
Is Perl v5.12.0 really required?

Perl v5.12.0 required--this is only v5.10.1, stopped at ./check_iftraffic41.pl line 85.
BEGIN failed--compilation aborted at ./check_iftraffic41.pl line 85.
byvalleed, March 26, 2011
Hi there,

Very good job on the script btw but I think I found a bug, at least for me.

Line 535, I had to replace %.01d with %s because it was returning -1.

printf FILE ("%s:%s:%s
", $update_time, $in_bits, $out_bits );

Thank you for sharing this checker.
byVisMon, January 11, 2011
1 of 1 people found this review helpful
Hi, when i am using this string i get strange data:

--
./check_iftraffic4.pl -H 192.168.131.1 -C public -i 9/4 -r -I 10 -u g
Average IN: 3932.6325KBs (0.04%), Average OUT: 5.45477642276423bBs (0.00%) Total RX: 967.54625 Mbytes, Total TX: 0.00125 Mbytes|inUsage=0.04%;85;98 outUsage=0.00%;85;98 inBandwidth=3932.6325KBs outBandwidth=5.45477642276423bBs inAbsolut=967545705 outAbsolut=1342
--

Something does not work.

best regards,

VisMon