Closed orcunbaslak closed 5 years ago
@orcunbaslak Try these settings out:
[[inputs.mqtt_consumer]]
# ... snip...
json_query = "values"
tag_keys = ["id"]
json_time_key = "t"
json_time_format = "unix_ms"
data_format = "json"
fielddrop = ["t"]
The fielddrop
is needed because the time_key is not removed from the output even after being used. I think this is unwanted behavior so I created #4950.
Hello,
I'm trying to parse a JSON at Telegraf and failing at it.
JSON is like this.
and my Telegraf config is like this
In the json; id will be the tag, t will be the timestamp and v is the value of the tag. timestamp at the top can be ignored.
Any help on this structure is very much appreciated.
Br,