Network Connections, Stats and Bandwidth

check_iftraffic_nrpe

Description:

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

Compatible With


Project Files
Project Notes
Reviews (2) Add a Review
Enhancements
by Meyer, May 31, 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_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;



good job
by century, May 31, 2012

it perfectly fill my needs . a little bit modified and a completly different pnp4 graphe template for me. thanks for the good job.



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 (2)
Favorites
2
Views
161,758