Telegraf error message

System is CentOS 7.

Trying to test a network router and receiving immediate error:

telegraf --test --config /etc/telegraf/telegraf.d/10.10.10.1.conf
2019-08-22T23:32:00Z I! Starting Telegraf 1.11.4
2019-08-22T23:32:02Z E! [telegraf] Error running agent: initializing field uptime: translating: exit status 2: MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs
Cannot find module (DISMAN-EXPRESSION-MIB): At line 0 in (none)
DISMAN-EXPRESSION-MIB::sysUpTimeInstance: Unknown Object Identifier

It seems MIB related - but I can’t find the specific reason this is failing. Where should I start?

SNMPWALK works perfect against this particular host. This system isn’t docker - CentOS7 VM.

Thanks,.
Brian

This error means that snmptranslate couldn’t find a needed MIB file (DISMAN-EXPRESSION-MIB.txt).

I assume if you added this MIB to the search path it would work, but I looked over the example configs and saw the example where we use DISMAN-EXPRESSION-MIB::sysUpTimeInstance. I don’t have this MIB on my system either but I do have the similar DISMAN-EVENT-MIB::sysUpTimeInstance. If you are trying to run this example then maybe just switch out the MIB name:

  [[inputs.snmp.field]]
    name = "uptime"
-    oid = "DISMAN-EXPRESSION-MIB::sysUpTimeInstance"
+    oid = "DISMAN-EVENT-MIB::sysUpTimeInstance"
1 Like

Ah so simple that i missed that. Thank you - the test runs fine now!

Brian

This tip helped me a lot as well.