3 ms·
Mosquitto MQTT Broker. Its main purpose is to receive published system status (free disk space, memory, load, temperature) messages from other servers. The clie
by FerretFred 4y ago
Mosquitto MQTT Broker. Its main purpose is to receive published system status (free disk space, memory, load, temperature) messages from other servers. The clients all use mosquitto_pub in a 5-line bash script run by crontab every 5 minutes. It's secure, has a very low overhead all round and I can access the topic from any device that has an MQTT client without needing SSH, VPN etc access.
I also use it for publishing file upload status messages, and recently, the carbon-zero fuel power generation percentage for my neighbourhood.
- alchemist1e9 4y agoThat sounds like a great use case of MQTT. Do you have any tips or references to copy your approach? Is it easy to display the last message received on a collection of topics? It would make it easy to watch a custom summary of a large system.
- FerretFred 4y agoThanks! You should get a broker set up first and play around on localhost: this makes it easier to get acquainted with what you can and can't do. Experiment with the QOS and 'retain' settings to make sure you don't lose messages. I did a writeup at https://petergarner.net/notes.php?thisnote=20190811-Lightweight+Monitoring+System+Using+MQTT.html https://petergarner.net/notes.php?thisnote=20190811-Lightwei... which should give you some ideas. As regards clients I'd recommend the cross-platform MQTT Explorer https://mqtt-explorer.com/ https://mqtt-explorer.com/ and for iOS, I've settled on EasyMQTT which also provides some graphing options. I don't use Android but most of the clients are good (and free). Hope this helps!
- alchemist1e9 4y agoThis is just excellent. Thank you so much. I have a jumble of collectd, statsd into a TICK stack, hooked into PageDuty for alerts, but it’s just all so bulky and weby, whereas your approach is clean and bespoke, especial for monitoring of a custom system/platform. I will be starting on this by end of the day. I like it.
- mxuribe 4y agoWow, this sounds great! Did you happen to write up any details on your blog or someplace? I'm greatly interested in learning more about this!