ThomDietrich / miflora-mqtt-daemon

Linux service to collect and transfer Xiaomi Mi Flora plant sensor data via MQTT to your smart home system, with cluster support 🌱🌼πŸ₯€πŸ‘🌳
MIT License
610 stars 140 forks source link

Healthchecks.io integration #122

Open Kernald opened 4 years ago

Kernald commented 4 years ago

I have this daemon running on a Pi Zero W which, sometimes, locks up entirely. Sometimes, I move plants around, and the sensors are out of BT range. All in all, I sometimes lose a sensor and I have no easy way to detect that - there's some data on the MQTT broker, but it might be stale, as there's no date information pushed, as far as I'm aware.

Healthchecks.io (and other similar services, it just happens to be the one I already use) could be a good way to monitor that kind of issues - it works by setting an expected delay between pings, and send notifications if one isn't received. The caller can also report an actual failure (e.g. if a sensor hasn't been reached in a x attempts). The API is really simple: https://healthchecks.io/docs/http_api/

What do you think about adding this kind of monitoring?