Telegraf v1.22.0 , translating traps with netsnmp not working

Hi,
I see that netsnmp has returned to Telegraf in v1.22. So I downloaded this v1.22 version, as my MIBs won’t work well with v1.21.X due to the gosmi support.

For all snmp traps received in Telegraf, I get:
Mar 24 17:04:02 abcdefg telegraf[5694]: 2022-03-24T16:04:02Z E! [inputs.snmp_trap] Error resolving OID oid=.1.3.6.1.2.1.1.3.0, source=127.0.0.1: command timed out

.1.3.6.1.2.1.1.3.0 = sysUpTimeInstance

My telegraf snmp config is this:
[[inputs.snmp_trap]]
service_address = “udp://localhost:9162”
path = ["/usr/share/snmp/mibs"]
version = “2c”
[inputs.snmp_trap.tags]
objectClass = “TEST”

All relevant MIBs I test with are in /usr/share/snmp/mibs, there is also DISMAN-EVENT-MIB for sysUpTimeInstance. Doing a manual check on command line works:
snmptranslate .1.3.6.1.2.1.1.3.0
DISMAN-EVENT-MIB::sysUpTimeInstance

What could be wrong here?
Best Regards,
Menno

Thank you for your patience. This comment on the GoSNMP repo makes me think we just need to implement a setting which has been done in this pr if you wouldn’t mind giving it a test.

Hi @Mya,

My problem is not so urgent anymore. I didn’t get it working with NET-SNMP, but moved to gosmi and the latest version for gosmi included in telegraf v1.22.0 fixed the issues I had reported earlier with gosmi. I didn’t report back earlier because I have finished all the MIB test yet, but so far so good!

Kind Regards,
Menno

1 Like

Glad to hear you found a work around! If you would please go close or comment on the issue you opened about gosmi that it is now fixed.