aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/test/gondul-snmp-test.Dockerfile1
-rwxr-xr-xbuild/test/snmpfetch-misc.sh4
-rwxr-xr-xcollectors/snmpfetchng.pl6
3 files changed, 8 insertions, 3 deletions
diff --git a/build/test/gondul-snmp-test.Dockerfile b/build/test/gondul-snmp-test.Dockerfile
index 3491831..9eb7065 100644
--- a/build/test/gondul-snmp-test.Dockerfile
+++ b/build/test/gondul-snmp-test.Dockerfile
@@ -15,6 +15,7 @@ RUN apt-get -y install \
snmpd \
libsnmp-perl \
perl-modules
+RUN apt-get -y install wget tar
RUN mkdir -p /opt/gondul
COPY build/test/snmpd.conf /etc/snmp/
CMD /opt/gondul/build/test/snmpfetch-misc.sh
diff --git a/build/test/snmpfetch-misc.sh b/build/test/snmpfetch-misc.sh
index 95b005f..0453c59 100755
--- a/build/test/snmpfetch-misc.sh
+++ b/build/test/snmpfetch-misc.sh
@@ -1,3 +1,7 @@
#!/bin/bash
service snmpd start
+cd /opt/gondul/data
+if [ ! -d mibs ]; then
+ ../extras/tools/get_mibs.sh
+fi
exec /opt/gondul/collectors/snmpfetchng.pl
diff --git a/collectors/snmpfetchng.pl b/collectors/snmpfetchng.pl
index 680c392..ab91e14 100755
--- a/collectors/snmpfetchng.pl
+++ b/collectors/snmpfetchng.pl
@@ -11,9 +11,9 @@ use nms qw(convert_mac);
use IO::Socket::IP;
SNMP::initMib();
-SNMP::addMibDirs("/opt/gondul/mibs/StandardMibs");
-SNMP::addMibDirs("/opt/gondul/mibs/JuniperMibs");
-SNMP::addMibDirs("/opt/gondul/mibs/CiscoMibs");
+SNMP::addMibDirs("/opt/gondul/data/mibs/StandardMibs");
+SNMP::addMibDirs("/opt/gondul/data/mibs/JuniperMibs");
+SNMP::addMibDirs("/opt/gondul/data/mibs/CiscoMibs");
SNMP::loadModules('ALL');
our $dbh = nms::db_connect();