Am sending data in json format using telegraf. But the column headers in the measurements are shown as Parameter_0_datatype,Parameter_0_value, etc. The json string does contain the parameter names but it’s not taking them. How can I solve this?
Following is my input_plugin in the conf file
[[processors.converter]]
[processors.converter.tags]
measurement = [“topic”]
Read metrics from MQTT topic(s)
[[inputs.mqtt_consumer]]
servers = [“localhost:1883”]
servers = [“10.255.201.118:1883”]
MQTT QoS, must be 0, 1, or 2
qos = 0
Topics to subscribe to
topics = [
“Lenze”,
“LACC”,
“DIAG”
]
if true, messages that can’t be delivered while the subscriber is offline
will be delivered when it comes back (such as on service restart).
NOTE: if true, client_id MUST be set
persistent_session = false
If empty, a random client ID will be generated.
client_id = “”
username and password to connect MQTT server.
username = “telegraf”
password = “pwd”
data_format = “json”