SNMP Input plugin is not working on telegraf

Hi Team,
I have added the below configuration in telegraf.conf file and added snmp as a input.SNMP walk is working but through telegraf.conf its not working .Please find the below config.

SNMP walk on telegraf server:
root@telegraf:/etc/telegraf# snmpwalk -v2c -c public 192.168.10.1 iso.3.6.1.4.1.2620.1.6.7.5.1.5 SNMPv2c
iso.3.6.1.4.1.2620.1.6.7.5.1.5.1.0 = Gauge32: 1
iso.3.6.1.4.1.2620.1.6.7.5.1.5.2.0 = Gauge32: 2
iso.3.6.1.4.1.2620.1.6.7.5.1.5.3.0 = Gauge32: 1
iso.3.6.1.4.1.2620.1.6.7.5.1.5.4.0 = Gauge32: 3

telegraf config:
[[inputs.snmp]]
agents = [ “192.168.10.1:161” ]
timeout = “5s”
version = 2
community = “public”
[[inputs.snmp.table]]
name= “Fan status”
oid= “iso.3.6.1.4.1.2620.1.6.7.8.2.1.6”

[[inputs.snmp.field]]
name= “Power Supply status”
oid= “iso.3.6.1.4.1.2620.1.6.7.9.1.1.2”

[[inputs.snmp.field]]
name= “uptime”
oid = "CHECKPOINT-MIB::fanSpeedSensorSta

output:
root@telegraf:/etc/telegraf# telegraf -test -config /etc/telegraf/telegraf.conf --input-filter snmp
2019-09-02T15:10:21Z I! Starting Telegraf 1.11.5
2019-09-02T15:10:22Z E! [telegraf] Error running agent: initializing table Fan status: getting table columns: exit status 1: MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module: At line 0 in (none)
::iso.3.6.1.4.1.2620.1.6.7.8.2.1.6: Unknown Object Identifier
Please let me know how to mention the mib is on telegraf.conf file.
Thanks in advance.
Regards
Aathi

Hi @Aathi87 ,

i found a similar problem here : MIB
does this help you ?

best regards

Check your /etc/snmp/snmp.conf file. The default installation doesn’t support the usage of additional MIB files.

We have used the snmp-mibs-downloader yum package and installed a huge bunch of additional MIB file to make our snmp working. And that required of course the modification of the snmp.conf file.

Hi Swalter,

Thanks for the update.

Please find the below snmp.conf file.what change i have to make on that file.i have uploded the necessary mibs on /usr/share/snmp/mibs/.
root@telegraf:/etc/snmp# cat snmp.conf

As the snmp packages come without MIB files due to license reasons, loading

of MIBs is disabled by default. If you added the MIBs you can reenable

loading them by commenting out the following line.

Kindly help on this.

root@telegraf:/etc/snmp# ls /usr/share/snmp/mibs/
CHECKPOINT-MIB.mib GaiaTrapsMIB.mib miblist.txt NET-SNMP-PASS-MIB.txt R80_10_GaiaTrapsMIB.txt UCD-IPFILTER-MIB.txt
CHECKPOINT-MIB.mib.txt GNOME-SMI.txt mib.txt NET-SNMP-PERIODIC-NOTIFY-MIB.txt RFC-1215.txt UCD-IPFWACC-MIB.txt
CHECKPOINT-MIB.txt IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt NET-SNMP-AGENT-MIB.txt NET-SNMP-SYSTEM-MIB.txt SNMP-TLS-TM-MIB.txt UCD-SNMP-MIB-OLD.txt
chkpnt.mib IANAifType-MIB.txt NET-SNMP-EXAMPLES-MIB.txt NET-SNMP-TC.txt SNMP-TSM-MIB.txt UCD-SNMP-MIB.txt
chkpnt-trap.mib IANA-LANGUAGE-MIB.txt NET-SNMP-EXTEND-MIB.txt NET-SNMP-VACM-MIB.txt UCD-DEMO-MIB.txt
chkpnt-trap.txt IANA-RTPROTO-MIB.txt NET-SNMP-MIB.txt R80_10_chkpnt-trap.txt UCD-DISKIO-MIB.txt
chkpnt.txt LM-SENSORS-MIB.txt NET-SNMP-MONITOR-MIB.txt R80_10_chkpnt.txt UCD-DLMOD-MIB.txt
root@telegraf:/etc/snmp#
Regards
Aathi

Hi, my snmp config file looks like this

cat /etc/snmp/snmp.conf 
# As the snmp packages come without MIB files due to license reasons, loading
# of MIBs is disabled by default. If you added the MIBs you can reenable
# loading them by commenting out the following line.
mibs :
mibdirs : $HOME/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp:/usr/share/snmp/mibs/custom:$MY_ADDITIONAL_MIBDIRS

In order to find out what the names of the table columns are Telegraf needs to run a snmptable command:

snmptable -v2c -c public 192.168.10.1 1.3.6.1.4.1.2620.1.6.7.8.2.1.6

I suspect this won’t work, and I can’t find this OID online in any databases though, where did you learn of it?