[Nagiosplug-help] diff for check_ifoperstatus

Hugo Lombard hal at infosat.net
Mon Jun 9 02:44:07 CEST 2003


I've tried to use the '-n' option to check_ifoperstatus, and it turned
out to not be working.

This patch fixes it for me.

Regards.


--- check_ifoperstatus	Wed May 14 17:11:07 2003
+++ /tmp/check_ifoperstatus	Mon Jun  9 11:40:33 2003
@@ -137,7 +137,7 @@
 }
 
 
-if (defined $name) {
+if (defined $ifName) {
 	$ifXTable=1;
 }
 
@@ -218,9 +218,9 @@
 
    ## Check to see if ifName match is requested and it matches - exit if no match
    ## not the interface we want to monitor
-   if ( defined $name && not ($response->{$snmpIfName} eq $name) ) {
+   if ( defined $ifName && not ($response->{$snmpIfName} eq $ifName) ) {
       $state = 'UNKNOWN';
-      $answer = "Interface name ($name) doesn't match snmp value ($response->{$snmpIfName}) (index $snmpkey)";
+      $answer = "Interface name ($ifName) doesn't match snmp value ($response->{$snmpIfName}) (index $snmpkey)";
       print ("$state: $answer");
       exit $ERRORS{$state};
    } 


-- 
Hugo Lombard
InfoSat (Pty) Ltd

In a display of perverse brilliance, Carl the repairman mistakes a room
humidifier for a mid-range computer but manages to tie it into the network
anyway.
                -- The 5th Wave





More information about the Help mailing list