# Best way telegraf config file with several agents

**URL:** <https://community.influxdata.com/t/best-way-telegraf-config-file-with-several-agents/9427>\
**Category:** Telegraf\
**Created:** [April 12, 2019, 7:59pm UTC](https://community.influxdata.com/t/best-way-telegraf-config-file-with-several-agents/9427 "2019-04-12T19:59:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulohperes](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/paulohperes/32/3800_2.png) [@paulohperes](https://community.influxdata.com/u/paulohperes)\
**Post date:** [April 12, 2019, 7:59pm UTC](https://community.influxdata.com/t/best-way-telegraf-config-file-with-several-agents/9427/1 "2019-04-12T19:59:40Z")

</div>

Hello,

I have a same collect for several agents (same oid), what best way for a telegraf config file: one file every agent or one file with all agents?

My question is about performance…

---

<div class="post-metadata">

**Author:** ![daniel](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/daniel/32/142_2.png) [@daniel](https://community.influxdata.com/u/daniel)\
**Post date:** [April 12, 2019, 9:50pm UTC](https://community.influxdata.com/t/best-way-telegraf-config-file-with-several-agents/9427/2 "2019-04-12T21:50:23Z")

</div>

Using a single file or multiple files with `--config-directory` shouldn’t really matter. If you are referring to single vs multiple plugins though then loading will be faster with a single plugin, but at runtime they will be more independent with multiple plugins. Independence here will mean one agent not responding won’t be able to interfere with the collection of others.

---

<div class="post-metadata">

**Author:** ![paulohperes](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/paulohperes/32/3800_2.png) [@paulohperes](https://community.influxdata.com/u/paulohperes)\
**Post date:** [April 12, 2019, 10:04pm UTC](https://community.influxdata.com/t/best-way-telegraf-config-file-with-several-agents/9427/3 "2019-04-12T22:04:50Z")

</div>

Tks Daniel again…
