Dear friends,
I’ve had a lot of fun with influxDb, MQTT, Grafana etc. in the last few days. Unfortunately, I can’t get any further at one point. I receive a simple JSON content from an MQTT broker that I would like to transform and, if necessary, select.
{
"selflowtemp": 58,
"heatingpumpmod": 100,
"outdoortemp": 2,
"curflowtemp": 58,
"rettemp": 55.2,
...
}
By specifying in the Telegraf configuration file
data_format = "json"
The transfer to fluxDb also works wonderfully.
Unfortunately, all data comes in under _measurement = mqqt_consumer. That shouldn’t be the case, I would like to run in the temperature values under _measurement = temperature etc. Also add a few tags, such as the location.
Actually exactly what can be seen in the black picture at the following link in the top right.
If I understood it correctly, then you should first
data_format = "json_v2"
and provide additional information accordingly. But after this change nothing is taken over anymore.
What information do I have to make in the configuration file so that the following input would be provided based on the example above:
temperature,location=West,name=Boiler1 selflowtemp=58,outdoortemp=2,curflowtemp=58,rettemp=55.2
even better:
temperature,location=West,name=Boiler1 mytempname1=58,mytempname2=2,mytempname3=58,mytempname4=55.2
I don’t understand something, but I hope for your help
Best regards from Germany