Is a conf file with multiple agents multithreaded?

Hi. When I have several switches to poll using telegraf snmp input, I usually write a single conf file, and put the agents in a list, like
agents=[“192.168.0.2”,“192.168.0.3”,“192.168.0.4”,“192.168.0.5”]

But, recently I was told that this is not a good approach, since if one agent is offline, it will delay the other agent collections and can even timeout the entire thing. I was told that the best way to do is to have a separate conf file for each of the switches.
Is this right?
I always thought that the agent list was read first, then a thread was created for each agent.
Am I right, or is the person who told me to have separate files right? What is the best way to do it?

Yes and no.

They are indeed threaded, but if one or more device is down telegraf will start doing retries and wait for timeouts on every table. So that will take a lot of time, and Telegraf only considers the plugin to be finished if all parts/devices are finished. So when that happens, it possibly takes longer than the configured interval, meaning telegraf will delay this plugin during next interval because it’s not finished yet.

See where you will get problems now?

The solution is indeed to split/spread the agents into multiple [[inputs.snmp]] sections, but that can also be in the same file. I do split them into a file per agent, but that’s only for my own convenience.