Some notes I wish existed in my MQTT journey

Mosquitto is a useful messaging protocol which can publish and subscribe messages to various hosts. These messages can be text, sensor data, and all kinds of other things.

tips / warnings

using with collected and rrdtool

SSL error messages weren't very helpful

  • Interval 60 - required
<LoadPlugin mqtt>
    Interval 60
  • CACert /etc/ssl/certs/ca-certificates.crt -- required if you have a public facing ssl cert
  • types.db
    It needs to know what kind of topic you're seeing.
    I got lucky and had temperature, pressure, and humidity in the defaults but not dewpoint which leads to this logfile error.
    mqtt plugin: Unknown type: "dewpoint".
    The solution, create a /etc/collectd/my_types.db and add that to your collectd.conf:
    dewpoint value:GAUGE:U:U
  • make sure your ipv6 address works too