Files
loki/scripts
GandClaude Opus 4.8 799ffa1754 feat(ops): push-based box alerting + memory guards (no Grafana needed) (#71)
From the bitbaum sysadmin audit — closes the 'units failed silently for weeks'
blind spot without a monitoring stack the small box can't afford:

- install-host-alerts.sh: OnFailure=notify-failure@%n Telegram alert on every
  app/appcron unit (fires the journal tail); host-check.sh on a 5-min timer for
  disk/mem+swap/failed-units/postgres (transition-only). Proven live: the broken
  vitareba cron fired the alert path.
- sync-infra.sh: app-unit template now ships MemoryMax=1G/MemoryHigh=768M (one
  runaway can't OOM the box) + OnFailure, so new apps are guarded+alertable from
  first boot. install-app-crons.sh: OnFailure in the cron template too.
- deploy.sh: kill backticks inside the box "..." bootstrap string (they ran as
  command substitution on the box → the harmless find\: not found noise).
- docs/infrastructure/monitoring-and-alerts.md: the why + re-apply commands.

Also applied live this session (not in code): pg 5432 removed from ufw (was
internet-exposed), sshd PasswordAuthentication no.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 19:52:51 +02:00
..