Linux

Where Is the Telegraf Config File?

Telegraf reads telegraf.conf in /etc/telegraf with drop-in snippets in telegraf.d beside it.

Last updated

Telegraf configures from TOML files in /etc/telegraf. The telegraf.conf file sets agent behavior with input and output plugins inline. Drop-in files in telegraf.d extend it per concern without edits.

Plugin order follows file merge across both spots. A config test flag validates before restart. Credentials for outputs belong in restricted files referenced by the config.

Where Telegraf stores this, by platform

Linux
/etc/telegraf/telegraf.conf

Agent plus plugin sections live here. Drop-ins in telegraf.d extend per concern. Validate with the test flag before restart.

Frequently asked questions

How do I add a Telegraf input?

Add its plugin block to telegraf.conf or a telegraf.d snippet, then test and reload. Keep one plugin per file for clarity. Outputs batch automatically.

Why is Telegraf not writing data?

Outputs usually misconfigured credentials or URLs. Run once in test mode to see errors. Check firewall paths to the destination.

Notice an outdated path? Let us know.