Hi @Anaisdg , thanks for getting back!!
Sorry, I didnāt mean to confuse, let me re-iterate. If I donāt specify the timestamp:
name_override = "interval"
tagexclude = ["url", "host"]
data_format = "json_v2"
[[inputs.http.json_v2]]
[[inputs.http.json_v2.object]]
path = "data"
#timestamp_key = "time"
#timestamp_format = "2023-05-07T19:30:00"
included_keys = [
"value",
"time"
]
telegraf - test returns the following:
interval time="2023-05-07T20:20:00",value=11093.7 1683491942000000000
I meant to say that I donāt need the current time, i.e. the last column in unix / epoch time since that is off from the actual, sensor provided measurement. But when I specify the timeformat:
name_override = "interval"
tagexclude = ["url", "host"]
data_format = "json_v2"
[[inputs.http.json_v2]]
[[inputs.http.json_v2.object]]
path = "data"
timestamp_key = "time"
timestamp_format = "2023-05-07T19:30:00"
included_keys = [
"value",
"time"
]
telegraf - test returns nothing beyond:
(...)
2023-05-07T20:40:15Z W! Outputs are not used in testing mode!
2023-05-07T20:40:15Z I! Tags enabled: host=hostname
I didnāt look into verbose logging, Iām just assuming that the timestamp_format canāt deal with the quotes the datetime is wrapped in (canāt change the sensor json output Iām afraid).
"time": "2023-05-04T23:10:00",
doesnāt work.
"time": 2023-05-04T23:10:00,
should work based on other examples Iāve found (I havenāt fully confirmed with a local json / repro yet).
Just to confirm, you would assume that is the issue too, right? I.e. that timestamp_format canāt match values (iso / epoch) in quotes?
Iāve stumbled over execd but I was also looking at processors.regex, to apply a simple regex to remove the quotes, I just didnāt find how to get a value from the json and then use the processed value as an input for timestamp_format. Iāll look at read some more if you say that is possible.
Sorry for my ignorance and thanks again for your help!
Valentin