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
[[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
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.
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.
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