Displaying metrics in graph with given (time,value) elements

My setup is using Telegraf as a Mosquitto subscriber. Data is then fed to InfluxDB in JSON format.
I would like Grafana to display points in a graph, but data coming are in the form:

{ “epoc_s”: 1444403034, “value”: 1234 }

where “epoc_s” is the EPOC time in seconds.

I want the graph point to be located at the given time, not the time of the InfluxDB data fetch by Grafana.
Is it possible and if so, how?

Thx.

Do not think InfluxDB allows you to overwrite/change the time field.

Yes, thank you very much, you got it.
You helped me to focus on the problem.
Here is the solution: http://stackoverflow.com/questions/29738351/inserting-with-a-specific-time

{
    name:    "my_serie",
    columns: ["time", "value1", "value2"],
    points:  [
             [1429807111, 1, 2],
             [1429807111, 11, 22],
             [1429807111, 111, 222]
           ]
}

Then, if I opt for

data_format = "influx"

in the [[inputs.mqtt-consumer]] of Telegraf configuration file, and specify data according to the description above, it should do what I want: inserting points at a specific time.

1 Like