The following are my notes for working with MQTT and Telegraf.
MQTT Link to heading
I use the following configuration file:
listener 1883
allow_anonymous true
persistence true
persistence_location /mosquitto/data/
log_type all
Mount the configuration file in docker and run:
|
|
Data Link to heading
I can use curl to send messages:
|
|
However, this does not let me set the QOS of the message. For that I have used
the mosquitto_pub
command, with the -q
flag:
|
|
Telegraf Link to heading
The following config would allow for a persistent session and QOS level of 2:
|
|