i’m trying to configure telegraf to fetch data from two different mqtt servers, outputting to seperate databases. i found this, which i guess should handle the outputs:
but i can’t find any examples of how to configure the inputs - if it’s possible that way at all…
i assumed that cloning the whole block from [[inputs.mqtt_consumer]] and adapting the values below that should do the trick - but i’m getting a parse error on the second [[inputs.mqtt_consumer]].
Assigning inputs to outputs is certainly something that we’re happy to see implemented, but with 2.x so close; it’s going to need to be community contribution for now.
You can do this with a single Telegraf, there are very few reasons to run Telegraf more than once on a system. Your strategy is the right one, just have multiple mqtt_consumer tables, can you show your config and the parse error you are seeing?
thanks … quickly gave it another try before heading to bed …
indeed telegraf started up with two mqtt-inputs defined - without adding a tag … a quick search revealed that i had it put in the wrong place, directly after the opening [[inputs.mqtt_consumer]] though it should go to the end …
unfortunately i turned off the device (it’s at another house) sending the data earlier today so i can’t check if it’s really working as expected, but i’m confident now that it’s at least starting up properly…