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

wrong timestamp in line protocol "influx" file input #15120

Closed
RodrigoDornelles opened this issue Apr 8, 2024 · 1 comment
Closed

wrong timestamp in line protocol "influx" file input #15120

RodrigoDornelles opened this issue Apr 8, 2024 · 1 comment
Labels
bug unexpected problem or unintended behavior

Comments

@RodrigoDornelles
Copy link

RodrigoDornelles commented Apr 8, 2024

Relevant telegraf.conf

[[inputs.file]]
  files = ["/logs/*.log"]
  data_format = "influx"

[[outputs.file]]
  files = ["stdout"]
  data_format = "json"

Logs from Telegraf

{"fields":{"data":"IiI==","foo":"bar"},"name":"index_name","tags":{"zip":"zap"},"timestamp":2}
2024-04-08T17:59:42Z D! [outputs.file] Wrote batch of 1 metrics in 317.708µs

System info

Linux 5.15, Docker 26.0, Telegraf 1.30.1

Docker

No response

Steps to reproduce

write an file log like:

index_name,data=IiI==,foo=bar zip="zap" 1711190482

Expected behavior

1711190482 in the unixtimestamp json.

Actual behavior

wrong date!

Additional info

No response

@RodrigoDornelles RodrigoDornelles added the bug unexpected problem or unintended behavior label Apr 8, 2024
@RodrigoDornelles
Copy link
Author

sorry, missing influx_timestamp_precision = "1s"
its fixed!

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

No branches or pull requests

1 participant