Telegraf Collector is not working

Hi, I want to send data via Telegraf to another service. I’ve already configured the outputs and the command to test it works it shows data, but the collector is stopped and I try to force it but it doesn’t work. The collector stops by itself

Whats the error that it shows when you start it?


The way to send the logs is manual… it is stopped and does not change if forced

Kind of out of my normal routine here since this looks like windows instead of linux. Can you try opening a PS session and try and start it up?

PS> .\telegraf --config-directory 'C:\Program Files\telegraf\conf' --test

That command doesn’t seem to work… additionally, I sent you the command with which I can send logs every time I run

2025-04-03T15:57:52Z W! Telegraf is not permitted to read C:\Program Files\telegraf\conf
2025-04-03T15:57:52Z E! unable to load default config paths: no config file specified, and could not find one in $TELEGRAF_CONFIG_PATH, /.telegraf/telegraf.conf, C:\Program Files\Telegraf\telegraf.conf, or C:\Program Files\Telegraf\telegraf.d/*.conf

It looks like you are trying to run two different commands. The first screen shot shows that you are trying to run:

.\telegraf --config-directory 'C:\Program Files\telegraf\conf' --test

However the second screen shot shows that there is no \conf directory under telegraf at all and when you get it to successfully work via the cmd output you ran:

telegraf.exe --config telegraf.conf --test

So in the first one you are trying to call a directory that doesn’t exist and in the second one you are calling a single config file.

So, how do I proceed? How can I fix the collector issue?

Change your service to call the telegraf.conf file instead or create a new directory called conf under the telegraf directory and move your telegraf.conf file into it instead of the telegraf folder.