Skip to content

IfName plugin causes Telegraf to crash #8842

@Hipska

Description

@Hipska

Relevant telegraf.conf:

# Lookup interface name for qos_portqueue table
[[processors.ifname]]
  namepass = ["qos_portqueue"]

  ## Name of tag holding the interface number
  tag = "InterfaceIndex"

  ## Name of output tag where service name will be added
  # dest = "ifName"

  ## Name of tag of the SNMP agent to request the interface name from
  agent = "agent_host"

  ## Timeout for each request.
  timeout = "5s"

  ## SNMP version; can be 1, 2, or 3.
  version = 2

  ## SNMP community string.
  community = "public"

  ## Number of retries to attempt.
  retries = 3

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

  ## cache_ttl is the amount of time interface names are cached for a
  ## given agent.  After this period elapses if names are needed they
  ## will be retrieved again.
  cache_ttl = "15m"

System info:

Telegraf 1.17.2 (git: HEAD 74011e2) on RHEL 7.4

Steps to reproduce:

  1. Configure ifname plugin
  2. Run telegraf

Expected behavior:

Telegraf not to crash when using ifname processor.

Actual behavior:

Telegraf crashes sometimes when the ifname cache refreshes. So the time telegraf can run continuously is a multiple of the configured cache_ttl.

Additional info:

Stack trace: https://pastebin.com/ty9YxRHb
Trace 2: https://pastebin.com/JCfAhE2W

Metadata

Metadata

Assignees

Labels

area/snmpbugunexpected problem or unintended behaviorpanicissue that results in panics from Telegraf

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions