Hi,
this is my first try with Telegraf and I’m struggling with MQTT data for storing on influxdb.
Subscription to the topic works but the only way i found to store the data to influxdb is:
data_format=value
data_type=string
Then the value in the measurement is the full json MQTT message like this
time host topic value
---- ---- ----- -----
1527437423530234352 Ubuntu-1604-xenial-64-minimal mw/openair/807f6940-d0f6-11e7-b63b-001999f98771 {“temp”: “32.76”,“hum”: “25.44”,“r2”: “1715”}
1527437423591364969 Ubuntu-1604-xenial-64-minimal mw/openair/807f6940-d0f6-11e7-b63b-001999f98771 {“pm10”: “0.00”,“pm25”: “0.00”,“rssi”: “-60”,“r1”: “52” }
The original MQTT message looks like
{
“pm10” : “0.00”,
“pm25” : “0.00”,
“rssi” : “-57”,
“r1” : “184”
}
which is a valid json format - BUT every single data is delivered as string data.
I have no access to the original data, so reformatting this is not an option.
I tried other data formats without any success.
Any idea?
for Reinhard - thanks