diff options
author | Kristian Lyngstol <kly@kly.no> | 2016-03-16 22:09:57 +0000 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2016-03-16 22:09:57 +0000 |
commit | ae8d11f9e6383cfd0adfed47343f53f330883d7c (patch) | |
tree | 2ee10ec8317c968fff39bec44b399b4432540e7d | |
parent | 14a7305a06c2a9651593137094a8d2f39af66c05 (diff) |
NMS: Slightly better OID-list (not complete)
-rwxr-xr-x | clients/snmpfetchng.pl | 6 | ||||
-rwxr-xr-x | include/config.pm.dist | 23 |
2 files changed, 27 insertions, 2 deletions
diff --git a/clients/snmpfetchng.pl b/clients/snmpfetchng.pl index 5d1fd42..de8f802 100755 --- a/clients/snmpfetchng.pl +++ b/clients/snmpfetchng.pl @@ -103,7 +103,11 @@ sub inner_loop Community => $switch{'community'}, UseEnums => 1, Version => '2'); - $s->bulkwalk(0, 10, @nms::config::snmp_objects, sub{ callback(\%switch, @_); }); + my $ret = $s->bulkwalk(0, 10, @nms::config::snmp_objects, sub{ callback(\%switch, @_); }); + if (!defined($ret)) { + mylog("Fudge: ". $s->{'ErrorStr'}); + $outstanding--; + } } mylog( "Polling " . @switches . " switches: $poll_todo"); SNMP::MainLoop(5); diff --git a/include/config.pm.dist b/include/config.pm.dist index 382b4e2..492e02d 100755 --- a/include/config.pm.dist +++ b/include/config.pm.dist @@ -11,7 +11,28 @@ our $db_username = "nms"; our $db_password = "<removed>"; # NMS: What SNMP objects to fetch. -our @snmp_objects = [['ifTable'], ['ifXTable'], ['sysDescr'], ['sysName'],['ipForward']]; +# Some basics +our @snmp_objects = [ +['ifIndex'], +['sysNam'], +['sysDescr'], +['ifHighSpeed'], +['ifType'], +['ifName'], +['ifDescr'], +['ifAlias'], +['ifOperStatus'], +['ifAdminStatus'], +['ifLastChange'], +['ifHCInOctets'], +['ifHCOutOctets'], +['ifInDiscards'], +['ifOutDiscards'], +['ifInErrors'], +['ifOutErrors'], +['ifInUnknownProtos'], +['ifOutQLen'] +]; # Max SNMP polls to fire off at the same time. our $snmp_max = 20; |