Telegraf SNMP plugin log_level error

Hi!
Here

https://github.com/influxdata/telegraf/blob/master/docs/CONFIGURATION.md#input-plugins

the log_level parameter is listed as available, for any plugin.

But setting it at inputs.snmp with version 1.31.2 fails:

2024-09-05T16:20:05Z E! error loading config file /home/paas/telegraf/prod/ARBBCWP_GDE_LSW_SEQ0102/INPUTS_SNMPv2-MIB.conf: plugin inputs.snmp: line 1: configuration specified the fields ["log_level"], but they were not used. This is either a typo or this config option does not exist in this version.

This is my conf file:

[[inputs.snmp]]
  agents = ["udp://nnn.nnn.nnn.nnn:161"]

  timeout = "15s"
  version = 2
  community = "xxxxxxxxxxxx"
  retries = 5
  max_repetitions = 10
  interval = "24h"
  agent_host_tag = "source"
  tagexclude = ["host"]
  log_level = "debug"

Is it an error in the version or the log_level was not available for snmp plugin?

Regards!

@PabloFraire yes because you are looking at the documentation of the master branch but your version is release v1.31.2! The new option is not yet release and will only be available from v1.32.0 onwards. Lucky you, the scheduled release for v1.32.0 is Monday, September 9th… :wink:

1 Like

Finally I installed v1.32.0 and worked perfectly.

For the wish list, I would like some increased log level, like a way to log something form the config file.

Say a tag like

to_log = “I was here”

or

to_log = record which agent cause an error.

Regards!