Telegraf 1.20.4 some SNMP traps failing whilst no issues with 1.18

Hello,

We upgraded telegraf from 1.19 to 1.20 and made the changes for SNMP traps. Now we have the curious situation where traps for some mibs are completely failing, and where traps in one mib some work, some don’t.

For the mib msa2000traps-mib, telegraf succeeds in decoding a received msaEventInfoTrap:
snmp_trap,community=public,host=mytest01,mib=MSA2000TRAPS-MIB,name=msaEventInfoTrap,objectClass=PWP,oid=.1.3.6.1.4.1.11.2.51.0.3001,source=127.0.0.1,version=2c sysUpTimeInstance=1279177305i,connUnitEventId=2i,connUnitEventType=2i,connUnitEventDescr=“A test” 1637842761561019393

But msaEventWarningTrap from same mib with similar data gives error in telegraf (and no metric):
2021-11-25T12:19:33Z E! [inputs.snmp_trap] Error resolving value OID, oid=.1.3.6.1.4.1.11.2.51.0.3002, source=127.0.0.1: Could not find node for OID 1.3.6.1.4.1.11.2.51.0.3002

snmptranslate (net-snmp) is still happy with the traps, but this is not used anymore.
snmptranslate .1.3.6.1.4.1.11.2.51.0.3002
MSA2000TRAPS-MIB::msaEventWarningTrap

There are no startup errors for telegraf.

Best Regards,
Menno

You need to specify the mib path, that will be fixed in next release…

Thanks for this, we know as it took quite some time to figure this one out… But we have the path already correctly set in telegraf.conf snmp_trap, so I doubt the path is the issue anymore.
path = ["/usr/share/snmp/mibs"]

Also no loading errors when running telegraf in debug mode?

Correct, no loading errors when starting telegraf, also when running telegraf in debug mode. The error that appears when the snmp_trap is received also remains the same, no additional info there, Error resolving value OID.