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_networkusage

Rating
3 votes
Favoured:
2
Hits
156322
Files:
FileDescription
check_networkusage.plcheck_networkusage.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!
This Nagios Plugin, written in perl, shows the throughput of an defined networkinterface. The output is generated from /proc/net/dev.. The output-language is german and includes also Performance-Data. Usage: -I = Interface -D = Direction(in/out) -c = Critical -w = Warning I tooked some code from liwei, his Buffer Creation process is simple and exactly what i needed. Thanks for this. You can find his Plugins also at this site.
Reviews (2)
When you have longer interface names (eg. vboxnet0) the result always was 0Kb/s because @splitinterface first item was empty.


--- check_networkusage.pl.20111106a 2011-11-06 11:04:22.000000000 +0100
+++ check_networkusage.pl 2011-11-06 11:07:32.000000000 +0100
@@ -61,6 +61,7 @@
while (){
$completestring = $_ if ($_=~ /$opt_I/);
@splitinterface = split(/:/,$completestring,2);
+ @splitinterface[1] =~ s/^s+|s+$//g;
@dataset_in = split(/s+/,@splitinterface [1]);
$new_in_bytes = @dataset_in[0];
@dataset_out = split(/s+/,@splitinterface [1]);
Works as described, but needs two corrections to report outbound network utilizations.

Correction 1.
Change line 119 from this:
if ($in_rate >= $opt_w && $in_rate = $opt_w && $out_rate = $opt_c )
to this:
elsif ($out_rate >= $opt_c )