I am using telegraf 1.3.0 to run a custom powershell script using input.exec. The output is line protocol and is supposed to write to influxdb.
When I run the telegraf from command prompt, every thing works fine. I can see all the metrics getting written to influxdb.
I am expecting line protocol output in following format:
Exports,Id=123456,Profile=Profile_Name,Status=Completed,HH=NN,MM=NN Count=12345 time
However when I run the telegraf as a service I keep getting errors like the below ones:
2017-09-05T07:22:02Z E! Error in plugin [inputs.exec]: metric parsing error, reason: [invalid field format], buffer: [Exports,Id=1060848,Profile=Initial\ Item\ Export,Status=Completed,HH=0,MM=20 Co], index: [79] metric parsing error, reason: [invalid field format], buffer: [unt=0 1504596045240000000], index: [25] metric parsing error, reason: [missing fields], buffer: [ 1504596103010000000], index: [20] metric parsing error, reason: [invalid field format], buffer: [Exports,Id=1060850,Profile=Enriched\ Item\ Export,Status=Completed,HH=0,MM=21 C], index: [79] metric parsing error, reason: [invalid field format], buffer: [ount=0 1504596068890000000], index: [26]
I have tried using file as ouput also but still the same issue happens.