I am collecting metrics via the
mqtt_consumer input and am wondering if I have this set up in an optimal way. It seems to me this results in a database table with lots of gaps.
[[inputs.mqtt_consumer]] servers = ["tcp://192.168.7.50:1883"] name_override = "emon_input" topics = [ "emon/tank", "emon/Fineoffset-WHx080-236", ] # topic_tag = ""
mqtt_consumer is the measurement.
For each row in the table, I have 2 tags (
topic) with the
topic tag having one of 2 values - the 2 topics I subscribe to.
Each row has a field for a combination of the
fields from the 2 MQTT Topics i.e. each row has a field for all the potential metrics from both topics.
When data comes in from topic 1, the row is partially filled with the values from that topic leaving the other fields empty.
- Have I got that right?
- This seems very inefficient - is it the InfluxDB way?
- I think I want each
topicas it’s own measurement for efficiency. If so, how?