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_ifutil.pl

Rating
11 votes
Favoured:
0
Current Version
v0.3b
Last Release Date
2016-10-19
Compatible With
  • Nagios 3.x
License
GPL
Hits
109612
Files:
FileDescription
nagiosgraph_network_traffic.pngexample nagiosgraph output
check_ifutil.plv0.3b
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!
Collects network interface traffic stats and calculates bandwidth utilization. (*nix only)

$ perl check_ifutil.pl

Usage: check_ifutil.pl -i -w -c [-p -b ]

-i, --interface STRING
Network interface name (example: eth0)
-w, --warning STRING
Warning interface speed level (K/M/G Bps, k/m/g bps)
If using with -p value should be in percentage (1-100)
-c, --critilcal STRING
Critical interface speed level (K/M/G Bps, k/m/g bps)
If using with -p value should be in percentage (1-100)
-p
Calculate warning and critical levels in percentage based on interface bandwidth
-b, --bandwidth STRING
Interface bandwidth value (K/M/G Bps, k/m/g bps)

Changelog:
v0.2 - Fixes 'uninitialized value' bug
Reviews (8)
byEngr.Adeel, October 18, 2016
I have configrd check_ifutil on debian jessie 8.5...it gives output of ethernet on locally but in nagios...update the old value very very slow...like...if eth tx:450KBps..and server traffic increases to 50MBps/sec...then this plugin return...only 5MBps...until i have to manually run the script on server then nagios update its value to 50MBps....plz solve this
bygerardjp, November 3, 2014
1 of 2 people found this review helpful
Seems like a cool plugin but I cant get rid of the 'unuinitialized' error:

perl ./setup/temp/check_ifutil.pl -i eth0 -w 10 -c 20 -b 10Mbps
Use of uninitialized value in string ne at ./setup/temp/check_ifutil.pl line 154.
Use of uninitialized value in string ne at ./setup/temp/check_ifutil.pl line 154.
Use of uninitialized value in string ne at ./setup/temp/check_ifutil.pl line 154.
Use of uninitialized value in string ne at ./setup/temp/check_ifutil.pl line 154.
RX Bytes:
byhchavan, June 6, 2014
Thank you so much. Was very usefull
I would like to integrate this script with nagiosgraph too. Can someone give some step by step informations.
I`m new with Nagios and Nagiosgraph. I managed to install and configure Nagios and Nagiosgraph but now I don`t know how to integrate this script. I need this script to monitor localhost ethernet interface.

Thanks in advance!

Great job!
byjsellens, April 9, 2013
Handy script, but should mention that it runs on linux only - it reads /proc/net/dev, so unfortunately it won't help you monitor a switch or other network device.
Nice little plugin. Since XI has its own grapher, I only had to integrate this plugin into nagiosxi and it just worked. Thanks!
byvictor.laza, July 4, 2012
1 of 1 people found this review helpful
Hi,

I have searched a lot for a working plugin like this to integrate with nagios 3.4 and nagiosgraph.
From many tested this is the only one working for me that is also generating perfdata.
I have chosed to change my " $bitmod = BYTES; " to " my $bitmod = BITS; " and here is an example of usage in my case: " /usr/bin/perl /root/check_if.pl -i eth1 -w 700m -c 900m -b 1000m " (this is for a gigabit interface)

Nice work for the author!
byxoroz, July 29, 2011
2 of 2 people found this review helpful
Thanks for that great script.
The output is something like
RX Bytes: 661GB, TX Bytes: 150GB; RX Speed: 62KBps, TX Speed: 25KBps; OK bandwidth utilization | rx=63021;1152921504606846976;3458764513820540928 tx=25090;1152921504606846976;3458764513820540928

And I could graph it too!