Errors after adding SNMP Input plugin in processing MIB files


(Sachin) #1

Hello,

I am exploring Snmp Input Plugin
I am getting Snmp traps from Juniper devices.

There are many MIB files in /usr/share/snmp/mibs/1 directory

$ pwd
/usr/share/snmp/mibs/1

$ ls
AGENTX-MIB.txt IF-INVERTED-STACK-MIB.txt NET-SNMP-EXAMPLES-MIB.txt SMUX-MIB.txt SNMPv2-TC.txt
BRIDGE-MIB.txt IF-MIB.txt NET-SNMP-EXTEND-MIB.txt SNMP-COMMUNITY-MIB.txt SNMPv2-TM.txt
DISMAN-EVENT-MIB.txt INET-ADDRESS-MIB.txt NET-SNMP-MIB.txt SNMP-FRAMEWORK-MIB.txt SNMP-VIEW-BASED-ACM-MIB.txt
DISMAN-SCHEDULE-MIB.txt IP-FORWARD-MIB.txt NET-SNMP-PASS-MIB.txt SNMP-MPD-MIB.txt TCP-MIB.txt
DISMAN-SCRIPT-MIB.txt IP-MIB.txt NET-SNMP-TC.txt SNMP-NOTIFICATION-MIB.txt TRANSPORT-ADDRESS-MIB.txt
EtherLike-MIB.txt IPV6-ICMP-MIB.txt NET-SNMP-VACM-MIB.txt SNMP-PROXY-MIB.txt UCD-DEMO-MIB.txt
HCNUM-TC.txt IPV6-MIB.txt NETWORK-SERVICES-MIB.txt SNMP-TARGET-MIB.txt UCD-DISKIO-MIB.txt
HOST-RESOURCES-MIB.txt IPV6-TCP-MIB.txt NOTIFICATION-LOG-MIB.txt SNMP-USER-BASED-SM-MIB.txt UCD-DLMOD-MIB.txt
HOST-RESOURCES-TYPES.txt IPV6-TC.txt RFC1155-SMI.txt SNMP-USM-AES-MIB.txt UCD-IPFWACC-MIB.txt
IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt IPV6-UDP-MIB.txt RFC1213-MIB.txt SNMP-USM-DH-OBJECTS-MIB.txt UCD-SNMP-MIB.txt
IANAifType-MIB.txt LM-SENSORS-MIB.txt RFC-1215.txt SNMPv2-CONF.txt UDP-MIB.txt
IANA-LANGUAGE-MIB.txt MTA-MIB.txt RMON-MIB.txt SNMPv2-MIB.txt
IANA-RTPROTO-MIB.txt NET-SNMP-AGENT-MIB.txt SCTP-MIB.txt SNMPv2-SMI.txt

When I start Graylog and send Snmp Traps, I am getting many “Error” messages as shown below:

2017-08-03T18:48:18.130+05:30 ERROR [SnmpMibsLoader] Error loading MIB file: /usr/share/snmp/mibs/1/HCNUM-TC.txt
java.lang.NullPointerException: null
at net.percederberg.grammatica.parser.ReaderBuffer.ensureCapacity(ReaderBuffer.java:348) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.ReaderBuffer.ensureBuffered(ReaderBuffer.java:320) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.ReaderBuffer.peek(ReaderBuffer.java:222) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.TokenStringDFA.match(TokenStringDFA.java:114) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.Tokenizer$StringDFAMatcher.match(Tokenizer.java:507) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.Tokenizer.nextToken(Tokenizer.java:327) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.Tokenizer.next(Tokenizer.java:287) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.Parser.peekToken(Parser.java:629) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.Parser.nextToken(Parser.java:566) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:230) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:198) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.RecursiveDescentParser.parseElement(RecursiveDescentParser.java:261) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.RecursiveDescentParser.parseAlternative(RecursiveDescentParser.java:227) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.RecursiveDescentParser.parsePattern(RecursiveDescentParser.java:198) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.RecursiveDescentParser.parseStart(RecursiveDescentParser.java:162) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.grammatica.parser.Parser.parse(Parser.java:394) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.mibble.MibLoader$MibSource.parseMib(MibLoader.java:972) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.mibble.MibLoader.loadQueue(MibLoader.java:724) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.mibble.MibLoader.load(MibLoader.java:550) ~[graylog-plugin-snmp-0.3.0.jar:?]
at net.percederberg.mibble.MibLoader.load(MibLoader.java:479) ~[graylog-plugin-snmp-0.3.0.jar:?]
at org.graylog.snmp.oid.SnmpMibsLoader.loadMibsFromPath(SnmpMibsLoader.java:80) [graylog-plugin-snmp-0.3.0.jar:?]
at org.graylog.snmp.oid.SnmpMibsLoader.(SnmpMibsLoader.java:36) [graylog-plugin-snmp-0.3.0.jar:?]
at org.graylog.snmp.SnmpCommandResponder.(SnmpCommandResponder.java:38) [graylog-plugin-snmp-0.3.0.jar:?]
at org.graylog.snmp.codec.SnmpCodec.decode(SnmpCodec.java:61) [graylog-plugin-snmp-0.3.0.jar:?]
at org.graylog2.shared.buffers.processors.DecodingProcessor.processMessage(DecodingProcessor.java:146) [graylog.jar:?]
at org.graylog2.shared.buffers.processors.DecodingProcessor.onEvent(DecodingProcessor.java:87) [graylog.jar:?]
at org.graylog2.shared.buffers.processors.ProcessBufferProcessor.onEvent(ProcessBufferProcessor.java:74) [graylog.jar:?]
at org.graylog2.shared.buffers.processors.ProcessBufferProcessor.onEvent(ProcessBufferProcessor.java:42) [graylog.jar:?]
at com.lmax.disruptor.WorkProcessor.run(WorkProcessor.java:143) [graylog.jar:?]
at com.codahale.metrics.InstrumentedThreadFactory$InstrumentedRunnable.run(InstrumentedThreadFactory.java:66) [graylog.jar:?]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]

There are 63 MIB files

$ find /usr/share/snmp/mibs/ -type f |wc -l
63

And almost all of them are reported in errors:

$ grep “Error loading” /var/log/graylog-server/server.log | awk ‘{print $NF}’ | sort | uniq | wc -l
62

I am not sure what to do to remove these errors.


(Jochen) #2

Try posting a bug report on GitHub and include the relevant MIBs.


(system) #3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.