The Telegraf metric aggregation tool is widely used due to its diverse plugins that interface with various systems without requiring complex software logic. However, managing credentials in other subsystems can be challenging. To address this, the article discusses strategies for deploying a Telegraf Docker container using Docker Compose v2, including the use of secrets and secret stores, which provide a safer way to pass credentials to plugins. The article also explores splitting Telegraf configuration files into individual files to make maintenance easier and demonstrates how to mount these files to the Telegraf container using Docker volumes or Configs.