Solved net-mgmt/telegraf SNMP input - Could not find module named IF-MIB

Dear community,

my net-mgmt/telegraf stopped working since the update to FreeBSD 13.0 when SNMP input is enabled with the following error message:

Code:
[telegraf] Error running agent: could not initialize input inputs.snmp: initializing table interface: translating: Could not find module named IF-MIB

From my investigation it seems like it is looking for MIBS in /usr/share/snmp/mibs/ instead of /usr/local/share/snmp/mibs/.

snmpwalk command works correctly with the specified MIB.

My current workaround is to link the missing MIBS between above directories.

Kindly requesting a direction how to resolve this the correct way.

Many thanks

Mike
 
Your question pointed me in the right direction. I deleted the telegraf.conf.sample file from /usr/local/etc and removed and re-installed telegraf 1.21.2. It recreated the sample config file and I found an inputs.snmp section that lists a new line:
path = ["/usr/local/share/snmp/mibs"]

I put that in the [[inputs.snmp]] section of each of my config files that does snmp and that seems to have fixed it for me.

Hope this helps you.
 
Thanks, it definitely helped. I was looking in the original sample file for a parameter like this, but it didn't occur to me that the file may not be up-to-date...

Mike
 
Top