summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_ifstatus.pl
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2014-10-08 21:46:09 +0200
committerHolger Weiss <holger@zedat.fu-berlin.de>2014-10-08 21:46:09 +0200
commit83744b24b0eaa2050269d55ec795d5b78da711d9 (patch)
tree32d084383f73ffe28f5a43669e5de9fe62731f5c /plugins-scripts/check_ifstatus.pl
parentf40fc650f7a49ed6445a8eddf2f1af435592ec7b (diff)
downloadmonitoring-plugins-83744b24b0eaa2050269d55ec795d5b78da711d9.tar.gz
check_ifstatus: Fix "-n" and "-u" options
Ignore interface if it's specified via "-n" OR "-u", not just when it's specified via "-n" AND "-u".
Diffstat (limited to 'plugins-scripts/check_ifstatus.pl')
-rwxr-xr-xplugins-scripts/check_ifstatus.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins-scripts/check_ifstatus.pl b/plugins-scripts/check_ifstatus.pl
index 9aa25151..6ec71d14 100755
--- a/plugins-scripts/check_ifstatus.pl
+++ b/plugins-scripts/check_ifstatus.pl
@@ -176,7 +176,7 @@ foreach $key (keys %ifStatus) {
176 # skip unused interfaces 176 # skip unused interfaces
177 my $ifName = $ifStatus{$key}{$snmpIfDescr}; 177 my $ifName = $ifStatus{$key}{$snmpIfDescr};
178 178
179 if (!defined($ifStatus{$key}{'notInUse'}) || !grep(/^${ifName}/, @unused_ports )) { 179 if (!defined($ifStatus{$key}{'notInUse'}) && !grep(/^${ifName}/, @unused_ports )) {
180 # check only if interface is administratively up 180 # check only if interface is administratively up
181 if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) { 181 if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) {
182 #check only if interface is not excluded 182 #check only if interface is not excluded