return ($color, $summary, $message );
}
- my (%sifdesc, %siftype, %sifadminstatus, %sifoperstatusi, $res);
+ my (%sifdesc, %sifalias, %siftype, %sifadminstatus, %sifoperstatusi, $res);
$res = $snmp_session->map_table ([
[1,3,6,1,2,1,2,2,1,1], # ifIndex
[1,3,6,1,2,1,2,2,1,2], # ifDescr
[1,3,6,1,2,1,2,2,1,3], # ifType
[1,3,6,1,2,1,2,2,1,7], # ifAdminStatus
- [1,3,6,1,2,1,2,2,1,8] # ifOperStatus
- ],
+ [1,3,6,1,2,1,2,2,1,8], # ifOperStatus
+ [1,3,6,1,2,1,31,1,1,1,1], # ifname
+ [1,3,6,1,2,1,31,1,1,1,18], # ifalias
+ ],
sub ($@) {
- my ($rowindex,$index,$ifdescr,$iftype,$ifadminstatus,$ifoperstatus) = @_;
+ my ($rowindex,$index,$ifdescr,$iftype,$ifadminstatus,$ifoperstatus,$ifname,$ifalias) = @_;
- grep (defined $_ && ($_=pretty_print $_), ($index,$ifdescr,$iftype,$ifadminstatus,$ifoperstatus));
- debug("interfaces - seen $ifdescr",8);
+ grep (defined $_ && ($_=pretty_print $_), ($index,$ifdescr,$iftype,$ifadminstatus,
+ $ifoperstatus,$ifname,$ifalias));
+ debug("interfaces - seen $ifdescr, $ifname, $ifalias",8);
$sifdesc{$index} = $ifdescr;
$siftype{$index} = $iftype;
+ $sifalias{$index} = $ifalias;
$sifadminstatus{$index} = $ifadminstatus;
$sifoperstatus{$index} = $ifoperstatus;
});
$redcount++ unless $skip;
if (!$skip) {
- $message .= "interface $index status:\n";
+ $message .= "interface $index down:\n";
$message .= "\tifDescr: $sifdesc{$index}\n";
- $message .= "\tifType: $siftype{$index}\n";
- $message .= "\tifAdminStatus: $sifadminstatus{$index}\n";
- $message .= "\tifOperStatus: $sifoperstatus{$index}\n";
+ if ($sifalias{$index}) {
+ $message .= "\tifAlias: $sifalias{$index}\n";
+ }
+# $message .= "\tifType: $siftype{$index}\n";
+# $message .= "\tifAdminStatus: $sifadminstatus{$index}\n";
+# $message .= "\tifOperStatus: $sifoperstatus{$index}\n";
}
}
}
=item Detail Message Field
-In normal opereration the detail message field will have a list of all of the
+In normal opereration the detail message field will have a list of down
network interfaces in the I<MIBII ifTable> table along with the interface
-description (I<ifDesc>), type (I<ifType>), administrative status
-(I<ifAdminStatus>) and operational status (I<ifOperStatus>). Otherwise this
+description (I<ifDesc>), alias (I<ifAlias>). Otherwise this
field will have a detailed description of the cause of an error.
=back