Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
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.
Current Version
Last Release Date
February 1, 2010
Owner
Nagios Exchange
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_absolutn"; $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;
it perfectly fill my needs . a little bit modified and a completly different pnp4 graphe template for me. thanks for the good job.
You must be logged in to submit a review.
To:
From: