Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid number error when parsing line protocol with dos line endings #3631

Closed
danielnelson opened this issue Jan 2, 2018 · 0 comments · Fixed by #3924
Closed

Invalid number error when parsing line protocol with dos line endings #3631

danielnelson opened this issue Jan 2, 2018 · 0 comments · Fixed by #3924
Assignees
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@danielnelson
Copy link
Contributor

Bug report

Relevant telegraf.conf:

[[inputs.exec]]
   commands = ['sh -c "cat ~/telegraf.txt"']
   timeout = "25s"
   data_format = "influx"

System info:

$ ./telegraf --version
Telegraf v1.6.0~06c21fb9 (git: master 06c21fb9)

Steps to reproduce:

$ cat ~/telegraf.txt
dt,entity=SERVICE-F08D806E7EF685CF timeseriesId="com.dynatrace.builtin:service.responsetime",metric=56167.75
dt,entity=SERVICE-F08D806E7EF685CF timeseriesId="com.dynatrace.builtin:service.responsetime",metric=65166.0
$ file ~/telegraf.txt
/home/dbn/telegraf.txt: ASCII text, with CRLF line terminatorst
$ telegraf --test
2018/01/02 10:54:07 I! Using config file: /home/dbn/.telegraf/telegraf.conf
* Plugin: inputs.exec, Collection 1
2018-01-02T18:54:07Z E! Error in plugin [inputs.exec]:  invalid number invalid number

Expected behavior:

$ telegraf --test
2018/01/02 11:00:57 I! Using config file: /home/dbn/.telegraf/telegraf.conf
* Plugin: inputs.exec, Collection 1
> dt,entity=SERVICE-F08D806E7EF685CF,host=loaner timeseriesId="com.dynatrace.builtin:service.responsetime",metric=56167.75 1514919658000000000
> dt,entity=SERVICE-F08D806E7EF685CF,host=loaner timeseriesId="com.dynatrace.builtin:service.responsetime",metric=65166 1514919658000000000

Actual behavior:

2018-01-02T18:54:07Z E! Error in plugin [inputs.exec]:  invalid number invalid number

Additional info:

Changing the file to unix line endings results in correct parsing.

@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Jan 2, 2018
@danielnelson danielnelson added this to the 1.6.0 milestone Jan 2, 2018
@danielnelson danielnelson self-assigned this Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant