Reg - How to use mutiple conf files in telegraf windows

Hello Team,

How to run the two different telegraf.conf files in the windows Server from a single telegraf data collector?


this is fairly straight forward. I’ll make some assumptions but update the below to fit your needs.

Assuming, telegraf is running from c:\program files\telegraf\

so in that directory there would be your normal config.

you might have

c:\program files\telegraf\telegraf.exe
c:\program files\telegraf\config.conf

Create a directory (i call mine configd)

c:\program files\telegraf\configd

Place your additional configs in there, then start the telegraf agent

Through CMD:

browse to the location of the telegraf exe file

.\telegraf.exe -config c:\program files\telegraf\config.conf --config-directory c:\program files\telefraf\configd

If you’re running this as a windows service, then update your service definition to include the --config-directory parameter.

That will load additional plugins, but if you are wanting to use multiple connections to different databases then I’m not sure if that will work or whether you will get duplicate data across multiple databases.

An remember to wrap the path to your configs in double quotes if the path has a space in.


Thank you and I will check like the above.