Telegraf natively supports running as a Windows Service. Outlined below is are the general steps to set it up.
C:\Program Files\Telegraf
(if you install in a different location simply specify the -config
parameter with the desired location)C:\Program Files\Telegraf
> C:\"Program Files"\Telegraf\telegraf.exe --service install
> C:\"Program Files"\Telegraf\telegraf.exe --config C:\"Program Files"\Telegraf\telegraf.conf --test
> net start telegraf
Telegraf can manage its own service through the –service flag:
Command | Effect |
---|---|
telegraf.exe --service install | Install telegraf as a service |
telegraf.exe --service uninstall | Remove the telegraf service |
telegraf.exe --service start | Start the telegraf service |
telegraf.exe --service stop | Stop the telegraf service |
© 2015 InfluxData, Inc.
Licensed under the MIT license.
https://docs.influxdata.com/telegraf/v1.3/administration/windows_service/