aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Lyngstol <kly@kly@.no>2016-03-24 00:43:05 +0100
committerKristian Lyngstol <kly@kly@.no>2016-03-24 00:43:05 +0100
commit28eabb470e5ddfa051ef23be4ca3d89677304331 (patch)
tree99d9395fd7a625f6afb73a6043cf3ec82c4c50be
parented7909e8910ba429cdc17650995efaa358ee1b95 (diff)
NMS: Tweak SNMP fetching (getting more data)
-rwxr-xr-xclients/snmpfetchng.pl11
-rw-r--r--include/nms/snmp.pm4
2 files changed, 8 insertions, 7 deletions
diff --git a/clients/snmpfetchng.pl b/clients/snmpfetchng.pl
index 630347d..bbdb00d 100755
--- a/clients/snmpfetchng.pl
+++ b/clients/snmpfetchng.pl
@@ -9,13 +9,12 @@ use Data::Dumper;
use lib '../include';
use nms;
+SNMP::initMib();
SNMP::addMibDirs("/srv/tgmanage/mibs");
-SNMP::loadModules('SNMPv2-MIB');
-SNMP::loadModules('ENTITY-MIB');
-SNMP::loadModules('IF-MIB');
-SNMP::loadModules('LLDP-MIB');
-SNMP::loadModules('IP-MIB');
-SNMP::loadModules('IP-FORWARD-MIB');
+SNMP::addMibDirs("/srv/tgmanage/mibs/StandardMibs");
+SNMP::addMibDirs("/srv/tgmanage/mibs/JuniperMibs");
+SNMP::loadModules('ALL');
+
our $dbh = nms::db_connect();
$dbh->{AutoCommit} = 0;
$dbh->{RaiseError} = 1;
diff --git a/include/nms/snmp.pm b/include/nms/snmp.pm
index b1354ae..26ada44 100644
--- a/include/nms/snmp.pm
+++ b/include/nms/snmp.pm
@@ -15,7 +15,9 @@ BEGIN {
# cd /usr/share/mibs/site
# wget -O- ftp://ftp.cisco.com/pub/mibs/v2/v2.tar.gz | sudo tar --strip-components=3 -zxvvf -
SNMP::initMib();
- SNMP::addMibDirs("../mibs");
+ SNMP::addMibDirs("/srv/tgmanage/mibs/StandardMibs");
+ SNMP::addMibDirs("/srv/tgmanage/mibs/JuniperMibs");
+
SNMP::loadModules('SNMPv2-MIB');
SNMP::loadModules('ENTITY-MIB');
SNMP::loadModules('IF-MIB');