A watchdog every 30 seconds.
Alongside the software runs a watchdog that checks it every 30 seconds. After 3 failures in a row it sends a Telegram alert with the reason, and another when it’s back, saying how long it was down. It runs on the same server: if you install it yourself and the whole server goes down, the watchdog goes down with it. With maintenance there is also an external watchdog that alerts you even if the whole server goes down.