[Nagiosplug-devel] patch to check_ifstatus for AIX 4.3.3

Joe Buehler jbuehler at hekimian.com
Thu Dec 19 06:28:03 CET 2002


The attached patch was necessary for nagios 1.0 -- AIX 4.3.3 machines
use type 22 for PPP links.

Joe Buehler

--- check_ifstatus.~1~	Tue Dec 17 10:04:04 2002
+++ check_ifstatus	Tue Dec 17 14:59:49 2002
@@ -188,6 +188,7 @@
      if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) {
      	# check only if interface is not of type 23  aka PPP interface
  		if ($ifStatus{$key}{$snmpIfType} != 23 ) {
+		if ($ifStatus{$key}{$snmpIfType} != 22 ) {
  			if ($ifStatus{$key}{$snmpIfOperStatus} == 1 ) { $ifup++ ;}
          	if ($ifStatus{$key}{$snmpIfOperStatus} == 2 ) {
              	$ifdown++ ;
@@ -197,6 +198,7 @@
  			}
           	if ($ifStatus{$key}{$snmpIfOperStatus} == 5 ) { $ifdormant++ ;}
  		}
+		}
  	}


@@ -217,6 +219,7 @@
  			$ifdown,
  			$ifdormant);
     }
+}

  print ("$state: $answer");
  exit $ERRORS{$state};





More information about the Devel mailing list