Reading time: 1 minute
Telegrafing data to MQTT
On Friday i wrote an article describing how i configured Telegraf to gather monitoring data from my Technische Alternative CMI.
In this article i wrote that this substituted a python script with addtional processing tasks. One of the task was the transmission of the data into MQTT to provide other systems with this kind of information (it was a small epaper display used as a remote display in my home, i have now solved this differently).
However it’s quite easy to enable Telegraf to distribute the data via MQTT. You have to put the following statements in a file (for example
It’s an addtional output like the InfluxDB output i’m using to store the data. However in this case it’s limited to measurements with the tag
sourcedevice equal to
cmi. As you may remember, i configured the input from the CMI in way, that sets
sourcedevice=cmi and so i’m using this tag now to limit the MQTT transmisssion to CMI data only.
Let’s check this the MQTT server.