Issues to display SNMP information

This is a typical error on snmpwalk at the beginning of the display information:

snmpwalk -v1 -c public 127.0.0.1 system
Expected "::=" (RFC5644): At line 493 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Expected "{" (EOF): At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Bad object identifier: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Bad parse of OBJECT-IDENTITY: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
Bad operator (INTEGER): At line 73 in /usr/share/mibs/ietf/SNMPv2-PDU
Unlinked OID in IPATM-IPMC-MIB: marsMIB ::= { mib-2 57 }
Undefined identifier: mib-2 near line 18 of /usr/share/mibs/ietf/IPATM-IPMC-MIB

Open /etc/snmp/snmp.conf and it should be as follows:

mibs :
mibs +SNMPv2-MIB

But, if you run ...

snmptranslate -m all -Tz -On | sed -e 's/"//g' > /tmp/oids.txt

... to create your oids.txt, you still see the same error.
To fix them, you can edit the file /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB with vim and put the following sentences:

:%s/ := / ::= /g
:%s/Reference "RFC/Reference RFC/g
:wq

Other option it's directly download the correct files and replace them:

sudo wget http://www.iana.org/assignments/ianaippmmetricsregistry-mib/ianaippmmetricsregistry-mib -O /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB
sudo wget http://pastebin.com/raw/p3QyuXzZ -O /usr/share/mibs/ietf/SNMPv2-PDU

sudo wget http://pastebin.com/raw/gG7j8nyk -O /usr/share/mibs/ietf/IPATM-IPMC-MIB

Now, you are done
Enjoy it!

Comments

Popular posts from this blog

Exception: Could not find a default OpenFlow controller in Mininet

How to fix Android when developer options are not available for this user

Webcam streaming throught VLC with YUY2 compatibility