Maybe somebody can tell me if this is even possible.
I’m storing a series of data in an influxdb database (1.8 for the moment). Each datapoint has an associated timestamp, when it was last acquired. I want to use that timestamp (in unix time format) as the time field in the measurement. I was able to do that if I saved the value directly to influxdb, but now I need to send that data via mqtt (in json format) to a telegraf listener and save it to the influxdb measurement.
However, I have not found a way so far. The field “time” it just not saved into the DB.
I also tried setting this option in telegraf.conf
json_time_key = “unixtime”
Which seems to work for that specific case, but it complains for the rest of the messages (which I cannot control, since they come from zigbee2mqtt) that
2022-02-23T02:57:30Z E! [inputs.mqtt_consumer] Error in plugin: JSON time key could not be found