Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNMP Trap Input : Error resolving OID oid=.1.3.6.1.2.1.1.3.0, command timed out #11428

Closed
CamilleLOISEAU opened this issue Jun 30, 2022 · 4 comments · Fixed by #11534
Closed
Assignees
Labels
area/snmp bug unexpected problem or unintended behavior

Comments

@CamilleLOISEAU
Copy link

CamilleLOISEAU commented Jun 30, 2022

Relevant telegraf.conf

###############################################################################
#                            AGENT PLUGINS                                    #
###############################################################################
[agent]
	interval = "30s"
	round_interval = true
	metric_batch_size = 1000
	metric_buffer_limit = 10000
	debug = false
	quiet = false
	logtarget = "file"
	logfile = "C:/Program Files/InfluxData/telegraf/log.txt"
	logfile_rotation_interval = "1h"
	hostname = ""
	omit_hostname = true
	
###############################################################################
#                            OUTPUT PLUGINS                                   #
###############################################################################
	
# output for the SNMP
[[outputs.influxdb]]
	urls = ["http://127.0.0.1:8086"]
	database = "SNMP"
	username = "admin"
	password = "admin"
	retention_policy = ""
	[outputs.influxdb.tagpass]
		source = ["SNMP"]
	
###############################################################################
#                            INPUT PLUGINS                                    #
###############################################################################

[[inputs.snmp]]
  agents = ["udp://10.0.0.2:161"]
  
  [inputs.snmp.tags]
	source = "SNMP"
	
  [[inputs.snmp.field]]
    oid = "RFC1213-MIB::sysUpTime.0"
    name = "uptime"

  [[inputs.snmp.field]]
    oid = "RFC1213-MIB::sysName.0"
    name = "device"
    is_tag = true

 [[inputs.snmp.field]]
    oid = "RFC1213-MIB::sysDescr.0"
    name = "description"
    is_tag = true

 [[inputs.snmp.field]]
    oid = ".1.3.6.1.4.1.16177.1.200.1.1.0"
    name = "ModelName"
    is_tag = true
	
 [[inputs.snmp.field]]
    oid = ".1.3.6.1.4.1.16177.1.200.3.15.1.0"
    name = "WirelessPacketState"
	
 [[inputs.snmp.field]]
    oid = ".1.3.6.1.4.1.16177.1.200.3.15.2.0"
    name = "CurrentSessionTime"
	
 [[inputs.snmp.field]]
    oid = ".1.3.6.1.4.1.16177.1.200.7.1.0"
    name = "VRRPState"

  [[inputs.snmp.field]]
    name = "wirelessRFLevel"
    oid = ".1.3.6.1.4.1.16177.1.200.3.3"
	
[[inputs.snmp_trap]]
	service_address = "udp://:162"
	path = ["C:/usr/MIBs"]
	
	[[inputs.snmp_trap.tags]]
		source = "SNMP"

Logs from Telegraf

2022-06-30T12:43:47Z I! Starting Telegraf 1.23.0
2022-06-30T12:43:47Z I! Loaded inputs: snmp snmp_trap
2022-06-30T12:43:47Z I! Loaded aggregators: 
2022-06-30T12:43:47Z I! Loaded processors: 
2022-06-30T12:43:47Z I! Loaded outputs: influxdb
2022-06-30T12:43:47Z I! Tags enabled: 
2022-06-30T12:43:47Z I! [agent] Config: Interval:30s, Quiet:false, Hostname:"", Flush Interval:10s
2022-06-30T12:43:51Z I! [inputs.snmp_trap] Listening on udp://:162
2022-06-30T12:44:03Z E! [inputs.snmp_trap] Error resolving OID oid=.1.3.6.1.2.1.1.3.0, source=10.0.0.51: command timed out

System info

Telegraf 1.23.0, Windows 10

Docker

No response

Steps to reproduce

  1. Install telegraf 1.23.0
  2. Use the telegraf.conf file specified
  3. Emit any type of snmp trap on the 162 port directed to the adress of the computer running telegraf
    ...

Expected behavior

Receive the information contained in the snmp trap that has been sent (possible to vizualize it in Grafana or Chronograf when reading data of the InfluxDb Database)

Actual behavior

Error raised in telegraf in log file, no data is written in the InfluxDb database.

Additional info

Tried downloading MIB of relevant equipement we are trying to communicate with (westermo MRD455) and of RFC1213-MIB, and pointing to folder containing them in "path" of [input.snmp.trap]

We verified that snmptranslate works properly by calling it directly in console command to resolved the oid specified in the logs with the following command : snmptranslate .1.3.6.1.2.1.1.3.0

@CamilleLOISEAU CamilleLOISEAU added the bug unexpected problem or unintended behavior label Jun 30, 2022
@MyaLongmire MyaLongmire self-assigned this Jun 30, 2022
@MyaLongmire
Copy link
Contributor

@Hipska Do you have any ideas on this?

@ruijm
Copy link

ruijm commented Jul 4, 2022

I have also the same problem on Ubuntu, with Grafana OSS and Telegraf 1.23

@Hipska
Copy link
Contributor

Hipska commented Jul 5, 2022

Did you try with changing the agent config flag snmp_translator?

Please also mention the exact command you have run to test snmptranslate.

@CamilleLOISEAU
Copy link
Author

i've tried specifying both "netsnmp" and "gosmi" in the snmp_translator flag, neither worked, i had the same error as before with the "netsmp" parameter :
image

And with the gosmi parameter i got these errors, and wasn't able to receive traps :
image

As for the command i used to test the snmptranslate, i simply typed the following in a Windows console :
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/snmp bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants