Here's a patch to snmp_interface.mon that makes it look at ifAdminStatus -
if you've administratively disabled the interface, then it won't alarm on
it if it goes down.  This lets you kill stuff in the router without paging
people if you've forgotten to edit the Mon config.

A future improvement might be an option to discover all the interfaces
automatically, and only alarm for those that are enabled and down.
I'd be willing to code it if enough people said they wanted it.

        -- Ed

--- snmp_interface.mon  2002/04/23 22:02:18     1.3
+++ snmp_interface.mon  2002/04/24 00:58:38
@@ -63,6 +63,7 @@
 # just fake what we want
 my $ifDescr          = '.1.3.6.1.2.1.2.2.1.2';
 my $ifOperStatus     = '.1.3.6.1.2.1.2.2.1.8';
+my $ifAdminStatus    = '.1.3.6.1.2.1.2.2.1.7';
 my $ifXEntry         = '.1.3.6.1.2.1.31.1.1.1.18';
 
 my %opt;
@@ -130,7 +131,8 @@
 
     if (defined($ifindices{$interface})) {
                my $state= $session->get([$ifOperStatus, $ifindices{$interface}]);
-           if ( $state ne 1 ) {
+               my $admin= $session->get([$ifAdminStatus, $ifindices{$interface}]);
+           if ( $state ne 1 and $admin eq 1) {
                my $description = $session->get([$ifXEntry, $ifindices{$interface}]);
                push (@failures, "$host $interface $description");
            }

Reply via email to