Notify when a host has needed a reboot or updates for too long

The alert timer now evaluates each host with the dashboard's status logic
and sends one ntfy message once a host has been in reboot or update for
status_alert_after_hours, measured from when it entered that status.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
patrickandClaude Sonnet 5.5 committed 2026-10-29 20:32:24 -04:00
1 parent d6480ef1b9
commit ce231bd471
4 files changed
+196 -4

No files matched your search

+8
View File
@@ -67,6 +67,14 @@ class ConfigTest(unittest.TestCase):
with self.assertRaises(SystemExit):
config.load(self.write(tmp, "secure_cookies = 1\n"))
def test_status_alert_hours_validated(self):
with tempdir() as tmp:
self.assertEqual(config.load(self.write(tmp, "status_alert_after_hours = 0\n"))
.status_alert_after_hours, 0)
for bad in ("-1", "inf", "nan"):
with self.subTest(bad=bad), self.assertRaises(SystemExit):
config.load(self.write(tmp, f"status_alert_after_hours = {bad}\n"))
def test_fallback_parser_matches_tomllib(self):
"""Python 3.10 has no tomllib; the fallback must read the same configs."""
if config.tomllib is None: