Janitor monitors MQTT for IOT connectivity
No need to sweat if your IOT devices are online or not. Janitor has your back with automated alerts!
Ever since I started implementing Zigbee devices to my Home Assistant instance the need for connection monitoring was real. I recently added all the last_seen
sensors of my devices to a Home Assistant dashboard so that I wouldn't have to visit the Zigbee2mqtt dashboard. I then came to the conclusion that visual checks are one thing, but automated ones are the end goal. That's where janitor comes in.
Janitor checks the frequency of MQTT messages received from the devices you monitor and reports through Telegram/Gotify/MQTT if one appears to be offline or simply off the network.
The following docker-compose.yml is what got me started, along with a config file located on a path of your liking. Edit the volumes:
path with the one you'll be using.
In my config.yml I explicitly set my targets instead of a catch-all zigbee2mqtt/#
topic because that messes up the janitor layout, so I define all the ones I need to monitor. Take note to define custom timeout (in seconds) for your devices since the default setting uses an algorithm that might start spamming your alerting system after a short while.
Along with MQTT message delivery monitoring, janitor offers HTTP, Ping and general command execution, so it is quite a versatile monitoring solution.