with alerts

This commit is contained in:
2026-08-10 21:07:53 +02:00
parent 164664a075
commit e75c3c2358
2 changed files with 130 additions and 1 deletions
+14
View File
@@ -821,6 +821,20 @@ weekly dashboard at `/ups/week.html` shows one-week history for every collected
value. The pages link to each other, refresh every 60 seconds, and open a
full-size PNG when a graph is clicked.
## UPS notifications
The collector also sends an ntfy notification when:
- The UPS status changes
- Battery charge crosses below 50%
- Battery charge crosses below 5%
- Estimated battery runtime crosses below 5 minutes
Alert state is stored in `/var/lib/rrd/bx950mi-alert-state.json`, allowing
changes to be detected across cron runs. The first run establishes a baseline
without sending notifications. Threshold notifications can fire again after a
value recovers above the threshold and later drops below it.
---
# 19. Testing the Python program