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_iftraffic_nrpe

Rating
2 votes
Favoured:
2
Hits
161705
Files:
FileDescription
check_iftraffic.phpcheck_iftraffic.php
check_iftraffic_nrpe.plcheck_iftraffic_nrpe.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 is a remake of the iftraffic plugin. The difference with the latter is that this plugin does not use SNMP. check_iftraffic_nrpe can be used as a plugin for nrpe. No SNMP checks will be performed by this plugin, only the local system (with nrpe agent) will be queried by the plugin.
Reviews (2)
byMeyer, May 23, 2012
Some kernel have a space after ':' in /proc/net/dev. This will be fixed with: "$line =~ s/:\s+/:/g;"
The patch will output average performance data.

--- check_iftraffic_nrpe.pl.orig 2012-05-23 12:01:51.000000000 +0200
+++ check_iftraffic_nrpe.pl 2012-05-23 12:21:09.000000000 +0200
@@ -95,6 +95,7 @@
}

$line =~ s/\s+/ /g;
+$line =~ s/:\s+/:/g;
@splitLine=split (/ /,$line);

(undef,$in_bytes)=split (/:/,$splitLine[1]);
@@ -175,6 +176,9 @@
my $in_prefix = "k";
my $out_prefix = "k";

+my $in_traffick = $in_traffic;
+my $out_traffick = $out_traffic;
+
if ( $in_traffic > 1024 ) {
$in_traffic = sprintf( "%.2f", $in_traffic / 1024 );
$in_prefix = "M";
@@ -190,7 +194,7 @@

my $exit_status = "OK";

-my $output = "Total RX Bytes: $in_bytes MB, Total TX Bytes: $out_bytes MB";
+my $output = "Total RX Bytes: $in_bytes MB, Total TX Bytes: $out_bytes MB ";
$output .=
"Average Traffic: $in_traffic "
. $in_prefix . "B/s ("
@@ -210,14 +214,14 @@
$exit_status = "WARNING";
}

-$output .= "$exit_status bandwidth utilization.\n"
+$output .= "$exit_status bandwidth utilization.\n"
if ( $exit_status ne "OK" );

#$output .=
#"| inUsage=$in_usage;$warn_usage;$crit_usage outUsage=$out_usage;$warn_usage;$crit_usage " . "inAbsolut=$in_traffic_absolut outAbsolut=$out_traffic_absolut\n";

$output .=
-"| inUsage=$in_usage;$warn_usage;$crit_usage;; outUsage=$out_usage;$warn_usage;$crit_usage;;\n";
+"| inUsage=$in_usage;$warn_usage;$crit_usage; outUsage=$out_usage;$warn_usage;$crit_usage; inAvg=$in_traffick;$warn_usage;$crit_usage; outAvg=$out_traffick;$warn_usage;$crit_usage;\n";


print $output;
bycentury, May 21, 2012
it perfectly fill my needs . a little bit modified and a completly different pnp4 graphe template for me.

thanks for the good job.