Closed doodie closed 7 years ago
The issue seems to be that the executable 'snmptranslate' can't be found. Unfortunately it is a requirement when tables are used, as is the case with the edgerouter dashboard. Even if the names were changed to numeric OIDs 'snmptranslate' is still required to parse the table.
This should be easy to correct.
You didn't mention which OS distribution you are using. Debian & Ubuntu both provide Net-SNMP tools via the 'snmp' package, which includes 'snmptranslate'. All of the utilities needed are (or should be) in /usr/bin.
You can first verify that snmptranslate does exist, and does exist in the same directory as snmpget and snmpwalk. /usr/bin or /usr/local/bin would be the likely candidates.
If snmptranslate is missing then the next step would depend on the specific OS distribution.
If snmptranslate is present then the startup for telegraf might need to have the relevant directory added to the $PATH.
I am running CentOS 6.9
[root@brain ~]# cat /etc/redhat-release CentOS release 6.9 (Final) [root@brain ~]# uname -a Linux 2.6.32-696.3.1.el6.x86_64 #1 SMP Tue May 30 19:52:55 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
snmptranslate
[root@brain ~]# echo $PATH /usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/bin [root@brain ~]# which snmptranslate /usr/bin/snmptranslate [root@brain ~]# snmptranslate -V NET-SNMP version: 5.5
Since snmptranslate exists, I need to add $PATH to telegraf init?
/usr/bin
should already be in the path.
I want to try to stand up a centos VM to take a quick look at why the noted executables can't be found.
In the meantime, can you check/confirm a few items that might help speed this up?
/bin/ls -l /usr/bin/snmp*
output should be good.-rwxr-xr-x
[root@brain ~]# /bin/ls -l /usr/bin/snmp* -rwxr-xr-x 1 root root 14032 Mar 22 04:45 /usr/bin/snmpbulkget -rwxr-xr-x 1 root root 16832 Mar 22 04:45 /usr/bin/snmpbulkwalk -rwxr-xr-x 1 root root 26137 Mar 22 04:45 /usr/bin/snmpconf -rwxr-xr-x 1 root root 23232 Mar 22 04:45 /usr/bin/snmpdelta -rwxr-xr-x 1 root root 16744 Mar 22 04:45 /usr/bin/snmpdf -rwxr-xr-x 1 root root 13920 Mar 22 04:45 /usr/bin/snmpget -rwxr-xr-x 1 root root 13920 Mar 22 04:45 /usr/bin/snmpgetnext lrwxrwxrwx 1 root root 8 Jun 5 08:01 /usr/bin/snmpinform -> snmptrap -rwxr-xr-x 1 root root 54344 Mar 22 04:45 /usr/bin/snmpnetstat -rwxr-xr-x 1 root root 14496 Mar 22 04:45 /usr/bin/snmpset -rwxr-xr-x 1 root root 17624 Mar 22 04:45 /usr/bin/snmpstatus -rwxr-xr-x 1 root root 24968 Mar 22 04:45 /usr/bin/snmptable -rwxr-xr-x 1 root root 18832 Mar 22 04:45 /usr/bin/snmptest -rwxr-xr-x 1 root root 18016 Mar 22 04:45 /usr/bin/snmptranslate -rwxr-xr-x 1 root root 17152 Mar 22 04:45 /usr/bin/snmptrap -rwxr-xr-x 1 root root 37560 Mar 22 04:45 /usr/bin/snmpusm -rwxr-xr-x 1 root root 32096 Mar 22 04:45 /usr/bin/snmpvacm -rwxr-xr-x 1 root root 16824 Mar 22 04:45 /usr/bin/snmpwalk
Appreciate the help with this
@WaterByWind curious if you were able to reproduce my issue?
a bunch of tinkering today and the dashboard for edgemax is working now. upgraded telegraf to 1.3.4. added a entry to /etc/hosts for the agent. thanks again
I actually did have similar happen on an Ubuntu install after updating Telegraf. It appeared the telegraf source itself was broken but I didn't get too far into the code to confirm and submit an issue with fix.
Glad it works for you now - I'll do another update to confirm if this is resolved for me too. I had updated the start script temporarily as a workaround to set a proper $PATH for the interim.
Glad I wasn't the only that had that problem.
Question - what would be the correct object/OID to get cumulative transfer rate?
I'm receiving the same error right now:
Error in plugin [inputs.snmp]: initializing table : translating: exec: "snmptranslate": executable file not found in $PATH
Unable to solve it and I'm unsure what @doodie is doing when he said
added a entry to /etc/hosts for the agent. thanks again
Telegraf 1.5.2 Confirmed atleast that Telegraf is writing to influxdb for what it's worth. (In regards to having Telegraf setup properly)
Any ideas?
Edit: Solution was that I had not installed SNMP prior to this as I thought, along with a follow up error being I had not placed the mibs files in the /usr/shares/telegraf/mibs folder
@robinekenheim were you able to figure it out?
@robinekenheim - you're good then, yes?
I do see this here and there and so far the quick fix is to edit the start script for telegraf to ensure it has a proper $PATH set that includes the needed utilities. I haven't had a chance to dig deeper and open an issue for telegraf.
Hey yeah, it was resolved.
Solution was that I had not installed SNMP prior to this as I thought, along with a follow up error being I had not placed the mibs files in the /usr/shares/telegraf/mibs folder
Thanks for getting back here :) And it looks great in Grafana now! Kudos
what is the steps to resolve it?
Hi @WaterByWind ,
New to Grafana/Telegraf/Influx. Having some problems with SNMP with the edgerouter dashboard. I have everything configured properly i believe. Another set of eyes and any suggestions would be great.
Error Log
2017-06-11T18:43:00Z E! Error in plugin [inputs.snmp]: initializing table : translating: exec: "snmptranslate": executable file not found in $PATH 2017-06-11T18:43:00Z D! Output [influxdb] buffer fullness: 0 / 10000 metrics. 2017-06-11T18:43:10Z D! Output [influxdb] buffer fullness: 0 / 10000 metrics. 2017-06-11T18:43:20Z D! Output [influxdb] buffer fullness: 0 / 10000 metrics. 2017-06-11T18:43:30Z D! Output [influxdb] buffer fullness: 0 / 10000 metrics. 2017-06-11T18:43:40Z D! Output [influxdb] buffer fullness: 0 / 10000 metrics. 2017-06-11T18:43:50Z D! Output [influxdb] buffer fullness: 0 / 10000 metrics. 2017-06-11T18:44:00Z E! Error in plugin [inputs.snmp]: initializing table : translating: exec: "snmptranslate": executable file not found in $PATH
Telegraf
[root@brain snmp]# telegraf version Telegraf v1.3.1 (git: release-1.3 f93615672b02a41d9bc867bd92bf31c1d777989b)
Influx
[root@brain snmp]# influx version Connected to http://localhost:8086 version 1.2.4 InfluxDB shell version: 1.2.4
Inputs
[[inputs.snmp]] ; List of agents to poll agents = [ "10.0.1.1:161" ] ; Polling interval interval = "60s" ; Timeout for each SNMP query. timeout = "5s" ; Number of retries to attempt within timeout. retries = 3 ; SNMP version, values can be 1, 2, or 3 version = 2 ; SNMP community string. community = "blah" ; The GETBULK max-repetitions parameter max_repetitions = 50
Influx Output
[[outputs.influxdb]] urls = ["http://127.0.0.1:8086"] # required database = "telegraf" # required retention_policy = "" write_consistency = "any" timeout = "5s" user_agent = "telegraf"
Snmpwalk
[root@brain snmp]# snmpwalk -c something -v 2c 10.0.1.1 SNMPv2-MIB::sysName.0 SNMPv2-MIB::sysName.0 = STRING: doodie [root@brain snmp]# snmpwalk -c something -v 2c 10.0.1.1 HOST-RESOURCES-MIB::hrSystemNumUsers.0 HOST-RESOURCES-MIB::hrSystemNumUsers.0 = Gauge32: 0 [root@brain snmp]# snmpwalk -c something -v 2c 10.0.1.1 HOST-RESOURCES-MIB::hrDeviceIndex HOST-RESOURCES-MIB::hrDeviceIndex.196608 = INTEGER: 196608 HOST-RESOURCES-MIB::hrDeviceIndex.196609 = INTEGER: 196609 HOST-RESOURCES-MIB::hrDeviceIndex.262145 = INTEGER: 262145 HOST-RESOURCES-MIB::hrDeviceIndex.262146 = INTEGER: 262146 HOST-RESOURCES-MIB::hrDeviceIndex.262147 = INTEGER: 262147 HOST-RESOURCES-MIB::hrDeviceIndex.262148 = INTEGER: 262148 HOST-RESOURCES-MIB::hrDeviceIndex.262149 = INTEGER: 262149 HOST-RESOURCES-MIB::hrDeviceIndex.262153 = INTEGER: 262153 HOST-RESOURCES-MIB::hrDeviceIndex.262154 = INTEGER: 262154 HOST-RESOURCES-MIB::hrDeviceIndex.262155 = INTEGER: 262155 HOST-RESOURCES-MIB::hrDeviceIndex.262156 = INTEGER: 262156 HOST-RESOURCES-MIB::hrDeviceIndex.786432 = INTEGER: 786432