telegraf: Telegraf 1.21.0 - issue parsing mibs and panic with SNMP plugin

Relevent telegraf.conf

[[inputs.snmp]]
  # List of agents to poll
  agents = [ "tardis.ip", "flash.ip", "dreamer.ip", "batman.ip", "millenniumfalcon.ip" , "area51.ip"]
  # Polling interval
  interval = "60s"
  # Timeout for each SNMP query.
  timeout = "10s"
  # Number of retries to attempt within timeout.
  retries = 3
  # SNMP version
  version = 2
  # SNMP community string.
  community = "public"
  # Measurement name
  name = "snmp.UAP"
  ##
  ## System Details
  ##
  #  System name (hostname)

System info

Raspbian, Telegraf 1.21.0

Docker

no

Steps to reproduce

Expected behavior

should work as before with 1.20.4

MIB file unchanged: pi@raspberrypidns:/etc/telegraf/telegraf.d $ ll /var/lib/mibs/ietf/DPI20-MIB -rw-r–r-- 1 root root 1683 25. Dez 2020 /var/lib/mibs/ietf/DPI20-MIB

Actual behavior

Dez 16 14:52:13 raspberrypidns telegraf[18888]: Parse module: /var/lib/mibs/ietf/DPI20-MIB:9:4: unexpected “ibm” (expected “;”) Dez 16 14:52:13 raspberrypidns telegraf[18888]: 2021-12-16T13:52:13Z W! [inputs.snmp] Could not load module at DPI20-MIB Dez 16 14:52:16 raspberrypidns telegraf[18888]: Parse module: /var/lib/mibs/ietf/HPR-MIB:494:30: unexpected “HprRtpCounter” (expected “}”) Dez 16 14:52:16 raspberrypidns telegraf[18888]: 2021-12-16T13:52:16Z W! [inputs.snmp] Could not load module at HPR-MIB

Additional info

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 38 (18 by maintainers)

Most upvoted comments

We are planning to release 1.21.2 this week.

@tuxianerDE Wohoo! Thank you for testing it. I will try to get it cleaned up and merged in for the next patch release.

Since the PR has already been merged, do you know when the next release/Debian package will be shipped? We currently need to manually downgrade the package on each newly deployed Debian system.

Would it be possible to withdraw the 1.21.1 package from the Debian Repository in the meantime?

A pr for the marshal issue is up! I am having some community members test it out and hoping to have it merged by the end of the week. I appreciate everyone’s patience while this got sorted out 😃

Happy Holidays 🎉

Dear @MyaLongmire ,

Many thanks for all your efforts, much appreciated. I rolled back to 1.20.4 and it’s working as before (obviously) and I can live with that for the time being. Take your time, enjoy the holiday season and stay healthy.

Mike

Raised #10305 =)

I’ve just noticed some MIBs don’t seem to be getting processed correctly.

Dec 19 10:14:00 mgmtnuc telegraf[505949]: 2021-12-18T21:14:00Z E! [inputs.snmp] Error in plugin: agent 192.168.62.11:161: performing get on field signal: marshal: marshalPDU: unable to marshal varbind list: unable to marshal OID: Invalid object identifier
Dec 19 10:14:00 mgmtnuc telegraf[505949]: 2021-12-18T21:14:00Z E! [inputs.snmp] Error in plugin: agent 192.168.60.122:161: performing get on field model: marshal: marshalPDU: unable to marshal varbind list: unable to marshal OID: Invalid object identifier
Dec 19 10:14:10 mgmtnuc telegraf[505949]: 2021-12-18T21:14:10Z E! [inputs.snmp] Error in plugin: agent 192.168.60.1:161: performing get on field cpu: marshal: marshalPDU: unable to marshal varbind list: unable to marshal OID: Invalid object identifier
Dec 19 10:14:10 mgmtnuc telegraf[505949]: 2021-12-18T21:14:10Z E! [inputs.snmp] Error in plugin: agent 192.168.62.10:161: performing get on field signal: marshal: marshalPDU: unable to marshal varbind list: unable to marshal OID: Invalid object identifier
Dec 19 10:14:10 mgmtnuc telegraf[505949]: 2021-12-18T21:14:10Z E! [inputs.snmp] Error in plugin: agent 192.168.62.11:161: performing get on field signal: marshal: marshalPDU: unable to marshal varbind list: unable to marshal OID: Invalid object identifier

Should I raise a separate issue?

@MyaLongmire, the PR also fixes the issue for me. Thanks for your help!

@MyaLongmire had the same issue. I can confirm installing the draft PR removes the panic and I see data flowing in.