Help: Setting up SNMP with Telegraf - At a lost here

Hi Everyone,

Hoping to get some help here since i’m having trouble figuring out how to continue.
I have successfully setup influxdb and grafana running on ubuntu server.

Telegraf agent has been installed on windows machine and i can successfully read out machine metrics.
However i’m facing issues getting to read snmp data.

This is what i have in my telegraf.conf

[[inputs.snmp]]
agents = [ “10.46.4.1:161” ]
version = 2
community = “SNMPread”

[[inputs.snmp.field]]
oid = “CORESRVAMST::hostname”
is_tag = true

[[inputs.snmp.table]]
oid = “CORESRVAMST::testTable”
inherit_tags = [ “hostname” ]

This is my output in the log file

2018-06-23T11:02:30Z E! Error in plugin [inputs.snmp]: initializing table : translating: exec: “snmptranslate”: executable file not found in %PATH%
2018-06-23T11:02:40Z E! Error in plugin [inputs.snmp]: initializing table : translating: exec: “snmptranslate”: executable file not found in %PATH%

On my windows machine i am running snmp service with correctly configured security details
I cannot seem to figure out what is wrong here.

This error:

2018-06-23T11:02:30Z E! Error in plugin [inputs.snmp]: initializing table : translating: exec: “snmptranslate”: executable file not found in %PATH%

indicates that when Telegraf attempts to run snmptranslate, it cannot find the executable and therefore throws an error.

The documentation for the SNMP plugin states:

If the plugin is configured such that it needs to perform lookups from the MIB, it will use the net-snmp utilities snmptranslate and snmptable.

Do you have these utilities installed and your environment correctly configured so that they are included in the PATH of the user running Telegraf? If Telegraf is running as a service then it will be running under the telegraf user.

Waw! Thank you so much. I did not expect an answer back and i’m very very happy you did.
I don’t believe i have set it up correctly. I will google this tonight and try to figure it out.
Thank you very very much for pointing me int he correct direction.

I run telegraf.conf on a window machine as i have almost no experience on Ubuntu, should this be a big difference?

Yes, there will be some differences running on Windows versus a Linux distribution for this. Installing programs, and making sure they are included in the PATH for various users will not be the same.

Thank you very very much, i will play around with it tonight