Split telegraf.conf and multiple config

Hi,

I saw that it is possible to have more .conf files inside the ‘telegraf.d’ directory. How does it work if each file has its own agent session? Does the metric_buffer_limit apply only to what is declared inside the file? Does the agent get multiple buffers? Is it okay to have only the agent session in one file and other files for outputs, or must the outputs be part of an agent session?

Thanks

Don’t do this :slight_smile: The agent section is not a list but a single defined entry hence the single brackets. It leads to undefined behavior. All configs in Telegraf are combined into a single large config when they are loaded. The use of multiple config files is only for user convenience.

Please see: telegraf/docs/TOML.md at master · influxdata/telegraf · GitHub

Is it okay to have only the agent session in one file and other files for outputs, or must the outputs be part of an agent session?

Ideally, you have a single agent section that is read in the first file that is read in. This ensures any settings you change are applied to all other plugins. Then you can break out the inputs, processors, aggregators, secret stores, and outputs however you see fit.

This helped a lot!
I managed to find a good config split that way
Thank you!