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

Precision query parameter not used to set current time in http_listener #3754

Closed
danielnelson opened this issue Feb 6, 2018 · 0 comments · Fixed by #3961
Closed

Precision query parameter not used to set current time in http_listener #3754

danielnelson opened this issue Feb 6, 2018 · 0 comments · Fixed by #3961
Assignees
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@danielnelson
Copy link
Contributor

Bug report

If a timestamp is not explicitly set, the time set by http_listener is not rounded to the precision in the precision query parameter. This behavior differs from InfluxDB.

Relevant telegraf.conf:

Enable http_listener

System info:

[Include Telegraf version, operating system name, and other relevant details]

Steps to reproduce:

  1. curl -i -XPOST 'http://localhost:8186/write?precision=ms' --data-binary 'cpu value=42'

Expected behavior:

Rounded to milliseconds:

cpu value=42 1517883582041000000

Actual behavior:

Still in nanoseconds

cpu value=42 1517883582041456789
@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Feb 6, 2018
@danielnelson danielnelson added this to the 1.6.0 milestone Feb 6, 2018
@danielnelson danielnelson self-assigned this Feb 6, 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