A failing nightly backup only showed up in the journal. Now it sends an ntfy
message.
kernelwatch-backup.service gets OnFailure=kernelwatch-backup-failed.service,
which runs the new kernelwatch notify-backup-failure. systemd-level, so it
covers the timeout, OOM kills and crashes as well as handled errors, which an
in-process try/except would miss.
High-priority message naming the newest backup still on disk (or "none") and
pointing at journalctl -u kernelwatch-backup.
No ntfy_url: logs that there's nothing to send to and exits 0. ntfy
unreachable: exits 1 (journal only). sudo kernelwatch notify-backup-failure
tests delivery.
One message per failed run (a persistent failure nags nightly); no recovery
message.
Installer ships the new unit; README and server.toml.example updated.
Not covered: a timer that never runs at all (host down); that needs a heartbeat.
Testing
make test: 183 tests pass (6 new): message contents, no backups, delivery
failure, no ntfy configured, the CLI command, and a guard that every OnFailure= target is a shipped unit (systemd silently ignores a typo there). systemd-analyze verify is clean apart from expected missing /opt paths.
Not run: the failure path under real systemd. After deploying: sudo systemctl start kernelwatch-backup-failed sends the message.
## Summary
A failing nightly backup only showed up in the journal. Now it sends an ntfy
message.
- `kernelwatch-backup.service` gets `OnFailure=kernelwatch-backup-failed.service`,
which runs the new `kernelwatch notify-backup-failure`. systemd-level, so it
covers the timeout, OOM kills and crashes as well as handled errors, which an
in-process try/except would miss.
- High-priority message naming the newest backup still on disk (or "none") and
pointing at `journalctl -u kernelwatch-backup`.
- No `ntfy_url`: logs that there's nothing to send to and exits 0. ntfy
unreachable: exits 1 (journal only). `sudo kernelwatch notify-backup-failure`
tests delivery.
- One message per failed run (a persistent failure nags nightly); no recovery
message.
- Installer ships the new unit; README and `server.toml.example` updated.
Not covered: a timer that never runs at all (host down); that needs a heartbeat.
## Testing
`make test`: 183 tests pass (6 new): message contents, no backups, delivery
failure, no ntfy configured, the CLI command, and a guard that every
`OnFailure=` target is a shipped unit (systemd silently ignores a typo there).
`systemd-analyze verify` is clean apart from expected missing /opt paths.
Not run: the failure path under real systemd. After deploying:
`sudo systemctl start kernelwatch-backup-failed` sends the message.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
patrick
added 2 commits 2026-10-30 15:14:08 +00:00
Sends a high-priority ntfy message that the nightly backup failed, naming the
newest backup still on disk. It exits 1 if the message can't be delivered and 0
(with a note on stderr) when ntfy isn't configured.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kernelwatch-backup.service gets OnFailure=kernelwatch-backup-failed.service,
which runs notify-backup-failure, so timeouts, OOM kills and crashes are
reported as well as handled errors. The installer ships the new unit, and tests
check that every OnFailure= target is a real unit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
patrick
merged commit e3013921d1 into main2026-10-30 15:16:58 +00:00
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
A failing nightly backup only showed up in the journal. Now it sends an ntfy
message.
kernelwatch-backup.servicegetsOnFailure=kernelwatch-backup-failed.service,which runs the new
kernelwatch notify-backup-failure. systemd-level, so itcovers the timeout, OOM kills and crashes as well as handled errors, which an
in-process try/except would miss.
pointing at
journalctl -u kernelwatch-backup.ntfy_url: logs that there's nothing to send to and exits 0. ntfyunreachable: exits 1 (journal only).
sudo kernelwatch notify-backup-failuretests delivery.
message.
server.toml.exampleupdated.Not covered: a timer that never runs at all (host down); that needs a heartbeat.
Testing
make test: 183 tests pass (6 new): message contents, no backups, deliveryfailure, no ntfy configured, the CLI command, and a guard that every
OnFailure=target is a shipped unit (systemd silently ignores a typo there).systemd-analyze verifyis clean apart from expected missing /opt paths.Not run: the failure path under real systemd. After deploying:
sudo systemctl start kernelwatch-backup-failedsends the message.🤖 Generated with Claude Code