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

processor.snmp_lookup panic when no response from device #15465

Closed
Hipska opened this issue Jun 6, 2024 · 0 comments · Fixed by #15466
Closed

processor.snmp_lookup panic when no response from device #15465

Hipska opened this issue Jun 6, 2024 · 0 comments · Fixed by #15466
Labels
bug unexpected problem or unintended behavior

Comments

@Hipska
Copy link
Contributor

Hipska commented Jun 6, 2024

Relevant telegraf.conf

[[processors.snmp_lookup]]
  namepass = ["interface"]

  ## Name of tag holding the table row index
  index_tag = "index"

  ## SNMP community string.
  community = "public"

  ## The GETBULK max-repetitions parameter.
  max_repetitions = 100

  ## The amount of agents to cache entries for. If limit is reached, 
  ## oldest will be removed first. 0 means no limit.
  max_cache_entries = 0

  ## List of tags to be looked up.
  [[processors.snmp_lookup.tag]]
    oid = "IF-MIB::ifName"

Logs from Telegraf

2024-06-05T08:32:43Z E! [processors.snmp_lookup] Building table for "172.16.43.2" failed: performing bulk walk for field ifName: request timeout (after 3 retries)
Worker exits from a panic: runtime error: invalid memory address or nil pointer dereference
Stack trace: goroutine 160 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x5e
github.com/alitto/pond.defaultPanicHandler({0x70a8180, 0xdc68f90})
/go/pkg/mod/github.com/alitto/pond@v1.8.3/pond.go:26 +0x25
github.com/alitto/pond.(*WorkerPool).executeTask.func1()
/go/pkg/mod/github.com/alitto/pond@v1.8.3/pond.go:437 +0x4a
panic({0x70a8180?, 0xdc68f90?})
/usr/local/go/src/runtime/panic.go:770 +0x132
github.com/influxdata/telegraf/plugins/processors/snmp_lookup.(*backlog).resolve(0xc03b210180, {0xc0256de590, 0xb}, 0x0)
/go/src/github.com/influxdata/telegraf/plugins/processors/snmp_lookup/backlog.go:79 +0x26e
github.com/influxdata/telegraf/plugins/processors/snmp_lookup.(*store).enqueue.func1()
/go/src/github.com/influxdata/telegraf/plugins/processors/snmp_lookup/store.go:80 +0x96
github.com/alitto/pond.(*WorkerPool).executeTask(0xc03b220000, 0x0?, 0x0?)
/go/pkg/mod/github.com/alitto/pond@v1.8.3/pond.go:454 +0x6c
github.com/alitto/pond.worker({0x8cdbd10, 0xc03aee5400}, 0x0?, 0x0?, 0xc02f837980, 0xc03aee1ee0)
/go/pkg/mod/github.com/alitto/pond@v1.8.3/worker.go:32 +0xc2
created by github.com/alitto/pond.(*WorkerPool).maybeStartWorker in goroutine 1
/go/pkg/mod/github.com/alitto/pond@v1.8.3/pond.go:423 +0x133

System info

Telegraf 1.30.3

Docker

No response

Steps to reproduce

  1. Run telegraf
  2. Have metric for source which does not respond (in my case it was because of max-repetitions was too high for the device)

Expected behavior

Processor to return the metrics unmodified.

Actual behavior

Telegraf panics with given stack trace and crashes.

Additional info

No response

@Hipska Hipska added the bug unexpected problem or unintended behavior label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant