diff options
| author | Jan Wagner <waja@cyconet.org> | 2013-09-30 17:55:22 +0200 |
|---|---|---|
| committer | Jan Wagner <waja@cyconet.org> | 2014-07-20 23:52:25 +0200 |
| commit | 69b719aa2e3bd8dfd643d7cbe60e6e165d5279ea (patch) | |
| tree | 8428904d65cc748620318cbfac5e3063b4ddfbb4 | |
| parent | 71063655e558224d692950ac9abaa39e0b7c6585 (diff) | |
| download | monitoring-plugins-69b719a.tar.gz | |
check_ifstatus: perfdata bug
The perfdata output violates the current Nagios Plugin Development Guidelines
(http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN202 :
"space separated list of label/value pairs").
Thus the Addon PNP did not read the perdata correctly.
The patch replaces the commas with spaces in the perfdata output.
Many thanks to Patric Wust.
---
Closes #1169 and #721.
| -rw-r--r-- | THANKS.in | 1 | ||||
| -rwxr-xr-x | plugins-scripts/check_ifstatus.pl | 2 |
2 files changed, 2 insertions, 1 deletions
| @@ -323,3 +323,4 @@ Eric J. Mislivec | |||
| 323 | Jean-Claude Computing | 323 | Jean-Claude Computing |
| 324 | Andy Brist | 324 | Andy Brist |
| 325 | Mikael Falkvidd | 325 | Mikael Falkvidd |
| 326 | Patric Wust | ||
diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl index fb17d983..709ad174 100755 --- a/plugins-scripts/check_ifstatus.pl +++ b/plugins-scripts/check_ifstatus.pl | |||
| @@ -221,7 +221,7 @@ foreach $key (keys %ifStatus) { | |||
| 221 | $ifexclude, | 221 | $ifexclude, |
| 222 | $ifunused); | 222 | $ifunused); |
| 223 | } | 223 | } |
| 224 | my $perfdata = sprintf("up=%d,down=%d,dormant=%d,excluded=%d,unused=%d",$ifup,$ifdown,$ifdormant,$ifexclude,$ifunused); | 224 | my $perfdata = sprintf("up=%d down=%d dormant=%d excluded=%d unused=%d",$ifup,$ifdown,$ifdormant,$ifexclude,$ifunused); |
| 225 | print ("$state: $answer |$perfdata\n"); | 225 | print ("$state: $answer |$perfdata\n"); |
| 226 | exit $ERRORS{$state}; | 226 | exit $ERRORS{$state}; |
| 227 | 227 | ||
