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 inputs.http_listener ignores timestamp precision #2359

Closed
Menthalion opened this issue Feb 2, 2017 · 1 comment
Closed

Telegraf inputs.http_listener ignores timestamp precision #2359

Menthalion opened this issue Feb 2, 2017 · 1 comment

Comments

@Menthalion
Copy link

Menthalion commented Feb 2, 2017

Bug report

When Telegraf with http_listener is used as a proxy for InfluxDB, the http request parameter precision=<unit> is ignored, and times are passed through as nanoseconds even if they aren't.

Relevant telegraf.conf:

Default inputs.http_listener and either http or udp outputs.influxdb

System info:

Telegraf 1.1.2, InfluxDB 1.2 on Ubuntu 16.04

Steps to reproduce:

  1. Set up a Telegraf with inputs.http_listener that forwards it's data to Influxdb
  2. Send a http request to Telegraf with precision=s and timestamps in seconds/epoch
  3. Query InfluxDb to see the timestamp

Expected behavior:

The timestamp in influxdb is registered in seconds / epoch, and corresponds with the time of the measuremt

Actual behavior:

The timestamp is registered in nanoseconds / epoch, and correspond with a time in 1970

Proposal:

Either have Telegraf cast the timestamp from the input precision to nanoseconds, or pass through both timestamp and precision to the outputs.

Use case:

Most metrics systems supporting InfluxDB only support HTTP requests, but a high load of HTTP requests cause performance problems by each causing a WAL sync.

So that's why we need either

  • Telegraf as dependable HTTP->Telegraf->UDP->InfluxDB proxy, or
  • InfluxDB needs to be adjusted so HTTP requests will be buffered for an amount points before a write just like the UDP / TCP / Graphite inputs do. This would mean the status returned on such a http request should be a 202 (Accepted). An additional parameter for guaranteed write could also be created.
@sparrc
Copy link
Contributor

sparrc commented Feb 2, 2017

telegraf is not meant to be a proxy for InfluxDB, it accepts line-protocol which is defined as having nanosecond timestamps.

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