Lightweight DIY Linux Server Monitoring – Part 2: Integrating with Home Assistant via MQTT Discovery
In my previous post, Lightweight DIY Linux Server Monitoring , I shared a simple, dependency-free Bash script designed to monitor Linux environments in a lightweight way and push metrics like disk usage, memory, CPU load, and upgradable " apt " packages to an external MQTT broker. While that setup worked great for a standalone MQTT setup with Node-RED I wanted to take it a step further. In this follow-up, we will upgrade the script to seamlessly integrate with Home Assistant(HA) using MQTT and the Auto-Discovery function. Instead of manually setting up sensors in Home Assistant, the script automatically creates its own device and sensors in Home Assistant the first time it runs and each day if something gone wrong !