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

Telegraf 1.21.0 - go panic with SNMP plugin #10298

Closed
henriknoerr opened this issue Dec 17, 2021 · 44 comments · Fixed by #10299
Closed

Telegraf 1.21.0 - go panic with SNMP plugin #10298

henriknoerr opened this issue Dec 17, 2021 · 44 comments · Fixed by #10299
Assignees
Labels
area/snmp bug unexpected problem or unintended behavior regression something that used to work, but is now broken

Comments

@henriknoerr
Copy link

henriknoerr commented Dec 17, 2021

Relevent telegraf.conf

Dec 17 16:38:04 hostname systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Starting Telegraf 1.21.1
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Loaded inputs: cpu disk internal mem net ping snmp (352x) swap
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Loaded aggregators:
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Loaded processors: converter
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Loaded outputs: influxdb_v2 (2x)
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Tags enabled: host=s
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! [agent] Config: Interval:2m0s, Quiet:false, Hostname:"", Flush Interval:10s
Dec 17 16:38:06 hostname telegraf[306402]: panic: runtime error: index out of range [1] with length 1
Dec 17 16:38:06 hostname telegraf[306402]: goroutine 1 [running]:
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/internal/snmp.SnmpTranslateCall({0xc00158ca81, 0x27})
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/internal/snmp/translate.go:153 +0xbfd
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/plugins/inputs/snmp.SnmpTranslate({0xc00158ca81, 0x27})
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:877 +0x170
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Field).init(0xc000766708)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:263 +0x73
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).Init(0xc0016ede00)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:169 +0xd8
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Snmp).Init(0xc0009f7340)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:110 +0x127
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/models.(*RunningInput).Init(0xc000e4b758)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/models/running_input.go:82 +0x35
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/agent.(*Agent).initPlugins(0xc000184ba8)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/agent/agent.go:189 +0x96
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/agent.(*Agent).Run(0xc000184ba8, {0x57e5688, 0xc000acc380})
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/agent/agent.go:105 +0x185
Dec 17 16:38:06 hostname telegraf[306402]: main.runAgent({0x57e5688, 0xc000acc380}, {0x837a278, 0x0, 0x0}, {0x837a278, 0x0, 0x0})
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:312 +0xc57
Dec 17 16:38:06 hostname telegraf[306402]: main.reloadLoop({0x837a278, 0x0, 0x0}, {0x837a278, 0x0, 0x0})
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:147 +0x28a
Dec 17 16:38:06 hostname telegraf[306402]: main.run(...)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf_posix.go:8
Dec 17 16:38:06 hostname telegraf[306402]: main.main()
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:485 +0xa9a
Dec 17 16:38:06 hostname systemd[1]: telegraf.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 17 16:38:06 hostname systemd[1]: telegraf.service: Failed with result 'exit-code'.
Dec 17 16:38:07 hostname systemd[1]: telegraf.service: Service RestartSec=100ms expired, scheduling restart.
Dec 17 16:38:07 hostname systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 26.
Dec 17 16:38:07 hostname systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.

System info

Telegraf 1.21.1

Docker

No response

Steps to reproduce

  1. After the agent restarted it restarts every 100ms because of the error "panic: runtime error: index out of range [1] with length 1"
  2. rollback to 1.21.0 does not fix the issue
  3. rollback to 1.20.4 fixes the issue

Expected behavior

to work like 1.20.4

Actual behavior

crashes

Additional info

Not sure if I have a specific snmp MIB file that causes this, I cannot see any reference in the trace what causes it besides snmptranslate

@henriknoerr henriknoerr added the bug unexpected problem or unintended behavior label Dec 17, 2021
@powersj
Copy link
Contributor

powersj commented Dec 17, 2021

Can you please provide your config as well?

@henriknoerr
Copy link
Author

henriknoerr commented Dec 17, 2021

I have 300+ .conf files representing each device I monitor.

The telegraf.conf is pretty basic

[agent]
  interval = "120s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "0s"
  flush_interval = "10s"
  flush_jitter = "0s"
  precision = ""

  hostname = ""
  omit_hostname = false

[[outputs.influxdb_v2]]
  urls = ["http://:8086"]
  token = ""
  organization = ""
  bucket = ""

 [[outputs.influxdb_v2]]
   urls = ["http://:8086"]
   token = "=="
   organization = ""
   bucket = ""

[[inputs.internal]]
  collect_memstats = true

[[inputs.cpu]]
  percpu = true
  totalcpu = true
  collect_cpu_time = false
  report_active = false

[[inputs.disk]]
  ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]

[[inputs.mem]]

[[inputs.net]]

[[inputs.swap]]

@powersj
Copy link
Contributor

powersj commented Dec 17, 2021

The config causing the panic will be in one of the snmp configs, so the above doesn't help. It would be very helpful to have a config that reproduces this.

The panic itself is from: https://github.com/influxdata/telegraf/blob/master/internal/snmp/translate.go#L153

Looks like it is splitting the oid on :: and trying to take the second value

@MyaLongmire thoughts?

@MyaLongmire
Copy link
Contributor

MyaLongmire commented Dec 17, 2021

Please post any the oids you are monitoring that have the :: so I can test it please

@MyaLongmire
Copy link
Contributor

If you can run the artifacts from this pr it should error instead of panic and tell you which mib it is having trouble parsing.

@larsjohnson
Copy link

larsjohnson commented Dec 17, 2021

I don't know if this is the same issue, but I see similiarities and thought i would post it here. Let me know though if I should post it as a new issue, or if you would like more information. This same telegraf.conf has been used for around a year without any issue with the previous telegraf versions. Thanks for you help and working on a great product.

Telegraph installation on a raspberryPi running Ubuntu.
telegraf/unknown,now 1.21.1-1 arm64 [installed]

Relevant logs:

Dec 17 14:58:53 hostname systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
Dec 17 14:58:53 hostname telegraf[3575]: 2021-12-17T21:58:53Z I! Starting Telegraf 1.21.1
Dec 17 14:58:53 hostname telegraf[3575]: 2021-12-17T21:58:53Z I! Loaded inputs: cpu disk diskio file kernel mem net netstat processes snmp swap system
Dec 17 14:58:53 hostname telegraf[3575]: 2021-12-17T21:58:53Z I! Loaded aggregators:
Dec 17 14:58:53 hostname telegraf[3575]: 2021-12-17T21:58:53Z I! Loaded processors:
Dec 17 14:58:53 hostname telegraf[3575]: 2021-12-17T21:58:53Z I! Loaded outputs: influxdb
Dec 17 14:58:53 hostname telegraf[3575]: 2021-12-17T21:58:53Z I! Tags enabled: host=hostname
Dec 17 14:58:53 hostname telegraf[3575]: 2021-12-17T21:58:53Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"hostname", Flush Interval:10s
Dec 17 14:58:56 hostname telegraf[3575]: Parse module: /usr/share/snmp/mibs/site/miblist.txt:1:12: no match found for .
Dec 17 14:58:56 hostname telegraf[3575]: 2021-12-17T21:58:56Z W! [inputs.snmp] Could not load module at miblist.txt
Dec 17 14:59:03 hostname telegraf[3575]: Parse module: /var/lib/snmp/mibs/ietf/DPI20-MIB:9:4: unexpected "ibm" (expected ";")
Dec 17 14:59:03 hostname telegraf[3575]: 2021-12-17T21:59:03Z W! [inputs.snmp] Could not load module at DPI20-MIB
Dec 17 14:59:07 hostname telegraf[3575]: Parse module: /var/lib/snmp/mibs/ietf/HPR-MIB:494:30: unexpected "HprRtpCounter" (expected "}")
Dec 17 14:59:07 hostname telegraf[3575]: 2021-12-17T21:59:07Z W! [inputs.snmp] Could not load module at HPR-MIB
Dec 17 14:59:15 hostname telegraf[3575]: Parse module: /var/lib/snmp/mibs/ietf/SNMPv2-PDU:73:1: unexpected "max-bindings" (expected "END")
Dec 17 14:59:15 hostname telegraf[3575]: 2021-12-17T21:59:15Z W! [inputs.snmp] Could not load module at SNMPv2-PDU
Dec 17 14:59:17 hostname telegraf[3575]: Parse module: /var/lib/snmp/mibs/ietf/TCPIPX-MIB:63:12: unexpected "tcpIpxConnLocalPort" (expected "}")
Dec 17 14:59:17 hostname telegraf[3575]: 2021-12-17T21:59:17Z W! [inputs.snmp] Could not load module at TCPIPX-MIB
Dec 17 14:59:18 hostname telegraf[3575]: panic: strconv.ParseUint: parsing "": invalid syntax
Dec 17 14:59:18 hostname telegraf[3575]: goroutine 1 [running]:
Dec 17 14:59:18 hostname telegraf[3575]: github.com/sleepinggenius2/gosmi/types.OidMustFromString(...)
Dec 17 14:59:18 hostname telegraf[3575]:         /go/pkg/mod/github.com/sleepinggenius2/[email protected]/types/oid.go:91
Dec 17 14:59:18 hostname telegraf[3575]: github.com/influxdata/telegraf/internal/snmp.GetIndex({0x4fab394, 0x1}, {0x4000b95128, 0xe})
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/internal/snmp/translate.go:126 +0x348
Dec 17 14:59:18 hostname telegraf[3575]: github.com/influxdata/telegraf/plugins/inputs/snmp.snmpTableCall({0x4000e52641, 0x15})
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:837 +0xcc
Dec 17 14:59:18 hostname telegraf[3575]: github.com/influxdata/telegraf/plugins/inputs/snmp.snmpTable({0x4000e52641, 0x15})
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:820 +0x1b0
Dec 17 14:59:18 hostname telegraf[3575]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).initBuild(0x4000a00860)
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:192 +0x40
Dec 17 14:59:18 hostname telegraf[3575]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).Init(0x4000a00860)
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:162 +0x7c
Dec 17 14:59:18 hostname telegraf[3575]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Snmp).Init(0x400038c000)
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:110 +0x118
Dec 17 14:59:18 hostname telegraf[3575]: github.com/influxdata/telegraf/models.(*RunningInput).Init(0x4000e5d400)
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/models/running_input.go:82 +0x58
Dec 17 14:59:18 hostname telegraf[3575]: github.com/influxdata/telegraf/agent.(*Agent).initPlugins(0x400011c400)
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/agent/agent.go:189 +0x74
Dec 17 14:59:18 hostname telegraf[3575]: github.com/influxdata/telegraf/agent.(*Agent).Run(0x400011c400, {0x50f04e8, 0x40001bbe00})
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/agent/agent.go:105 +0x140
Dec 17 14:59:18 hostname telegraf[3575]: main.runAgent({0x50f04e8, 0x40001bbe00}, {0x7b610f8, 0x0, 0x0}, {0x7b610f8, 0x0, 0x0})
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:312 +0xcf0
Dec 17 14:59:18 hostname telegraf[3575]: main.reloadLoop({0x7b610f8, 0x0, 0x0}, {0x7b610f8, 0x0, 0x0})
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:147 +0x220
Dec 17 14:59:18 hostname telegraf[3575]: main.run(...)
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf_posix.go:8
Dec 17 14:59:18 hostname telegraf[3575]: main.main()
Dec 17 14:59:18 hostname telegraf[3575]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:485 +0xcb8
Dec 17 14:59:18 hostname systemd[1]: telegraf.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 17 14:59:18 hostname systemd[1]: telegraf.service: Failed with result 'exit-code'.
Dec 17 14:59:18 hostname systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 6.
Dec 17 14:59:18 hostname systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.
Dec 17 14:59:18 hostname systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
Dec 17 14:59:18 hostname telegraf[3699]: 2021-12-17T21:59:18Z I! Starting Telegraf 1.21.1
Dec 17 14:59:18 hostname telegraf[3699]: 2021-12-17T21:59:18Z I! Loaded inputs: cpu disk diskio file kernel mem net netstat processes snmp swap system
Dec 17 14:59:18 hostname telegraf[3699]: 2021-12-17T21:59:18Z I! Loaded aggregators:
Dec 17 14:59:18 hostname telegraf[3699]: 2021-12-17T21:59:18Z I! Loaded processors:
Dec 17 14:59:18 hostname telegraf[3699]: 2021-12-17T21:59:18Z I! Loaded outputs: influxdb
Dec 17 14:59:18 hostname telegraf[3699]: 2021-12-17T21:59:18Z I! Tags enabled: host=hostname
Dec 17 14:59:18 hostname telegraf[3699]: 2021-12-17T21:59:18Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"hostname", Flush Interval:10s
Dec 17 14:59:21 hostname telegraf[3699]: Parse module: /usr/share/snmp/mibs/site/miblist.txt:1:12: no match found for .
Dec 17 14:59:21 hostname telegraf[3699]: 2021-12-17T21:59:21Z W! [inputs.snmp] Could not load module at miblist.txt
Dec 17 14:59:28 hostname telegraf[3699]: Parse module: /var/lib/snmp/mibs/ietf/DPI20-MIB:9:4: unexpected "ibm" (expected ";")
Dec 17 14:59:28 hostname telegraf[3699]: 2021-12-17T21:59:28Z W! [inputs.snmp] Could not load module at DPI20-MIB
Dec 17 14:59:31 hostname telegraf[3699]: Parse module: /var/lib/snmp/mibs/ietf/HPR-MIB:494:30: unexpected "HprRtpCounter" (expected "}")
Dec 17 14:59:31 hostname telegraf[3699]: 2021-12-17T21:59:31Z W! [inputs.snmp] Could not load module at HPR-MIB
Dec 17 14:59:39 hostname telegraf[3699]: Parse module: /var/lib/snmp/mibs/ietf/SNMPv2-PDU:73:1: unexpected "max-bindings" (expected "END")
Dec 17 14:59:39 hostname telegraf[3699]: 2021-12-17T21:59:39Z W! [inputs.snmp] Could not load module at SNMPv2-PDU
Dec 17 14:59:40 hostname telegraf[3699]: Parse module: /var/lib/snmp/mibs/ietf/TCPIPX-MIB:63:12: unexpected "tcpIpxConnLocalPort" (expected "}")
Dec 17 14:59:40 hostname telegraf[3699]: 2021-12-17T21:59:40Z W! [inputs.snmp] Could not load module at TCPIPX-MIB
Dec 17 14:59:41 hostname telegraf[3699]: panic: strconv.ParseUint: parsing "": invalid syntax
Dec 17 14:59:41 hostname telegraf[3699]: goroutine 1 [running]:
Dec 17 14:59:41 hostname telegraf[3699]: github.com/sleepinggenius2/gosmi/types.OidMustFromString(...)
Dec 17 14:59:41 hostname telegraf[3699]:         /go/pkg/mod/github.com/sleepinggenius2/[email protected]/types/oid.go:91
Dec 17 14:59:41 hostname telegraf[3699]: github.com/influxdata/telegraf/internal/snmp.GetIndex({0x4fab394, 0x1}, {0x400405f128, 0xe})
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/internal/snmp/translate.go:126 +0x348
Dec 17 14:59:41 hostname telegraf[3699]: github.com/influxdata/telegraf/plugins/inputs/snmp.snmpTableCall({0x4000ace6a1, 0x15})
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:837 +0xcc
Dec 17 14:59:41 hostname telegraf[3699]: github.com/influxdata/telegraf/plugins/inputs/snmp.snmpTable({0x4000ace6a1, 0x15})
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:820 +0x1b0
Dec 17 14:59:41 hostname telegraf[3699]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).initBuild(0x4000e78060)
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:192 +0x40
Dec 17 14:59:41 hostname telegraf[3699]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).Init(0x4000e78060)
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:162 +0x7c
Dec 17 14:59:41 hostname telegraf[3699]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Snmp).Init(0x40001d1b80)
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:110 +0x118
Dec 17 14:59:41 hostname telegraf[3699]: github.com/influxdata/telegraf/models.(*RunningInput).Init(0x4000adeaa0)
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/models/running_input.go:82 +0x58
Dec 17 14:59:41 hostname telegraf[3699]: github.com/influxdata/telegraf/agent.(*Agent).initPlugins(0x400000ebf0)
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/agent/agent.go:189 +0x74
Dec 17 14:59:41 hostname telegraf[3699]: github.com/influxdata/telegraf/agent.(*Agent).Run(0x400000ebf0, {0x50f04e8, 0x40007535c0})
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/agent/agent.go:105 +0x140
Dec 17 14:59:41 hostname telegraf[3699]: main.runAgent({0x50f04e8, 0x40007535c0}, {0x7b610f8, 0x0, 0x0}, {0x7b610f8, 0x0, 0x0})
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:312 +0xcf0
Dec 17 14:59:41 hostname telegraf[3699]: main.reloadLoop({0x7b610f8, 0x0, 0x0}, {0x7b610f8, 0x0, 0x0})
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:147 +0x220
Dec 17 14:59:41 hostname telegraf[3699]: main.run(...)
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf_posix.go:8
Dec 17 14:59:41 hostname telegraf[3699]: main.main()
Dec 17 14:59:41 hostname telegraf[3699]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:485 +0xcb8
Dec 17 14:59:41 hostname systemd[1]: telegraf.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 17 14:59:41 hostname systemd[1]: telegraf.service: Failed with result 'exit-code'.
Dec 17 14:59:42 hostname systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 7.
Dec 17 14:59:42 hostname systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.
Dec 17 14:59:42 hostname systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
Dec 17 14:59:42 hostname telegraf[3819]: 2021-12-17T21:59:42Z I! Starting Telegraf 1.21.1
Dec 17 14:59:42 hostname telegraf[3819]: 2021-12-17T21:59:42Z I! Loaded inputs: cpu disk diskio file kernel mem net netstat processes snmp swap system
Dec 17 14:59:42 hostname telegraf[3819]: 2021-12-17T21:59:42Z I! Loaded aggregators:
Dec 17 14:59:42 hostname telegraf[3819]: 2021-12-17T21:59:42Z I! Loaded processors:
Dec 17 14:59:42 hostname telegraf[3819]: 2021-12-17T21:59:42Z I! Loaded outputs: influxdb
Dec 17 14:59:42 hostname telegraf[3819]: 2021-12-17T21:59:42Z I! Tags enabled: host=hostname
Dec 17 14:59:42 hostname telegraf[3819]: 2021-12-17T21:59:42Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"hostname", Flush Interval:10s
Dec 17 14:59:45 hostname telegraf[3819]: Parse module: /usr/share/snmp/mibs/site/miblist.txt:1:12: no match found for .
Dec 17 14:59:45 hostname telegraf[3819]: 2021-12-17T21:59:45Z W! [inputs.snmp] Could not load module at miblist.txt
Dec 17 14:59:52 hostname telegraf[3819]: Parse module: /var/lib/snmp/mibs/ietf/DPI20-MIB:9:4: unexpected "ibm" (expected ";")
Dec 17 14:59:52 hostname telegraf[3819]: 2021-12-17T21:59:52Z W! [inputs.snmp] Could not load module at DPI20-MIB
Dec 17 14:59:55 hostname telegraf[3819]: Parse module: /var/lib/snmp/mibs/ietf/HPR-MIB:494:30: unexpected "HprRtpCounter" (expected "}")
Dec 17 14:59:55 hostname telegraf[3819]: 2021-12-17T21:59:55Z W! [inputs.snmp] Could not load module at HPR-MIB
Dec 17 14:59:57 hostname systemd[1]: Stopping The plugin-driven server agent for reporting metrics into InfluxDB...
Dec 17 15:00:03 hostname telegraf[3819]: Parse module: /var/lib/snmp/mibs/ietf/SNMPv2-PDU:73:1: unexpected "max-bindings" (expected "END")
Dec 17 15:00:03 hostname telegraf[3819]: 2021-12-17T22:00:03Z W! [inputs.snmp] Could not load module at SNMPv2-PDU
Dec 17 15:00:04 hostname telegraf[3819]: Parse module: /var/lib/snmp/mibs/ietf/TCPIPX-MIB:63:12: unexpected "tcpIpxConnLocalPort" (expected "}")
Dec 17 15:00:04 hostname telegraf[3819]: 2021-12-17T22:00:04Z W! [inputs.snmp] Could not load module at TCPIPX-MIB
Dec 17 15:00:06 hostname telegraf[3819]: panic: strconv.ParseUint: parsing "": invalid syntax
Dec 17 15:00:06 hostname telegraf[3819]: goroutine 1 [running]:
Dec 17 15:00:06 hostname telegraf[3819]: github.com/sleepinggenius2/gosmi/types.OidMustFromString(...)
Dec 17 15:00:06 hostname telegraf[3819]:         /go/pkg/mod/github.com/sleepinggenius2/[email protected]/types/oid.go:91
Dec 17 15:00:06 hostname telegraf[3819]: github.com/influxdata/telegraf/internal/snmp.GetIndex({0x4fab394, 0x1}, {0x40048bb128, 0xe})
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/internal/snmp/translate.go:126 +0x348
Dec 17 15:00:06 hostname telegraf[3819]: github.com/influxdata/telegraf/plugins/inputs/snmp.snmpTableCall({0x4000b76561, 0x15})
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:837 +0xcc
Dec 17 15:00:06 hostname telegraf[3819]: github.com/influxdata/telegraf/plugins/inputs/snmp.snmpTable({0x4000b76561, 0x15})
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:820 +0x1b0
Dec 17 15:00:06 hostname telegraf[3819]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).initBuild(0x400057c460)
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:192 +0x40
Dec 17 15:00:06 hostname telegraf[3819]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).Init(0x400057c460)
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:162 +0x7c
Dec 17 15:00:06 hostname telegraf[3819]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Snmp).Init(0x400033edc0)
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:110 +0x118
Dec 17 15:00:06 hostname telegraf[3819]: github.com/influxdata/telegraf/models.(*RunningInput).Init(0x4000b10eb0)
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/models/running_input.go:82 +0x58
Dec 17 15:00:06 hostname telegraf[3819]: github.com/influxdata/telegraf/agent.(*Agent).initPlugins(0x400019e588)
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/agent/agent.go:189 +0x74
Dec 17 15:00:06 hostname telegraf[3819]: github.com/influxdata/telegraf/agent.(*Agent).Run(0x400019e588, {0x50f04e8, 0x40000d8740})
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/agent/agent.go:105 +0x140
Dec 17 15:00:06 hostname telegraf[3819]: main.runAgent({0x50f04e8, 0x40000d8740}, {0x7b610f8, 0x0, 0x0}, {0x7b610f8, 0x0, 0x0})
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:312 +0xcf0
Dec 17 15:00:06 hostname telegraf[3819]: main.reloadLoop({0x7b610f8, 0x0, 0x0}, {0x7b610f8, 0x0, 0x0})
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:147 +0x220
Dec 17 15:00:06 hostname telegraf[3819]: main.run(...)
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf_posix.go:8
Dec 17 15:00:06 hostname telegraf[3819]: main.main()
Dec 17 15:00:06 hostname telegraf[3819]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:485 +0xcb8
Dec 17 15:00:06 hostname systemd[1]: telegraf.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 17 15:00:06 hostname systemd[1]: telegraf.service: Failed with result 'exit-code'.
Dec 17 15:00:06 hostname systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.
lines 847-1002/1002 (END)

I'm only using the snmp plugin to monitor a ubiquity EdgeRouterX, and here are the relevant log:

##
## EdgeRouter devices
##
 [[inputs.snmp]]
   # List of agents to poll
   agents = [ "192.168.x.x"]
   # 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 = "home-erx"
   # The GETBULK max-repetitions parameter
   max_repetitions = 50
   # Measurement name
   name = "snmp.EdgeOS"
   ##
   ## Exclusions
   ##
   # Don't want these columns from UCD-SNMP-MIB::laTable
   fielddrop = [ "laErrorFlag", "laErrMessage" ]
   # Don't want these rows from UCD-DISKIO-MIB::diskIOTable
   [inputs.snmp.tagdrop]
     diskIODevice = [ "loop*", "ram*" ]
   ##
   ## System details
   ##
   #  System name (hostname)
   [[inputs.snmp.field]]
     name = "sysName"
     oid = "SNMPv2-MIB::sysName.0"
     is_tag = true
   #  System vendor OID
   [[inputs.snmp.field]]
     name = "sysObjectID"
     oid = "SNMPv2-MIB::sysObjectID.0"
   #  System description
   [[inputs.snmp.field]]
     name = "sysDescr"
     oid = "SNMPv2-MIB::sysDescr.0"
   #  System contact
   [[inputs.snmp.field]]
     name = "sysContact"
     oid = "SNMPv2-MIB::sysContact.0"
   #  System location
   [[inputs.snmp.field]]
     name = "sysLocation"
     oid = "SNMPv2-MIB::sysLocation.0"
   ##
   ## Host/System Resources
   ##
   #  System uptime
   [[inputs.snmp.field]]
     name = "sysUpTime"
     oid = "HOST-RESOURCES-MIB::hrSystemUptime.0"
   #  Number of user sessions
   [[inputs.snmp.field]]
     name = "hrSystemNumUsers"
     oid = "HOST-RESOURCES-MIB::hrSystemNumUsers.0"
   #  Number of process contexts
   [[inputs.snmp.field]]
     name = "hrSystemProcesses"
     oid = "HOST-RESOURCES-MIB::hrSystemProcesses.0"
   #  Device Listing
   [[inputs.snmp.table]]
     oid = "HOST-RESOURCES-MIB::hrDeviceTable"
     [[inputs.snmp.table.field]]
       oid = "HOST-RESOURCES-MIB::hrDeviceIndex"
       is_tag = true
   ##
   ## Context Switches & Interrupts
   ##
   #  Number of interrupts processed
   [[inputs.snmp.field]]
     name = "ssRawInterrupts"
     oid = "UCD-SNMP-MIB::ssRawInterrupts.0"
   #  Number of context switches
   [[inputs.snmp.field]]
     name = "ssRawContexts"
     oid = "UCD-SNMP-MIB::ssRawContexts.0"
   ##
   ## Host performance metrics
   ##
   #  System Load Average
   [[inputs.snmp.table]]
     oid = "UCD-SNMP-MIB::laTable"
     [[inputs.snmp.table.field]]
       oid = "UCD-SNMP-MIB::laNames"
       is_tag = true
   ##
   ## CPU inventory
   ##
   #  Processor listing
   [[inputs.snmp.table]]
     index_as_tag = true
     oid = "HOST-RESOURCES-MIB::hrProcessorTable"
   ##
   ## CPU utilization
   ##
   #  Number of 'ticks' spent on user-level
   [[inputs.snmp.field]]
     name = "ssCpuRawUser"
     oid = "UCD-SNMP-MIB::ssCpuRawUser.0"
   #  Number of 'ticks' spent on reduced-priority
   [[inputs.snmp.field]]
     name = "ssCpuRawNice"
     oid = "UCD-SNMP-MIB::ssCpuRawNice.0"
   #  Number of 'ticks' spent on system-level
   [[inputs.snmp.field]]
     name = "ssCpuRawSystem"
     oid = "UCD-SNMP-MIB::ssCpuRawSystem.0"
   #  Number of 'ticks' spent idle
   [[inputs.snmp.field]]
     name = "ssCpuRawIdle"
     oid = "UCD-SNMP-MIB::ssCpuRawIdle.0"
   #  Number of 'ticks' spent waiting on I/O
   [[inputs.snmp.field]]
     name = "ssCpuRawWait"
     oid = "UCD-SNMP-MIB::ssCpuRawWait.0"
   #  Number of 'ticks' spent in kernel
   [[inputs.snmp.field]]
     name = "ssCpuRawKernel"
     oid = "UCD-SNMP-MIB::ssCpuRawKernel.0"
   #  Number of 'ticks' spent on hardware interrupts
   [[inputs.snmp.field]]
     name = "ssCpuRawInterrupt"
     oid = "UCD-SNMP-MIB::ssCpuRawInterrupt.0"
   #  Number of 'ticks' spent on software interrupts
   [[inputs.snmp.field]]
     name = "ssCpuRawSoftIRQ"
     oid = "UCD-SNMP-MIB::ssCpuRawSoftIRQ.0"
   ##
   ## System Memory (physical/virtual)
   ##
   #  Size of phsyical memory (RAM)
   [[inputs.snmp.field]]
     name = "hrMemorySize"
     oid = "HOST-RESOURCES-MIB::hrMemorySize.0"
   #  Size of real/phys mem installed
   [[inputs.snmp.field]]
     name = "memTotalReal"
     oid = "UCD-SNMP-MIB::memTotalReal.0"
   #  Size of real/phys mem unused/avail
   [[inputs.snmp.field]]
     name = "memAvailReal"
     oid = "UCD-SNMP-MIB::memAvailReal.0"
   #  Total amount of mem unused/avail
   [[inputs.snmp.field]]
     name = "memTotalFree"
     oid = "UCD-SNMP-MIB::memTotalFree.0"
   #  Size of mem used as shared memory
   [[inputs.snmp.field]]
     name = "memShared"
     oid = "UCD-SNMP-MIB::memShared.0"
   #  Size of mem used for buffers
   [[inputs.snmp.field]]
     name = "memBuffer"
     oid = "UCD-SNMP-MIB::memBuffer.0"
   #  Size of mem used for cache
   [[inputs.snmp.field]]
     name = "memCached"
     oid = "UCD-SNMP-MIB::memCached.0"
   ##
   ## Block (Disk) performance
   ##
   #  System-wide blocks written
   [[inputs.snmp.field]]
     name = "ssIORawSent"
     oid = "UCD-SNMP-MIB::ssIORawSent.0"
   #  Number of blocks read
   [[inputs.snmp.field]]
     name = "ssIORawReceived"
     oid = "UCD-SNMP-MIB::ssIORawReceived.0"
   #  Per-device (disk) performance
   [[inputs.snmp.table]]
     oid = "UCD-DISKIO-MIB::diskIOTable"
     [[inputs.snmp.table.field]]
       oid = "UCD-DISKIO-MIB::diskIODevice"
       is_tag = true
   ##
   ## Disk/Partition/Filesystem inventory & usage
   ##
   #  Storage listing
   [[inputs.snmp.table]]
     oid = "HOST-RESOURCES-MIB::hrStorageTable"
     [[inputs.snmp.table.field]]
       oid = "HOST-RESOURCES-MIB::hrStorageDescr"
       is_tag = true
   ##
   ## Interface metrics
   ##
   #  Per-interface traffic, errors, drops
   [[inputs.snmp.table]]
     oid = "IF-MIB::ifTable"
     [[inputs.snmp.table.field]]
       oid = "IF-MIB::ifName"
       is_tag = true
   #  Per-interface high-capacity (HC) counters
   [[inputs.snmp.table]]
     oid = "IF-MIB::ifXTable"
     [[inputs.snmp.table.field]]
       oid = "IF-MIB::ifName"
       is_tag = true
   ##
   ## IP metrics
   ##
   #  System-wide IP metrics
   [[inputs.snmp.table]]
     index_as_tag = true
     oid = "IP-MIB::ipSystemStatsTable"
   ##
   ## ICMP Metrics
   ##
   #  ICMP statistics
   [[inputs.snmp.table]]
     index_as_tag = true
     oid = "IP-MIB::icmpStatsTable"
   #  ICMP per-type statistics
   [[inputs.snmp.table]]
     index_as_tag = true
     oid = "IP-MIB::icmpMsgStatsTable"
   ##
   ## UDP statistics
   ##
   #  Datagrams delivered to app
   [[inputs.snmp.field]]
     name = "udpInDatagrams"
     oid = "UDP-MIB::udpInDatagrams.0"
   #  Datagrams received with no app
   [[inputs.snmp.field]]
     name = "udpNoPorts"
     oid = "UDP-MIB::udpNoPorts.0"
   #  Datagrams received with error
   [[inputs.snmp.field]]
     name = "udpInErrors"
     oid = "UDP-MIB::udpInErrors.0"
   #  Datagrams sent
   [[inputs.snmp.field]]
     name = "udpOutDatagrams"
     oid = "UDP-MIB::udpOutDatagrams.0"
   ##
   ## TCP statistics
   ##
   #  Number of CLOSED -> SYN-SENT transitions
   [[inputs.snmp.field]]
     name = "tcpActiveOpens"
     oid = "TCP-MIB::tcpActiveOpens.0"
   #  Number of SYN-RCVD -> LISTEN transitions
   [[inputs.snmp.field]]
     name = "tcpPassiveOpens"
     oid = "TCP-MIB::tcpPassiveOpens.0"
   #  Number of SYN-SENT/RCVD -> CLOSED transitions
   [[inputs.snmp.field]]
     name = "tcpAttemptFails"
     oid = "TCP-MIB::tcpAttemptFails.0"
   #  Number of ESTABLISHED/CLOSE-WAIT -> CLOSED transitions
   [[inputs.snmp.field]]
     name = "tcpEstabResets"
     oid = "TCP-MIB::tcpEstabResets.0"
   #  Number of ESTABLISHED or CLOSE-WAIT
   [[inputs.snmp.field]]
     name = "tcpCurrEstab"
     oid = "TCP-MIB::tcpCurrEstab.0"
   #  Number of segments received
   [[inputs.snmp.field]]
     name = "tcpInSegs"
     oid = "TCP-MIB::tcpInSegs.0"
   #  Number of segments sent
   [[inputs.snmp.field]]
     name = "tcpOutSegs"
     oid = "TCP-MIB::tcpOutSegs.0"
   #  Number of segments retransmitted
   [[inputs.snmp.field]]
     name = "tcpRetransSegs"
     oid = "TCP-MIB::tcpRetransSegs.0"
   #  Number of segments received with error
   [[inputs.snmp.field]]
     name = "tcpInErrs"
     oid = "TCP-MIB::tcpInErrs.0"
   #  Number of segments sent w/RST
   [[inputs.snmp.field]]
     name = "tcpOutRsts"
     oid = "TCP-MIB::tcpOutRsts.0"
   ##
   ## IP routing statistics
   ##
   #  Number of valid routing entries
   [[inputs.snmp.field]]
     name = "inetCidrRouteNumber"
     oid = "IP-FORWARD-MIB::inetCidrRouteNumber.0"
   #  Number of valid entries discarded
   [[inputs.snmp.field]]
     name = "inetCidrRouteDiscards"
     oid = "IP-FORWARD-MIB::inetCidrRouteDiscards.0"
   #  Number of valid forwarding entries
   [[inputs.snmp.field]]
     name = "ipForwardNumber"
     oid = "IP-FORWARD-MIB::ipForwardNumber.0"
   ##
   ## IP routing statistics
   ##
   # Number of valid routes discarded
   [[inputs.snmp.field]]
     name = "ipRoutingDiscards"
     oid = "RFC1213-MIB::ipRoutingDiscards.0"
   ##
   ## SNMP metrics
   ##
   #  Number of SNMP messages received
   [[inputs.snmp.field]]
     name = "snmpInPkts"
     oid = "SNMPv2-MIB::snmpInPkts.0"
   #  Number of SNMP Get-Request received
   [[inputs.snmp.field]]
     name = "snmpInGetRequests"
     oid = "SNMPv2-MIB::snmpInGetRequests.0"
   #  Number of SNMP Get-Next received
   [[inputs.snmp.field]]
     name = "snmpInGetNexts"
     oid = "SNMPv2-MIB::snmpInGetNexts.0"
   #  Number of SNMP objects requested
   [[inputs.snmp.field]]
     name = "snmpInTotalReqVars"
     oid = "SNMPv2-MIB::snmpInTotalReqVars.0"
   #  Number of SNMP Get-Response received
   [[inputs.snmp.field]]
     name = "snmpInGetResponses"
     oid = "SNMPv2-MIB::snmpInGetResponses.0"
   #  Number of SNMP messages sent
   [[inputs.snmp.field]]
     name = "snmpOutPkts"
     oid = "SNMPv2-MIB::snmpOutPkts.0"
   #  Number of SNMP Get-Request sent
   [[inputs.snmp.field]]
     name = "snmpOutGetRequests"
     oid = "SNMPv2-MIB::snmpOutGetRequests.0"
   #  Number of SNMP Get-Next sent
   [[inputs.snmp.field]]
     name = "snmpOutGetNexts"
     oid = "SNMPv2-MIB::snmpOutGetNexts.0"
   #  Number of SNMP Get-Response sent
   [[inputs.snmp.field]]
     name = "snmpOutGetResponses"
     oid = "SNMPv2-MIB::snmpOutGetResponses.0"

@henriknoerr
Copy link
Author

henriknoerr commented Dec 18, 2021

I use these MIBs
oid = "AIRESPACE-REF-MIB::airespace.1.1.1.10.0"
oid = "AIRESPACE-REF-MIB::airespace.1.1.1.14.0"
oid = "AIRESPACE-REF-MIB::airespace.1.1.1.3.0"
oid = "AIRESPACE-REF-MIB::airespace.1.1.5.1.0"
oid = "AIRESPACE-REF-MIB::airespace.1.1.5.3.0"
oid = "AIRESPACE-WIRELESS-MIB::bsnAPDot3MacAddress"
oid = "AIRESPACE-WIRELESS-MIB::bsnAPLocation"
oid = "AIRESPACE-WIRELESS-MIB::bsnAPName"
oid = "AIRESPACE-WIRELESS-MIB::bsnAPTable"
oid = "AIRESPACE-WIRELESS-MIB::bsnDot11EssNumberOfMobileStations"
oid = "AIRESPACE-WIRELESS-MIB::bsnDot11EssSsid"
oid = "AIRESPACE-WIRELESS-MIB::bsnDot11EssTable"
oid = "AIRESPACE-WIRELESS-MIB::bsnMobileStationAPMacAddr"
oid = "AIRESPACE-WIRELESS-MIB::bsnMobileStationBytesReceived"
oid = "AIRESPACE-WIRELESS-MIB::bsnMobileStationBytesSent"
oid = "AIRESPACE-WIRELESS-MIB::bsnMobileStationIpAddress"
oid = "AIRESPACE-WIRELESS-MIB::bsnMobileStationMacAddress"
oid = "AIRESPACE-WIRELESS-MIB::bsnMobileStationPolicyManagerState"
oid = "AIRESPACE-WIRELESS-MIB::bsnMobileStationRSSI"
oid = "AIRESPACE-WIRELESS-MIB::bsnMobileStationSsid"
oid = "AIRESPACE-WIRELESS-MIB::bsnMobileStationTable"
oid = "AIRESPACE-WIRELESS-MIB::bsnMobileStationUserName"
oid = "AIRESPACE-WIRELESS-MIB::bsnMobileStationVlanId"
oid = "BLUECOAT-SG-PROXY-MIB::sgProxyCpuCoreTable"
oid = "BLUECOAT-SG-PROXY-MIB::sgProxyHttpClientConnections.0"
oid = "BLUECOAT-SG-PROXY-MIB::sgProxyHttpServerConnections.0"
oid = "CHECKPOINT-MIB::fwAccepted.0"
oid = "CHECKPOINT-MIB::fwDropped.0"
oid = "CHECKPOINT-MIB::fwFrag-expired.0"
oid = "CHECKPOINT-MIB::fwFrag-fragments.0"
oid = "CHECKPOINT-MIB::fwFrag-packets.0"
oid = "CHECKPOINT-MIB::fwFullyUtilizedDrops.0"
oid = "CHECKPOINT-MIB::fwInstancesCPUInstanceName"
oid = "CHECKPOINT-MIB::fwInstancesCPUTable"
oid = "CHECKPOINT-MIB::fwInstancesCPUTotal.0"
oid = "CHECKPOINT-MIB::fwNumConn.0"
oid = "CHECKPOINT-MIB::fwRejected.0"
oid = "CHECKPOINT-MIB::haStatCode.0"
oid = "CHECKPOINT-MIB::haStatCode.0"
oid = "CHECKPOINT-MIB::licensingBladeActive"
oid = "CHECKPOINT-MIB::licensingBladeName"
oid = "CHECKPOINT-MIB::licensingExpirationDate"
oid = "CHECKPOINT-MIB::licensingTable"
oid = "CHECKPOINT-MIB::memFreeReal64.0"
oid = "CHECKPOINT-MIB::memTotalReal64.0"
oid = "CHECKPOINT-MIB::multiDiskFreeAvailablePercent"
oid = "CHECKPOINT-MIB::multiDiskName"
oid = "CHECKPOINT-MIB::multiDiskTable"
oid = "CHECKPOINT-MIB::multiProcTable"
oid = "CHECKPOINT-MIB::svnNetIfName"
oid = "CHECKPOINT-MIB::svnNetIfRXBytes"
oid = "CHECKPOINT-MIB::svnNetIfRXDrops"
oid = "CHECKPOINT-MIB::svnNetIfRXErrors"
oid = "CHECKPOINT-MIB::svnNetIfRXPackets"
oid = "CHECKPOINT-MIB::svnNetIfTable"
oid = "CHECKPOINT-MIB::svnNetIfTXBytes"
oid = "CHECKPOINT-MIB::svnNetIfTXDrops"
oid = "CHECKPOINT-MIB::svnNetIfTXErrors"
oid = "CHECKPOINT-MIB::svnNetIfTXPackets"
oid = "CHECKPOINT-MIB::tempertureSensorName"
oid = "CHECKPOINT-MIB::tempertureSensorValue"
oid = "CHECKPOINT-MIB::tunnelCommunity"
oid = "CHECKPOINT-MIB::tunnelPeerObjName"
oid = "CHECKPOINT-MIB::tunnelState"
oid = "CHECKPOINT-MIB::tunnelTable"
oid = "CHECKPOINT-MIB::vdName.0"
oid = "CHECKPOINT-MIB::vsxCountersDropTable"
oid = "CHECKPOINT-MIB::vsxCountersDropVsName"
oid = "CHECKPOINT-MIB::vsxStatusCPUUsagePerCPUCoreNumber"
oid = "CHECKPOINT-MIB::vsxStatusCPUUsagePerCPUTable"
oid = "CHECKPOINT-MIB::vsxStatusCPUUsagePerCPUVSName"
oid = "CHECKPOINT-MIB::vsxStatusCPUUsageTable"
oid = "CHECKPOINT-MIB::vsxStatusCPUUsageVSId"
oid ="CHECKPOINT-MIB::vsxStatusHAState"
oid = "CHECKPOINT-MIB::vsxStatusInterfaceIfName"
oid = "CHECKPOINT-MIB::vsxStatusInterfaceRxBytes"
oid = "CHECKPOINT-MIB::vsxStatusInterfacesTable"
oid = "CHECKPOINT-MIB::vsxStatusInterfaceTxBytes"
oid = "CHECKPOINT-MIB::vsxStatusInterfaceVSName"
oid = "CHECKPOINT-MIB::vsxStatusMemoryUsageTable"
oid = "CHECKPOINT-MIB::vsxStatusMemoryUsageVSName"
oid = "CHECKPOINT-MIB::vsxStatusTable"
oid = "CHECKPOINT-MIB::vsxStatusVsName"
oid = "CISCO-CLASS-BASED-QOS-MIB::cbQosTSCfgTable"
oid = "CISCO-ENHANCED-MEMPOOL-MIB::cempMemPoolName"
oid = "CISCO-ENHANCED-MEMPOOL-MIB::cempMemPoolTable"
oid = "CISCO-FIREWALL-MIB::cfwConnectionStatDescription"
oid = "CISCO-FIREWALL-MIB::cfwConnectionStatValue"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunInDropPkts"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunInOctets"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunInP2ExchgInvalids"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunInP2ExchgRejects"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunLocalAddr"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunnelTable"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunOutDropPkts"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunOutOctets"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunOutP2ExchgInvalids"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunOutP2ExchgRejects"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunRemoteAddr"
oid = "CISCO-IPSEC-FLOW-MONITOR-MIB::cikeTunStatus"
oid = "CISCO-LWAPP-SYS-MIB::clsMaxClientsCount.0"
oid = "CISCO-LWAPP-SYS-MIB::clsSysApConnectCount.0"
oid = "CISCO-PROCESS-MIB::cpmCPUTotal1minRev"
oid = "CISCO-PROCESS-MIB::cpmCPUTotalIndex"
oid = "CISCO-PROCESS-MIB::cpmCPUTotalPhysicalIndex"
oid = "CISCO-REMOTE-ACCESS-MONITOR-MIB::crasGroup.0"
oid = "CISCO-REMOTE-ACCESS-MONITOR-MIB::crasMaxSessionsSupportable.0"
oid = "CISCO-REMOTE-ACCESS-MONITOR-MIB::crasNumSessions.0"
oid = "DISMAN-EXPRESSION-MIB::sysUpTimeInstance"
oid = "ENTITY-SENSOR-MIB::entPhySensorTable"
oid = "ENTITY-SENSOR-MIB::entPhySensorUnitsDisplay"
oid = "IF-MIB::ifAlias"
oid = "IF-MIB::ifDescr"
oid = "IF-MIB::ifHCInOctets"
oid = "IF-MIB::ifHCOutOctets"
oid = "IF-MIB::ifHighSpeed"
oid = "IF-MIB::ifInDiscards"
oid = "IF-MIB::ifInErrors"
oid = "IF-MIB::ifName"
oid = "IF-MIB::ifOperStatus"
oid = "IF-MIB::ifOutDiscards"
oid = "IF-MIB::ifTable"
oid = "RFC1213-MIB::sysName.0"
oid = "UCD-SNMP-MIB::laTable"

I can try the custom build monday,
Thanks for all the effort put into this migration to gosnmp!

/Henrik

@MyaLongmire
Copy link
Contributor

We have this panic on a similar mib, unfortunately, it is an issue in the new gosmi library we are using to parse mibs. I logged an issue with the library here, if you would like to follow it. I will also keep you updated on the status. Thank you for your continued support!

@MyaLongmire
Copy link
Contributor

I have tried to implement what the owner of the library recommended. If you wouldn't mind testing this draft pr and giving some feedback, it would be greatly appreciated :)

@jordipalet
Copy link

jordipalet commented Dec 18, 2021

Relevent telegraf.conf

Dec 17 16:38:04 hostname systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Starting Telegraf 1.21.1
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Loaded inputs: cpu disk internal mem net ping snmp (352x) swap
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Loaded aggregators:
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Loaded processors: converter
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Loaded outputs: influxdb_v2 (2x)
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! Tags enabled: host=s
Dec 17 16:38:04 hostname telegraf[306402]: 2021-12-17T15:38:04Z I! [agent] Config: Interval:2m0s, Quiet:false, Hostname:"", Flush Interval:10s
Dec 17 16:38:06 hostname telegraf[306402]: panic: runtime error: index out of range [1] with length 1
Dec 17 16:38:06 hostname telegraf[306402]: goroutine 1 [running]:
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/internal/snmp.SnmpTranslateCall({0xc00158ca81, 0x27})
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/internal/snmp/translate.go:153 +0xbfd
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/plugins/inputs/snmp.SnmpTranslate({0xc00158ca81, 0x27})
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:877 +0x170
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Field).init(0xc000766708)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:263 +0x73
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).Init(0xc0016ede00)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:169 +0xd8
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/plugins/inputs/snmp.(*Snmp).Init(0xc0009f7340)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:110 +0x127
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/models.(*RunningInput).Init(0xc000e4b758)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/models/running_input.go:82 +0x35
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/agent.(*Agent).initPlugins(0xc000184ba8)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/agent/agent.go:189 +0x96
Dec 17 16:38:06 hostname telegraf[306402]: github.com/influxdata/telegraf/agent.(*Agent).Run(0xc000184ba8, {0x57e5688, 0xc000acc380})
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/agent/agent.go:105 +0x185
Dec 17 16:38:06 hostname telegraf[306402]: main.runAgent({0x57e5688, 0xc000acc380}, {0x837a278, 0x0, 0x0}, {0x837a278, 0x0, 0x0})
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:312 +0xc57
Dec 17 16:38:06 hostname telegraf[306402]: main.reloadLoop({0x837a278, 0x0, 0x0}, {0x837a278, 0x0, 0x0})
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:147 +0x28a
Dec 17 16:38:06 hostname telegraf[306402]: main.run(...)
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf_posix.go:8
Dec 17 16:38:06 hostname telegraf[306402]: main.main()
Dec 17 16:38:06 hostname telegraf[306402]:         /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:485 +0xa9a
Dec 17 16:38:06 hostname systemd[1]: telegraf.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 17 16:38:06 hostname systemd[1]: telegraf.service: Failed with result 'exit-code'.
Dec 17 16:38:07 hostname systemd[1]: telegraf.service: Service RestartSec=100ms expired, scheduling restart.
Dec 17 16:38:07 hostname systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 26.
Dec 17 16:38:07 hostname systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.

System info

Telegraf 1.21.1

Docker

No response

Steps to reproduce

After the agent restarted it restarts every 100ms because of the error "panic: runtime error: index out of range [1] with length 1" 2. rollback to 1.21.0 does not fix the issue rollback to 1.20.4 fixes the issue 3. ...

Expected behavior

to work like 1.20.4

Actual behavior

crashes

Additional info

Not sure if I have a specific snmp MIB file that causes this, I cannot see any reference in the trace what causes it besides snmptranslate

Same problem with v1.21.1, both in arm (Raspberry) and amd64 (Ubuntu)

@MyaLongmire
Copy link
Contributor

@jordipalet did you try the pr listed above?

@dnewsholme
Copy link

dnewsholme commented Dec 19, 2021

@MyaLongmire it still appears to panic with your PR build at least for me (using the synology mibs).

root@telegraf:/opt# /var/telegraf --config /etc/telegraf/telegraf.conf                                                                                                                                      
2021-12-20T16:48:50Z I! Starting Telegraf 1.22.0-9ffc58c7                                                                                                                                                   
2021-12-20T16:48:50Z I! Loaded inputs: snmp                                                                                                                                                                 
2021-12-20T16:48:50Z I! Loaded aggregators:                                                                                                                                                                 
2021-12-20T16:48:50Z I! Loaded processors:                                                                                                                                                                  
2021-12-20T16:48:50Z I! Loaded outputs: influxdb_v2                                                                                                                                                         
2021-12-20T16:48:50Z I! Tags enabled: host=ds420                                                                                                                                                            
2021-12-20T16:48:50Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"ds420", Flush Interval:10s                                                                                                     
panic: strconv.ParseUint: parsing "": invalid syntax                                                                                                                                                        
                                                                                                                                                                                                            
goroutine 1 [running]:                                                                                                                                                                                      
github.com/sleepinggenius2/gosmi/types.OidMustFromString(...)                                                                                                                                               
        /go/pkg/mod/github.com/sleepinggenius2/[email protected]/types/oid.go:91                                                                                                                                 
github.com/influxdata/telegraf/internal/snmp.GetIndex({0xca5084e, 0x1}, {0x100dd884, 0x8})                                                                                                                  
        /go/src/github.com/influxdata/telegraf/internal/snmp/translate.go:126 +0x331                                                                                                                        
github.com/influxdata/telegraf/plugins/inputs/snmp.snmpTableCall({0xf9e3bc1, 0xf})                                                                                                                          
        /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:837 +0xe6                                                                                                                        
github.com/influxdata/telegraf/plugins/inputs/snmp.snmpTable({0xf9e3bc1, 0xf})                                                                                                                              
        /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:820 +0xeb                                                                                                                        
github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).initBuild(0xf6883c0)                                                                                                                            
        /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:192 +0x44                                                                                                                        
github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).Init(0xf6883c0)                                                                                                                                 
        /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:162 +0x7d                                                                                                                        
github.com/influxdata/telegraf/plugins/inputs/snmp.(*Snmp).Init(0xf4ec0c0)                                                                                                                                  
        /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:110 +0x10f                                                                                                                       
github.com/influxdata/telegraf/models.(*RunningInput).Init(0xf7fef30)                                                                                                                                       
        /go/src/github.com/influxdata/telegraf/models/running_input.go:82 +0x48                                                                                                                             
github.com/influxdata/telegraf/agent.(*Agent).initPlugins(0xf706578)                                                                                                                                        
        /go/src/github.com/influxdata/telegraf/agent/agent.go:189 +0x6c                                                                                                                                     
github.com/influxdata/telegraf/agent.(*Agent).Run(0xf706578, {0xcb26974, 0xfc78a50})                                                                                                                        
        /go/src/github.com/influxdata/telegraf/agent/agent.go:105 +0x164                                                                                                                                    
main.runAgent({0xcb26974, 0xfc78a50}, {0xef87ac4, 0x0, 0x0}, {0xef87ac4, 0x0, 0x0})                                                                                                                         
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:312 +0xf55                                                                                                                          
main.reloadLoop({0xef87ac4, 0x0, 0x0}, {0xef87ac4, 0x0, 0x0})                                                                                                                                               
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:147 +0x20e                                                                                                                          
main.run(...)                                                                                                                                                                                               
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf_posix.go:8                                                                                                                             
main.main()                                                                                                                                                                                                 
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:485 +0xc25 

TCPIPX-MIB.zip

Attached is the MIB it seems to be failing on.

@MyaLongmire
Copy link
Contributor

@dnewsholme Thank you for attaching your mib! I will try my best to figure out the issue.

@dstewen
Copy link

dstewen commented Dec 20, 2021

Similar issue here with the SNMP polling. I have not updated to the pr listed above, yet.

Dec 20 18:54:35 pi3b systemd[1]: telegraf.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 20 18:54:35 pi3b systemd[1]: telegraf.service: Failed with result 'exit-code'.
Dec 20 18:54:35 pi3b systemd[1]: telegraf.service: Service RestartSec=100ms expired, scheduling restart.
Dec 20 18:54:35 pi3b systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 2.
Dec 20 18:54:35 pi3b systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.
Dec 20 18:54:35 pi3b systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
Dec 20 18:54:35 pi3b telegraf[10158]: 2021-12-20T07:54:35Z I! Starting Telegraf 1.21.1
Dec 20 18:54:35 pi3b telegraf[10158]: 2021-12-20T07:54:35Z W! DeprecationWarning: Plugin "inputs.io" deprecated since version 0.10.0 and will be removed in 2.0.0: use 'inputs.diskio' instead
Dec 20 18:54:35 pi3b telegraf[10158]: 2021-12-20T07:54:35Z I! Loaded inputs: cpu disk diskio exec file http kernel mem net netstat processes snmp swap system vsphere (2x)
Dec 20 18:54:35 pi3b telegraf[10158]: 2021-12-20T07:54:35Z I! Loaded aggregators:
Dec 20 18:54:35 pi3b telegraf[10158]: 2021-12-20T07:54:35Z I! Loaded processors:
Dec 20 18:54:35 pi3b telegraf[10158]: 2021-12-20T07:54:35Z I! Loaded outputs: influxdb
Dec 20 18:54:35 pi3b telegraf[10158]: 2021-12-20T07:54:35Z I! Tags enabled: host=raspberrypi-3-001
Dec 20 18:54:35 pi3b telegraf[10158]: 2021-12-20T07:54:35Z W! Deprecated inputs: 1 and 0 options
Dec 20 18:54:35 pi3b telegraf[10158]: 2021-12-20T07:54:35Z I! [agent] Config: Interval:15s, Quiet:false, Hostname:"raspberrypi-3-001", Flush Interval:15s
Dec 20 18:54:35 pi3b telegraf[10158]: 2021-12-20T07:54:35Z D! [agent] Initializing plugins
Dec 20 18:54:42 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-ETHERRING-MIB.my:33:16: unexpected "TypeOfStatus" (expected "END")
Dec 20 18:54:42 pi3b telegraf[10158]: 2021-12-20T07:54:42Z W! [inputs.snmp] Could not load module at NMS-ETHERRING-MIB.my
Dec 20 18:54:43 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-GBSC-MIB.my:19:25: unexpected "20090317" (expected ...)
Dec 20 18:54:43 pi3b telegraf[10158]: 2021-12-20T07:54:43Z W! [inputs.snmp] Could not load module at NMS-GBSC-MIB.my
Dec 20 18:54:44 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-INTERFACE-EXT.my:21:25: unexpected "20030918" (expected ...)
Dec 20 18:54:44 pi3b telegraf[10158]: 2021-12-20T07:54:44Z W! [inputs.snmp] Could not load module at NMS-INTERFACE-EXT.my
Dec 20 18:54:45 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-IPSLA-MIB.my:19:25: unexpected "20090317" (expected ...)
Dec 20 18:54:45 pi3b telegraf[10158]: 2021-12-20T07:54:45Z W! [inputs.snmp] Could not load module at NMS-IPSLA-MIB.my
Dec 20 18:54:47 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-QOS-MIB.my:51:19: unexpected "20110712" (expected ...)
Dec 20 18:54:47 pi3b telegraf[10158]: 2021-12-20T07:54:47Z W! [inputs.snmp] Could not load module at NMS-QOS-MIB.my
Dec 20 18:54:48 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-R-QOS-MIB.my:758:29: unexpected "}" (expected )
Dec 20 18:54:48 pi3b telegraf[10158]: 2021-12-20T07:54:48Z W! [inputs.snmp] Could not load module at NMS-R-QOS-MIB.my
Dec 20 18:54:48 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-REMOTE-PING-MIB.my:38:28: unexpected "timeOut" (expected "}")
Dec 20 18:54:48 pi3b telegraf[10158]: 2021-12-20T07:54:48Z W! [inputs.snmp] Could not load module at NMS-REMOTE-PING-MIB.my
Dec 20 18:54:48 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-SERIAL.mib:121:29: unexpected "}" (expected )
Dec 20 18:54:48 pi3b telegraf[10158]: 2021-12-20T07:54:48Z W! [inputs.snmp] Could not load module at NMS-SERIAL.mib
Dec 20 18:54:48 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-SMI.my:17:15: unexpected "20000628Z" (expected ...)
Dec 20 18:54:48 pi3b telegraf[10158]: 2021-12-20T07:54:48Z W! [inputs.snmp] Could not load module at NMS-SMI.my
Dec 20 18:54:49 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-SNMP.my:221:32: unexpected "STRING" (expected "}")
Dec 20 18:54:49 pi3b telegraf[10158]: 2021-12-20T07:54:49Z W! [inputs.snmp] Could not load module at NMS-SNMP.my
Dec 20 18:54:49 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-SWITCH-MIB.my:44:25: unexpected "20090113" (expected ...)
Dec 20 18:54:49 pi3b telegraf[10158]: 2021-12-20T07:54:49Z W! [inputs.snmp] Could not load module at NMS-SWITCH-MIB.my
Dec 20 18:54:49 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/NMS-TC.my:124:1: unexpected "SMI" (expected "END")
Dec 20 18:54:49 pi3b telegraf[10158]: 2021-12-20T07:54:49Z W! [inputs.snmp] Could not load module at NMS-TC.my
Dec 20 18:54:52 pi3b telegraf[10158]: Parse module: /usr/share/snmp/mibs/miblist.txt:1:12: no match found for .

@srebhan srebhan added the regression something that used to work, but is now broken label Dec 20, 2021
@MyaLongmire MyaLongmire self-assigned this Dec 20, 2021
@MyaLongmire
Copy link
Contributor

@dstewen I do not see a panic here. Just some warnings that gosmi cannot parse some of your modules. This is not affect the running of telegraf. You can read more about the inability to parse some modules in this issue here

@MyaLongmire
Copy link
Contributor

@dnewsholme I see the mibs you posted are not the synology mibs. Would you mind posting your config that goes with the mibs you posted?

@dnewsholme
Copy link

dnewsholme commented Dec 20, 2021

@MyaLongmire You are correct looking at the issue you posted. It seem telegraf was loading the mibs from the ietf bundle. I've now removed all the RFC ones and only have the MIBs specified in my config loading and do get a different error and i'm unable to see the problem MIB.

2021-12-20T16:48:50Z I! Starting Telegraf 1.22.0-9ffc58c7                                                                                                                                                   
2021-12-20T16:48:50Z I! Loaded inputs: snmp                                                                                                                                                                 
2021-12-20T16:48:50Z I! Loaded aggregators:                                                                                                                                                                 
2021-12-20T16:48:50Z I! Loaded processors:                                                                                                                                                                  
2021-12-20T16:48:50Z I! Loaded outputs: influxdb_v2                                                                                                                                                         
2021-12-20T16:48:50Z I! Tags enabled: host=ds420                                                                                                                                                            
2021-12-20T16:48:50Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"ds420", Flush Interval:10s                                                                                                     
panic: strconv.ParseUint: parsing "": invalid syntax                                                                                                                                                        
                                                                                                                                                                                                            
goroutine 1 [running]:                                                                                                                                                                                      
github.com/sleepinggenius2/gosmi/types.OidMustFromString(...)                                                                                                                                               
        /go/pkg/mod/github.com/sleepinggenius2/[email protected]/types/oid.go:91                                                                                                                                 
github.com/influxdata/telegraf/internal/snmp.GetIndex({0xca5084e, 0x1}, {0x100dd884, 0x8})                                                                                                                  
        /go/src/github.com/influxdata/telegraf/internal/snmp/translate.go:126 +0x331                                                                                                                        
github.com/influxdata/telegraf/plugins/inputs/snmp.snmpTableCall({0xf9e3bc1, 0xf})                                                                                                                          
        /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:837 +0xe6                                                                                                                        
github.com/influxdata/telegraf/plugins/inputs/snmp.snmpTable({0xf9e3bc1, 0xf})                                                                                                                              
        /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:820 +0xeb                                                                                                                        
github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).initBuild(0xf6883c0)                                                                                                                            
        /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:192 +0x44                                                                                                                        
github.com/influxdata/telegraf/plugins/inputs/snmp.(*Table).Init(0xf6883c0)                                                                                                                                 
        /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:162 +0x7d                                                                                                                        
github.com/influxdata/telegraf/plugins/inputs/snmp.(*Snmp).Init(0xf4ec0c0)                                                                                                                                  
        /go/src/github.com/influxdata/telegraf/plugins/inputs/snmp/snmp.go:110 +0x10f                                                                                                                       
github.com/influxdata/telegraf/models.(*RunningInput).Init(0xf7fef30)                                                                                                                                       
        /go/src/github.com/influxdata/telegraf/models/running_input.go:82 +0x48                                                                                                                             
github.com/influxdata/telegraf/agent.(*Agent).initPlugins(0xf706578)                                                                                                                                        
        /go/src/github.com/influxdata/telegraf/agent/agent.go:189 +0x6c                                                                                                                                     
github.com/influxdata/telegraf/agent.(*Agent).Run(0xf706578, {0xcb26974, 0xfc78a50})                                                                                                                        
        /go/src/github.com/influxdata/telegraf/agent/agent.go:105 +0x164                                                                                                                                    
main.runAgent({0xcb26974, 0xfc78a50}, {0xef87ac4, 0x0, 0x0}, {0xef87ac4, 0x0, 0x0})                                                                                                                         
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:312 +0xf55                                                                                                                          
main.reloadLoop({0xef87ac4, 0x0, 0x0}, {0xef87ac4, 0x0, 0x0})                                                                                                                                               
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:147 +0x20e                                                                                                                          
main.run(...)                                                                                                                                                                                               
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf_posix.go:8                                                                                                                             
main.main()                                                                                                                                                                                                 
        /go/src/github.com/influxdata/telegraf/cmd/telegraf/telegraf.go:485 +0xc25 

Attached is the config and the mibs
config.zip
.

@MyaLongmire
Copy link
Contributor

Thank you for attaching your files. I will investigate and get back to you :)

@MyaLongmire
Copy link
Contributor

I ran your config with your mibs. I had to comment out HOST-RESOURCES-MIB as that was not included. I ran on this pr as it is what is going to fix the panic. And I am getting performing get on field sysName: marshal: marshalPDU: unable to marshal varbind list: unable to marshal OID: Invalid object identifier. Which is an issue with gosnmp and can be tracked via this ticket. Thank you for you patience with all of these kinks while we get switched over to gosmi!

@MyaLongmire
Copy link
Contributor

Due to the holidays coming up the team will not have time to have another bug release. There are a few options while you wait for this fix:

  1. Roll back to 1.20.4
  2. Grab a nightly build -> the snmp panic fix has been merged into master but we are still diligently working on the marshal error
  3. clone master

Thank you for your continued support of Telegraf and for your patience with this switch to gosmi!

@offbyone
Copy link

offbyone commented Jan 4, 2022

It would be nice if this were left open til the release, so that we would get notifications when the release happens.

@fatalbyte
Copy link

fatalbyte commented Jan 5, 2022

Could someone share with me how to roll back on Debian? I've tried a few different ways and not having any luck...

sudo apt-get install telegraf_1.20.4-1
sudo apt-get install telegraf=1.20.4-1
sudo apt-get install telegraf=1.20.4
sudo apt-get install telegraf=1.20.4-1_arm64

This is the error I receive for each one of these:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Version 'v1.20.4' for 'telegraf' was not found

Thank you!

@dnewsholme
Copy link

dnewsholme commented Jan 5, 2022

Looks like you might not have the repository added for telegraf?

Easiest way would be to download the .deb and install via dpkg.

wget https://dl.influxdata.com/telegraf/releases/telegraf_1.20.4-1_amd64.deb
dpkg -i telegraf_1.20.4-1_amd64.deb

If you would prefer to manage via apt make sure you add the source. https://docs.influxdata.com/telegraf/v1.21/introduction/installation/#ubuntu--debian

@fatalbyte
Copy link

Looks like you might not have the repository added for telegraf?

Easiest way would be to download the .deb and install via dpkg.

wget https://dl.influxdata.com/telegraf/releases/telegraf_1.20.4-1_amd64.deb
dpkg -i telegraf_1.20.4-1_amd64.deb

If you would prefer to manage via apt make sure you add the source. https://docs.influxdata.com/telegraf/v1.21/introduction/installation/#ubuntu--debian

Life saver! Thank you!

@bondskin
Copy link

bondskin commented Jan 5, 2022

Could someone share with me how to roll back on Debian? I've tried a few different ways and not having any luck...

sudo apt-get install telegraf_1.20.4-1 sudo apt-get install telegraf=1.20.4-1 sudo apt-get install telegraf=1.20.4 sudo apt-get install telegraf=1.20.4-1_arm64

This is the error I receive for each one of these:

Reading package lists... Done Building dependency tree Reading state information... Done E: Version 'v1.20.4' for 'telegraf' was not found

Thank you!

curl -LO -C - https://dl.influxdata.com/telegraf/releases/telegraf_1.20.4-1_armhf.deb
sudo dpkg -i telegraf_1.20.4-1_armhf.deb

@powersj
Copy link
Contributor

powersj commented Jan 5, 2022

v1.21.2 which contains numerous SNMP fixes is now out. Thanks!

@bondskin
Copy link

bondskin commented Jan 6, 2022

thanks @MyaLongmire & @powersj , just updated on my Pi (again from 1.20.4) and it looks good.
great work!

@er-rhorman
Copy link

er-rhorman commented Jan 6, 2022

v1.21.2 which contains numerous SNMP fixes is now out. Thanks!

Even with this version, I'm still getting "parse module" errors.

Parse module: /usr/share/snmp/mibs/miblist.txt:1:12: no match found for .2022-01-06T13:19:31Z W! [inputs.snmp] module miblist.txt could not be loaded Parse module: /var/lib/snmp/mibs/ietf/DPI20-MIB:9:4: unexpected "ibm" (expected ";") 2022-01-06T13:19:37Z W! [inputs.snmp] module DPI20-MIB could not be loaded Parse module: /var/lib/snmp/mibs/ietf/HPR-MIB:494:30: unexpected "HprRtpCounter" (expected "}") 2022-01-06T13:19:41Z W! [inputs.snmp] module HPR-MIB could not be loaded Parse module: /var/lib/snmp/mibs/ietf/SNMPv2-PDU:73:1: unexpected "max-bindings" (expected "END") 2022-01-06T13:19:50Z W! [inputs.snmp] module SNMPv2-PDU could not be loaded Parse module: /var/lib/snmp/mibs/ietf/TCPIPX-MIB:63:12: unexpected "tcpIpxConnLocalPort" (expected "}") 2022-01-06T13:19:52Z W! [inputs.snmp] module TCPIPX-MIB could not be loaded

Is there something additional to be updated?

@bondskin
Copy link

bondskin commented Jan 6, 2022

v1.21.2 which contains numerous SNMP fixes is now out. Thanks!

Even with this version, I'm still getting "parse module" errors.

Parse module: /usr/share/snmp/mibs/miblist.txt:1:12: no match found for .2022-01-06T13:19:31Z W! [inputs.snmp] module miblist.txt could not be loaded Parse module: /var/lib/snmp/mibs/ietf/DPI20-MIB:9:4: unexpected "ibm" (expected ";") 2022-01-06T13:19:37Z W! [inputs.snmp] module DPI20-MIB could not be loaded Parse module: /var/lib/snmp/mibs/ietf/HPR-MIB:494:30: unexpected "HprRtpCounter" (expected "}") 2022-01-06T13:19:41Z W! [inputs.snmp] module HPR-MIB could not be loaded Parse module: /var/lib/snmp/mibs/ietf/SNMPv2-PDU:73:1: unexpected "max-bindings" (expected "END") 2022-01-06T13:19:50Z W! [inputs.snmp] module SNMPv2-PDU could not be loaded Parse module: /var/lib/snmp/mibs/ietf/TCPIPX-MIB:63:12: unexpected "tcpIpxConnLocalPort" (expected "}") 2022-01-06T13:19:52Z W! [inputs.snmp] module TCPIPX-MIB could not be loaded

Is there something additional to be updated?

Hi @er-rhorman , I have the same but at least the plugin keeps running now, which is a great improvement compared to the earlier version. And, at least, I don't need these two MIB files.

@er-rhorman
Copy link

er-rhorman commented Jan 6, 2022

v1.21.2 which contains numerous SNMP fixes is now out. Thanks!

Even with this version, I'm still getting "parse module" errors.
Parse module: /usr/share/snmp/mibs/miblist.txt:1:12: no match found for .2022-01-06T13:19:31Z W! [inputs.snmp] module miblist.txt could not be loaded Parse module: /var/lib/snmp/mibs/ietf/DPI20-MIB:9:4: unexpected "ibm" (expected ";") 2022-01-06T13:19:37Z W! [inputs.snmp] module DPI20-MIB could not be loaded Parse module: /var/lib/snmp/mibs/ietf/HPR-MIB:494:30: unexpected "HprRtpCounter" (expected "}") 2022-01-06T13:19:41Z W! [inputs.snmp] module HPR-MIB could not be loaded Parse module: /var/lib/snmp/mibs/ietf/SNMPv2-PDU:73:1: unexpected "max-bindings" (expected "END") 2022-01-06T13:19:50Z W! [inputs.snmp] module SNMPv2-PDU could not be loaded Parse module: /var/lib/snmp/mibs/ietf/TCPIPX-MIB:63:12: unexpected "tcpIpxConnLocalPort" (expected "}") 2022-01-06T13:19:52Z W! [inputs.snmp] module TCPIPX-MIB could not be loaded
Is there something additional to be updated?

Hi @er-rhorman , I have the same but at least the plugin keeps running now, which is a great improvement compared to the earlier version. And, at least, I don't need these two MIB files.

While I can see it fetching data (via SNMP), I can see it failing when Grafana calls InfluxDB for the data. When I roll back to 1.20.4, everything works.

Here is my output:
2022-01-06T14:07:08Z I! Starting Telegraf 1.21.2
2022-01-06T14:07:09Z I! Loaded inputs: snmp
2022-01-06T14:07:09Z I! Loaded aggregators:
2022-01-06T14:07:09Z I! Loaded processors:
2022-01-06T14:07:09Z W! Outputs are not used in testing mode!
2022-01-06T14:07:09Z I! Tags enabled: host=raspberrypi05
Parse module: /usr/share/snmp/mibs/miblist.txt:1:12: no match found for .
2022-01-06T14:07:16Z W! [inputs.snmp] module miblist.txt could not be loaded

snmp,agent_host=10.26.83.31,host=raspberrypi05 dig-sens-1-label="Supply Air Temp",dig-sens-1-tempf=10657i,dig-sens-2-label="Return Air Temp",dig-sens-2-tempf=6956i,hostname="EMU-RCH1",internal-label="Basement",internal-temp-fahrenheit=5637i,uptime=190557302i 1641478059000000000

When I roll back, this is what the output is and it works without issue.

2022-01-06T13:21:19Z I! Starting Telegraf 1.20.4

snmp,agent_host=10.26.83.31,host=raspberrypi05 dig-sens-1-label="Supply Air Temp",dig-sens-1-tempf=10646i,dig-sens-2-label="Return Air Temp",dig-sens-2-tempf=6845i,hostname="EMU-RCH1",internal-label="Basement",internal-temp-fahrenheit=5622i,uptime=190279189i 1641475280000000000

@powersj
Copy link
Contributor

powersj commented Jan 6, 2022

@er-rhorman,

In your output above you are running in test mode. This means that outputs are not run and you will not see any data get pushed to InfluxDB:

2022-01-06T14:07:09Z W! Outputs are not used in testing mode!

@er-rhorman
Copy link

@er-rhorman,

In your output above you are running in test mode. This means that outputs are not run and you will not see any data get pushed to InfluxDB:

2022-01-06T14:07:09Z W! Outputs are not used in testing mode!

In both examples above, I'm running the command "telegraf --test --config emu-rch1.conf"

@powersj
Copy link
Contributor

powersj commented Jan 6, 2022

The --test command never runs outputs and never sends data. If you are finding data in InfluxDB then it is older data or data you previously sent.

@er-rhorman
Copy link

er-rhorman commented Jan 6, 2022

Believe I started to hone in on the issue. InfluxDB is working, but since upgrading Telegraf to 1.21.2, it doesn't seem to be writing to the DB any longer. When I check the DB, the most recent time stamps are not changing. So it seems like Telegraf is not running with its polling interval.

@powersj
Copy link
Contributor

powersj commented Jan 6, 2022

@er-rhorman feel free to file a new issue with all the necessary details.

@henriknoerr
Copy link
Author

My issue still persists - I am getting a reboot loop with the snmp change in 1.21.2:

Jan 7 11:51:06 hostname telegraf[805946]: 2022-01-07T10:51:06Z I! Starting Telegraf 1.21.2 Jan 7 11:51:06 hostname telegraf[805946]: 2022-01-07T10:51:06Z I! Loaded inputs: cpu disk internal mem net ping snmp (362x) swap Jan 7 11:51:06 hostname telegraf[805946]: 2022-01-07T10:51:06Z I! Loaded aggregators: Jan 7 11:51:06 hostname telegraf[805946]: 2022-01-07T10:51:06Z I! Loaded processors: converter (2x) Jan 7 11:51:06 hostname telegraf[805946]: 2022-01-07T10:51:06Z I! Loaded outputs: influxdb_v2 (2x) Jan 7 11:51:06 hostname telegraf[805946]: 2022-01-07T10:51:06Z I! Tags enabled: host=hostname Jan 7 11:51:06 hostname telegraf[805946]: 2022-01-07T10:51:06Z I! [agent] Config: Interval:2m0s, Quiet:false, Hostname:"hostname", Flush Interval:10s Jan 7 11:51:08 hostname telegraf[805946]: 2022-01-07T10:51:08Z E! [telegraf] Error running agent: could not initialize input inputs.snmp::/etc/telegraf/telegraf.d/wlc/wlc.conf: initializing table bsnAPTable: initializing field radio24Users: translating: Could not find module named AIRESPACE-WIRELESS-MIB:bsnApIfNoOfUsers Jan 7 11:51:08 hostname systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE Jan 7 11:51:08 hostname systemd[1]: telegraf.service: Failed with result 'exit-code'. Jan 7 11:51:09 hostname systemd[1]: telegraf.service: Service RestartSec=100ms expired, scheduling restart. Jan 7 11:51:09 hostname systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 3. Jan 7 11:51:09 hostname systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB. Jan 7 11:51:09 hostname systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB. Jan 7 11:51:09 hostname telegraf[805967]: 2022-01-07T10:51:09Z I! Starting Telegraf 1.21.2 Jan 7 11:51:09 hostname telegraf[805967]: 2022-01-07T10:51:09Z I! Loaded inputs: cpu disk internal mem net ping snmp (362x) swap Jan 7 11:51:09 hostname telegraf[805967]: 2022-01-07T10:51:09Z I! Loaded aggregators: Jan 7 11:51:09 hostname telegraf[805967]: 2022-01-07T10:51:09Z I! Loaded processors: converter (2x) Jan 7 11:51:09 hostname telegraf[805967]: 2022-01-07T10:51:09Z I! Loaded outputs: influxdb_v2 (2x) Jan 7 11:51:09 hostname telegraf[805967]: 2022-01-07T10:51:09Z I! Tags enabled: host=hostname Jan 7 11:51:09 hostname telegraf[805967]: 2022-01-07T10:51:09Z I! [agent] Config: Interval:2m0s, Quiet:false, Hostname:"hostname", Flush Interval:10s Jan 7 11:51:11 hostname telegraf[805967]: 2022-01-07T10:51:11Z E! [telegraf] Error running agent: could not initialize input inputs.snmp::/etc/telegraf/telegraf.d/wlc/wlc.conf: initializing table bsnAPTable: initializing field radio24Users: translating: Could not find module named AIRESPACE-WIRELESS-MIB:bsnApIfNoOfUsers Jan 7 11:51:11 hostname systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE Jan 7 11:51:11 hostname systemd[1]: telegraf.service: Failed with result 'exit-code'. Jan 7 11:51:12 hostname systemd[1]: telegraf.service: Service RestartSec=100ms expired, scheduling restart. Jan 7 11:51:12 hostname systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 4. Jan 7 11:51:12 hostname systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB. Jan 7 11:51:12 hostname systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB. Jan 7 11:51:12 hostname telegraf[805993]: 2022-01-07T10:51:12Z I! Starting Telegraf 1.21.2 Jan 7 11:51:12 hostname telegraf[805993]: 2022-01-07T10:51:12Z I! Loaded inputs: cpu disk internal mem net ping snmp (362x) swap Jan 7 11:51:12 hostname telegraf[805993]: 2022-01-07T10:51:12Z I! Loaded aggregators: Jan 7 11:51:12 hostname telegraf[805993]: 2022-01-07T10:51:12Z I! Loaded processors: converter (2x) Jan 7 11:51:12 hostname telegraf[805993]: 2022-01-07T10:51:12Z I! Loaded outputs: influxdb_v2 (2x) Jan 7 11:51:12 hostname telegraf[805993]: 2022-01-07T10:51:12Z I! Tags enabled: host=hostname Jan 7 11:51:12 hostname telegraf[805993]: 2022-01-07T10:51:12Z I! [agent] Config: Interval:2m0s, Quiet:false, Hostname:"hostname", Flush Interval:10s Jan 7 11:51:14 hostname telegraf[805993]: 2022-01-07T10:51:14Z E! [telegraf] Error running agent: could not initialize input inputs.snmp::/etc/telegraf/telegraf.d/wlc/wlc.conf: initializing table bsnAPTable: initializing field radio24Users: translating: Could not find module named AIRESPACE-WIRELESS-MIB:bsnApIfNoOfUsers Jan 7 11:51:14 hostname systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE Jan 7 11:51:14 hostname systemd[1]: telegraf.service: Failed with result 'exit-code'. Jan 7 11:51:15 hostname systemd[1]: telegraf.service: Service RestartSec=100ms expired, scheduling restart. Jan 7 11:51:15 hostname systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 5. Jan 7 11:51:15 hostname systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB. Jan 7 11:51:15 hostname systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.

my mib dir for this modue:
root@hostname:/home/root# grep AIRESPACE-WIRELESS-MIB /usr/share/snmp/mibs/* /usr/share/snmp/mibs/AIRESPACE-WIRELESS-MIB.txt:AIRESPACE-WIRELESS-MIB DEFINITIONS ::= BEGIN /usr/share/snmp/mibs/CISCO-LWAPP-RF-MIB.txt: AIRESPACE-WIRELESS-MIB."

@henriknoerr
Copy link
Author

ok my formatting skills in github is non-existent..

@jordipalet
Copy link

jordipalet commented Jan 7, 2022

I'd similar problems, so I downgraded to 1.20.4.

This works in 1.20.4, but not in the latest version:

[[inputs.snmp]]
  agents = [ "10.10.10.15" ]
  version = 2
  community = "public"
#  interval = "300s"
  timeout = "180s"
  retries = 3
  name = "Lantronix.SLP"

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

  # SLP1-MIB:slp1InfeedTable Input Feed Table
  [[inputs.snmp.table]]
    name = "InFeedTable"
    inherit_tags = [ "Lantronix.SLP" ]
    oid = "SLP1-MIB::slp1InfeedTable"

    # In Feed ID tag - used to identify the SLP
    [[inputs.snmp.table.field]]
      name = "InFeedID"
      oid = "SLP1-MIB::slp1InfeedID"
      is_tag = true

  # SLP1-MIB:slp1OutletTable Outlet Table
  [[inputs.snmp.table]]
    name = "OutletTable"
    inherit_tags = [ "Lantronix.SLP" ]
    oid = "SLP1-MIB::slp1OutletTable"

    # Outlet Index tag - used to identify the Outlet                      
    [[inputs.snmp.table.field]]
      name = "OutletID"
      oid = "SLP1-MIB::slp1OutletID"
      is_tag = true

  # SLP1-MIB:slp1TempHumidSensorTable Temperature/Humidity Sensor Table
  [[inputs.snmp.table]]
    name = "TempHumidSensorTable"
    inherit_tags = [ "Lantronix.SLP" ]
    oid = "SLP1-MIB::slp1TempHumidSensorTable"

    # Sensor Index tag - used to identify the Sensor                      
    [[inputs.snmp.table.field]]
      name = "SensorID"
      oid = "SLP1-MIB::slp1TempHumidSensorID"
      is_tag = true

@henriknoerr
Copy link
Author

yeah I forgot to mention, fixed by downgrading to 1.20.4 as well

@Fosten
Copy link

Fosten commented Jan 7, 2022

Same for me. Issue persisted in 1.21.2. Downgrading to 1.20.4 fixed it.

@MyaLongmire
Copy link
Contributor

Can you please open a new issue with the boot loop? The warning of a mib not being loaded should not interfere with the running of telegraf. These warnings are because the file could not be found or the mib has syntax issues that prevents it from being parsed correctly. Please refer to this comment from the gosmi maintainer for more information.

@nferch
Copy link
Contributor

nferch commented Jan 11, 2022

I was seeing similar behavior with 1.21.2 which also was fixed by downgrading to 1.20.4.

Would it be crazy to suggest that gosmi be downgraded to a version that doesn't exhibit this behavior? It would seem that its prior behavior (however incorrect) was relied on by multiple people, so I'd consider that more of a feature than a bug.

@jbuck2005
Copy link

jbuck2005 commented Jan 30, 2022

FWIW this issue is still VERY much a problem - I've got issues across a wide MIB list using v1.21.3-1

The current fix (for me, and others) was downgrading to 1.20.4-1 on my Ubuntu machine via:

curl -LO -C - https://dl.influxdata.com/telegraf/releases/telegraf_1.20.4-1_amd64.deb
sudo dpkg -i telegraf_1.20.4-1_amd64.deb

Be sure to set a hold on telegraf too!

sudo apt-mark hold telegraf

Once I downgraded, my data was once again making it to Influx & I was able to visualize my data in Grafana again

@henriknoerr
Copy link
Author

henriknoerr commented Feb 22, 2022

Thank you, it was fixed with [pull 10299]

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 regression something that used to work, but is now broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.