The alert timer now also notifies when a host has stayed in reboot or update
status past a grace period, so pending reboots and security updates no longer
depend on someone opening the dashboard.
Each check runs the dashboard's own evaluate() on every host's latest report.
A host gets one ntfy message once it has been in reboot or update for status_alert_after_hours (default 24, 0 disables). The message lists the
same reasons the dashboard shows.
The clock starts when the host entered the status, not at its last report,
so hourly reports don't restart it.
Returning to ok clears the state, so the host can alert again later.
update -> reboot alerts again after another grace period; reboot -> update does not.
Stale hosts are skipped; the existing stale alert covers them.
Failed sends are retried on the next check, and one host's failure doesn't
block the others.
Server-side only: agents and deploy.sh are unchanged.
Changes
db.py: new status_alerts table (CREATE TABLE IF NOT EXISTS, so no
migration) plus save/clear/list helpers.
alerts.py: _check_status(), called from check() after the stale/recovery
pass; publish() takes an optional tag.
config.py / server.toml.example: status_alert_after_hours, validated as
finite and >= 0.
README: alerts section, admin command description, "Ideas for later".
Upgrade notes
Re-run sudo ./server/install.sh; no agent redeploy needed.
Anyone with ntfy_url set gets these alerts by default. Set status_alert_after_hours = 0 to opt out.
Each host's clock starts at its first check after upgrading, so hosts that have
been pending for weeks will first alert about a day later, not immediately.
Testing
make test: 104 tests pass (8 new). New tests cover the grace boundary, the
clock not resetting on new reports, one alert per episode, re-arming after a
fix, escalation vs. downgrade, stale hosts being skipped, retry after a failed
send, and 0 disabling. Not yet tried against a live ntfy topic.
## Summary
The alert timer now also notifies when a host has stayed in `reboot` or `update`
status past a grace period, so pending reboots and security updates no longer
depend on someone opening the dashboard.
- Each check runs the dashboard's own `evaluate()` on every host's latest report.
- A host gets one ntfy message once it has been in `reboot` or `update` for
`status_alert_after_hours` (default 24, `0` disables). The message lists the
same reasons the dashboard shows.
- The clock starts when the host *entered* the status, not at its last report,
so hourly reports don't restart it.
- Returning to `ok` clears the state, so the host can alert again later.
- `update` -> `reboot` alerts again after another grace period; `reboot` ->
`update` does not.
- Stale hosts are skipped; the existing stale alert covers them.
- Failed sends are retried on the next check, and one host's failure doesn't
block the others.
Server-side only: agents and `deploy.sh` are unchanged.
## Changes
- `db.py`: new `status_alerts` table (`CREATE TABLE IF NOT EXISTS`, so no
migration) plus save/clear/list helpers.
- `alerts.py`: `_check_status()`, called from `check()` after the stale/recovery
pass; `publish()` takes an optional `tag`.
- `config.py` / `server.toml.example`: `status_alert_after_hours`, validated as
finite and >= 0.
- README: alerts section, admin command description, "Ideas for later".
## Upgrade notes
- Re-run `sudo ./server/install.sh`; no agent redeploy needed.
- Anyone with `ntfy_url` set gets these alerts by default. Set
`status_alert_after_hours = 0` to opt out.
- Each host's clock starts at its first check after upgrading, so hosts that have
been pending for weeks will first alert about a day later, not immediately.
## Testing
`make test`: 104 tests pass (8 new). New tests cover the grace boundary, the
clock not resetting on new reports, one alert per episode, re-arming after a
fix, escalation vs. downgrade, stale hosts being skipped, retry after a failed
send, and `0` disabling. Not yet tried against a live ntfy topic.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
patrick
added 3 commits 2026-10-30 00:33:43 +00:00
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>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
The alert timer now also notifies when a host has stayed in
rebootorupdatestatus past a grace period, so pending reboots and security updates no longer
depend on someone opening the dashboard.
evaluate()on every host's latest report.rebootorupdateforstatus_alert_after_hours(default 24,0disables). The message lists thesame reasons the dashboard shows.
so hourly reports don't restart it.
okclears the state, so the host can alert again later.update->rebootalerts again after another grace period;reboot->updatedoes not.block the others.
Server-side only: agents and
deploy.share unchanged.Changes
db.py: newstatus_alertstable (CREATE TABLE IF NOT EXISTS, so nomigration) plus save/clear/list helpers.
alerts.py:_check_status(), called fromcheck()after the stale/recoverypass;
publish()takes an optionaltag.config.py/server.toml.example:status_alert_after_hours, validated asfinite and >= 0.
Upgrade notes
sudo ./server/install.sh; no agent redeploy needed.ntfy_urlset gets these alerts by default. Setstatus_alert_after_hours = 0to opt out.been pending for weeks will first alert about a day later, not immediately.
Testing
make test: 104 tests pass (8 new). New tests cover the grace boundary, theclock not resetting on new reports, one alert per episode, re-arming after a
fix, escalation vs. downgrade, stale hosts being skipped, retry after a failed
send, and
0disabling. Not yet tried against a live ntfy topic.🤖 Generated with Claude Code