Vasa
November 25, 2023, 11:47am
1
I am sending traps from a Cisco WLC and telegraf is reporting that OID cannot be translated:
Telegraf logs:
ubuntu@ip-172-31-21-211:/$ journalctl -xeu telegraf.service
Nov 25 11:35:21 ip-172-31-21-211 telegraf[12399]: 2023-11-25T11:35:21Z I! [inputs.snmp_trap] Listening on udp://:162
Nov 25 11:35:30 ip-172-31-21-211 telegraf[12399]: 2023-11-25T11:35:30Z E! [inputs.snmp_trap] Error resolving OID oid=.1.3.6.1.2.1.1.3.0, source=x.x.x.x: not found
lines 3233-3293/3293 (END)
Telegraf config
[[inputs.snmp_trap]]
# example: "udp://:16200"
service_address = "udp://:162"
path = ["/home/ubuntu/mibs"]
version = "2c"
I have the mib files of this device in the folder:
ubuntu@ip-172-31-21-212:/$ ls /home/ubuntu/mibs -la
total 33064
drwxrwxr-x 2 ubuntu ubuntu 36864 Nov 25 10:55 .
drwxr-x--- 8 ubuntu ubuntu 4096 Nov 25 11:32 ..
-rw-rw-r-- 1 ubuntu ubuntu 16206 Nov 25 10:54 ADSL-DMT-LINE-MIB-V1SMI.my
-rw-rw-r-- 1 ubuntu ubuntu 24097 Nov 25 10:54 ADSL-DMT-LINE-MIB.my
-rw-rw-r-- 1 ubuntu ubuntu 129186 Nov 25 10:54 ADSL-LINE-MIB-V1SMI.my
-rw-rw-r-- 1 ubuntu ubuntu 159225 Nov 25 10:54 ADSL-LINE-MIB.my
-rw-rw-r-- 1 ubuntu ubuntu 14 Nov 25 10:54 AIRESPACE-WIRELESS-CAPABILITY-V1SMI.my
-rw-rw-r-- 1 ubuntu ubuntu 68315 Nov 25 10:54 AIRESPACE-WIRELESS-CAPABILITY.my
-rw-rw-r-- 1 ubuntu ubuntu 513788 Nov 25 10:54 AIRESPACE-WIRELESS-MIB-V1SMI.my
-rw-rw-r-- 1 ubuntu ubuntu 682630 Nov 25 10:55 AIRESPACE-WIRELESS-MIB.my
..
.
I tried changing snmp_translator under agent, it doesnt work (same error), even though I am able to translate it:
[agent]
snmp_translator = "netsnmp"
ubuntu@ip-172-31-21-211:~$ snmptranslate .1.3.6.1.2.1.1.3.0
iso.3.6.1.2.1.1.3.0
I am not interested in translating anything really, I just want to receive the input and I process it later myself. Is there a way to disable translation?
Vasa
November 25, 2023, 11:59am
2
I also tried sending a manual test trap from the same host:
snmptrap -v 2c -c public localhost:162 '' 1.3.6.1.4.1.8072.2.3.0.1 1.3.6.1.4.1.8072.2.3.2.1 i 123456
And I get the same error on Telegraf:
ubuntu@ip-172-31-21-211:~$ journalctl -xeu telegraf.service
Nov 25 11:57:24 ip-172-31-21-212 telegraf[12469]: 2023-11-25T11:57:24Z E! [inputs.snmp_trap] Error resolving OID oid=.1.3.6.1.2.1.1.3.0, source=127.0.0.1: not found
Anaisdg
November 27, 2023, 8:36pm
3
Hello @Vasa ,
I’m not sure but it looks similar to:
influxdata:master
← peekeri:exec_glob
opened 09:05AM - 03 May 16 UTC
Allow using glob pattern in the command list in configuration. This enables for
… example placing all commands in a single directory and using /path/to/dir/*.sh
as one of the commands to run all shell scripts in that directory.
Glob patterns are applied on every run of the commands, so matching commands can
be added without restarting telegraf.
This is a second try for this change. The previous PR #1127 broke existing functionality in two ways:
- commands with arguments got ignored
- commands in PATH got ignored
These issues are addressed now by:
- splitting the command into actual command and arguments before globbing
- using the command as-is in case glob returns no matches.
Added also a couple of tests to see that those are actually fixed. Not sure though if we can assume presence of `/bin/echo`?
And
Hi, I am having issues with telegraf snmp_trap.
Telegraf 1.22.1
Error:
[inputs.snmp_trap] Error resolving OID oid=.1.3.6.1.2.1.1.3.0, source=10.16.8.33: command timed out
Telegraf conf:
[[inputs.snmp_trap]]
service_address = “udp://:162”
path = ["/usr/share/snmp/mibs/UCS_Cseries2.0"]
MIB:
ll /usr/share/snmp/mibs/UCS_Cseries2.0
total 3612
-rw-r–r-- 1 506 506 16468 Jun 16 2014 CISCO-SMI.my
-rw-r–r-- 1 506 506 94342 Jun 16 2014 CISCO-TC.my
-rw-r–r-- 1 506 506 948239 Jun 16 2014 CI…
What version of telegraf are you using?
Vasa
November 28, 2023, 12:44am
4
Anaisdg:
sure but it looks
Currently running 1.8.10.
Looks identical to the #2 , which should have be fixed in the release I am running.