Network Connections, Stats and Bandwidth

check_ifutil.pl

Description:

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

Current Version

v0.3b

Last Release Date

2016-10-19

Compatible With

  • Nagios 3.x

License

GPL


Project Files
Project Notes
Reviews (8) Add a Review
Strange
by Engr.Adeel, October 31, 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



Use of uninitialized value in stri
by gerardjp, November 30, 2014

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:



Wonderfull Script
by hchavan, June 30, 2014

Thank you so much. Was very usefull



Nagios graph integration
by Laurentiu, October 31, 2013

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!



fyi - linux only
by jsellens, April 30, 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.



works straightaway in NagiosXI
by SJTesla, September 30, 2012

Nice little plugin. Since XI has its own grapher, I only had to integrate this plugin into nagiosxi and it just worked. Thanks!



Excelent work!
by victor.laza, July 31, 2012

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!



very nice
by xoroz, July 31, 2011

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!



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.5 (11)
Favorites
0
Views
109,518