How is the publication of telegraf to influx?

How is the publication of Telegraf to influx?

I have an iot particle device, a webhook configured correctly with telegraf and influx and the grafana viewer.
The problem lies in the timestamp. My iot device is not published immediately when taking the measurement from a sensor, the device fills a queue and when it reaches X nodes it will publish the events every 1 second, imagine that the data is sensed every 5 minutes.
The problem is that telegraph takes the time of the arrival of the events and uses that timestamp at the entrance time or I don’t know how it does it, but it doesn’t help me.
I need my data to be organized in grafana at the time it was sensed and not when it was published, how can I do it? I don’t understand how the telegraf publishes the data to influence
Some of my data
particle publication;
event: test
data: {“data”: “{” tags \ “: {” id \ ": " 1 \ "}, " values ​​\ “: {” time \ ": 1595281991000000000, " sensor \ ": 13}} “,” ttl “: 60,” updated_at “:” 2020-07-20T21: 53: 14.710Z “,” coreid “:” private "}

Telegraf should be using the timestamp on the metric, and doesn’t give it a new one if it already has one.

If you’re using JSON data, the issue might be that it doesn’t know which field has the timestamp data. Check out the examples of JSON configuration for more details.

If you need more specific help, I’d suggest posting the configuration you’re using with Telegraf, and we can dig into it further.

Cheers,
Steven

1 Like