Skip to content

snmp: lengthy & multiple loading of MIBS #10548

@Hipska

Description

@Hipska

Relevent telegraf.conf

[[inputs.snmp_trap]]
  path = ["/usr/share/snmp/mibs"]

Logs from Telegraf

2022-01-31T15:58:39Z I! Starting Telegraf 1.21.3
2022-01-31T15:58:39Z I! Loaded inputs: snmp_trap
2022-01-31T15:58:39Z I! Loaded aggregators: 
2022-01-31T15:58:39Z I! Loaded processors: 
2022-01-31T15:58:39Z I! Loaded outputs: file
2022-01-31T15:58:39Z I! Tags enabled: host=ryzen
2022-01-31T15:58:39Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"ryzen", Flush Interval:10s
2022-01-31T15:58:56Z I! [inputs.snmp_trap] Listening on udp://:162

Note the timestamp difference between the agent settings and snmp_trap finally saying it is listening.

System info

telegraf 1.21.3 + master

Steps to reproduce

  1. Configure snmp_trap input with a directory with lots of MIBs
  2. Start telegraf

Expected behavior

Telegraf to load files quickly and start listening on port immediately.

Actual behavior

Telegraf seems to hang in input initialization with lots of files/big files/malformed files. Does it also appear to read them multiple times?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/snmpbugunexpected problem or unintended behaviorregressionsomething that used to work, but is now broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions