Solution for MQTT consumer in Telegraf:
- Assign Topic to filter
- Assign Tags, Fields and Timestamp in the JSON MQTT sub message to match Influx Line protocol. The tags are like names to the measurements in the Fields portion of the message. The timestamp is setup by influx automatically. Make sure to set the right timescale in Agent part of the config.
- Make sure to Identify parts of the JSON that aren’t considered conventional, for those use processors.
- Watch out for namepass.