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

Telegraf/InfluxDB ignoring nanosecond precision #3079

Closed
MarioJelev opened this issue Aug 1, 2017 · 3 comments
Closed

Telegraf/InfluxDB ignoring nanosecond precision #3079

MarioJelev opened this issue Aug 1, 2017 · 3 comments

Comments

@MarioJelev
Copy link

Hi,

We are running into an issue with Telegraf where the nanosecond precision of our records is being ignored upon inserting the data into InfluxDB.

We have a shell script pulling data from an Oracle database and formatting it into the InfluxDB insertion syntax. These records contain a timestamp that is nanosecond-sensitive (an example of a timestamp for one of these records would be 1491728400000000056.)

When we point the [[inputs.exec]] configuration option to our shell script and execute Telegraf, all of the correct tags and fields are being written to our InfluxDB instance, but the nanoseconds of our records' timestamps are being ignored. A record that has 1491728400000000056 would be inserted as 1491728400000000000 . This still happens after setting 'precision="ns"' under the [Agent] and [[outputs.influxdb]] configuration options.

Spooling the script output to a file and inserting it to InfluxDB via the InfluxDB HTTP API works perfectly, so the query is not the issue.

We are using Telegraf v1.3.5.

Thank you!

@danielnelson
Copy link
Contributor

I think you just need to change you config to precision="1ns"

@MarioJelev
Copy link
Author

@danielnelson Thanks Daniel! This fixed the issue. I had been looking at the configuration file documentation (https://github.com/influxdata/telegraf/blob/master/docs/CONFIGURATION.md) and all of the examples just had the "s" precision, so I did not think to explicitly specify the number of seconds.

@danielnelson
Copy link
Contributor

Sorry about that, I'll fix up the examples.

@danielnelson danielnelson reopened this Aug 1, 2017
maxunt pushed a commit that referenced this issue Jun 26, 2018
Precision is no longer used by the InfluxDB output.

closes #3079
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants