From 1f4fd12845a2041df3f34f7a84d8012e747e327c Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Sun, 6 Jul 2014 19:55:03 +0200 Subject: Don't rely on FindBin module to locate utils.pm As the FindBin module doesn't work with ePN, set the path to utils.pm explicitly at build time. Keep using FindBin additionally, so that the plugins can also be executed from the build directory. Closes #1271. --- plugins-scripts/check_ifstatus.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins-scripts/check_ifstatus.pl') diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl index e9e62149..fb17d983 100755 --- a/plugins-scripts/check_ifstatus.pl +++ b/plugins-scripts/check_ifstatus.pl @@ -34,6 +34,7 @@ use POSIX; use strict; use FindBin; use lib "$FindBin::Bin"; +use lib '@libexecdir@'; use utils qw($TIMEOUT %ERRORS &print_revision &support); use Net::SNMP; -- cgit v1.2.3-74-g34f1 From 69b719aa2e3bd8dfd643d7cbe60e6e165d5279ea Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Mon, 30 Sep 2013 17:55:22 +0200 Subject: 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. --- THANKS.in | 1 + plugins-scripts/check_ifstatus.pl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins-scripts/check_ifstatus.pl') diff --git a/THANKS.in b/THANKS.in index 883387e5..43ba182f 100644 --- a/THANKS.in +++ b/THANKS.in @@ -323,3 +323,4 @@ Eric J. Mislivec Jean-Claude Computing Andy Brist Mikael Falkvidd +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) { $ifexclude, $ifunused); } -my $perfdata = sprintf("up=%d,down=%d,dormant=%d,excluded=%d,unused=%d",$ifup,$ifdown,$ifdormant,$ifexclude,$ifunused); +my $perfdata = sprintf("up=%d down=%d dormant=%d excluded=%d unused=%d",$ifup,$ifdown,$ifdormant,$ifexclude,$ifunused); print ("$state: $answer |$perfdata\n"); exit $ERRORS{$state}; -- cgit v1.2.3-74-g34f1