Possibility to see failed snmp target


From telegraf log I see that SNMP data collection took longer that 5 min

2024-02-19T16:30:04+02:00 W! [inputs.snmp] Collection took longer than expected; not complete after interval of 5m0s
2024-02-19T16:30:04+02:00 D! [inputs.snmp] Previous collection has not completed; scheduled collection skipped

I have 25 SNMP targets defined. Is possible to see which exactly SNMP target failed?

The advised way is to split each target into a separate inputs.snmp config section, and then set an alias for each. That way you can clearly see in the logs which is failing.

See also Telegraf Best Practices: SNMP Plugin | InfluxData

I have such setup at the moment
agents = [ “” ]
tags = {alias = “host-server-2”}

When running telegraf --test I see alias in output (but telegraf log is not showing alias)

Format is:

	alias = "host-server-2"
	agents = [ "" ]

Thanks, this one worked