0

Has anyone used telegraf as a Windows Service?

I'm trying to create a service using WinSW.

Here's how the command runs from a command line:

telegraf.exe --config telegraf_mqtt_to_influxdb_standalone.conf

And it works fine. Here's the xml (telegraf-service.xml):

<service>
  <id>telegraf-service</id>
  <name>Telegraf Service</name>
  <description>Service for Telegraf</description>
  <executable>telegraf.exe</executable>
   <startargument>--config telegraf_mqtt_to_influxdb_standalone.conf</startargument>
  <logmode>rotate</logmode>
</service>

it installs fine, you can see it in windows service. However, when you start it, the log shows it's failing with this error:

E! flag provided but not defined: -config telegraf_mqtt_to_influxdb_standalone.conf

Any ideas how to solve this?

Jack BeNimble
  • 35,733
  • 41
  • 130
  • 213

0 Answers0