Commit Graph

6 Commits

Author SHA1 Message Date
tommy 3746f3fe7c monitoring: capture compute6 Diun compose (closes audit visibility gap)
Deployed 2026-06-30 to close compute6's image-update blind spot; was running on
compute6 but not tracked. Includes the required security_opt apparmor=unconfined
(compute6 host norm) without which Diun can't read the docker socket.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 22:44:42 -05:00
tommy 6af09ef9c6 monitoring: off-host Prometheus dead-man's-switch watchdog (Pi .227)
Independent-hardware systemd timer on raspberrypi (.227) probing media-server
Prometheus /-/healthy every 60s; pages ntfy prometheus-critical after 3 fails
and on recovery. Catches media-server-dark, which the same-host Uptime-Kuma
monitor structurally cannot. Deployed + live-outage tested 2026-06-30.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 21:58:57 -05:00
tommy 2ee7c474f5 docs: add P5-12 to phase5-incident-log, update INC-001 and P5-05 states
P5-12 (weekly-health-digest): documented scope, deployed location, cron
schedule, ntfy topic, break-test result. Removes duplicate
monitoring/PHASE5-incidents.md — P5-12 belongs in the canonical
runbooks/phase5-incident-log.md alongside all other phase items.

INC-001 state updated: PBS rebooted May 14; both usb1-zfs and usb2-zfs
now MISSING (usb2-zfs was previously ONLINE on May 5 — new degradation).
zfs-health-check alerting every 5 min to ntfy/zfs-health.

P5-05 marked RESOLVED: all certs renewed to Jul 22 2026, confirmed via
live openssl check on 2026-05-16.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 08:58:16 -05:00
tommy a4726a4da6 monitoring: add weekly-health-digest.sh and Phase 5 incident log (P5-12)
Lightweight weekly drift-catcher that posts a concise digest to the
dedicated ntfy/health-digest topic every Monday at 07:00. Covers:
PVE reachability, Prometheus target health, firing alerts, PBS backup
status, PBS ZFS pool presence, filesystem >85%, ZFS pool state, Docker
unhealthy containers, and TLS cert expiry <21d.

Does NOT replace the quarterly full health check — documented in
PHASE5-incidents.md alongside open P5-07 and P5-10 items.

Deployed: /etc/cron.d/weekly-health-digest on media-server.
Break-tested 2026-05-16: correctly flagged PBS ZFS pools MISSING and
Grafana firing alerts; suppressed known-persistent issues.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-16 08:56:46 -05:00
tommy 38fa22d444 monitoring: add quarterly UPS self-test script (Phase 4B)
ups-quarterly-test.sh:
  - Runs test.battery.start.quick on cyberpower1 then cyberpower2
  - 120s wait between tests (allow recharge)
  - Logs pass/fail to syslog via logger -t ups-quarterly-test
  - Password stored in single-quoted variable to prevent shell expansion
  - Deployed on beast (/usr/local/bin/), cron: first Sunday of Jan/Apr/Jul/Oct 02:00

Manual run 2026-05-06:
  cyberpower1: Done and passed (charge 97% post-test, recharged normally)
  cyberpower2: Done and passed (charge 100%)

Grafana alerts (in grafana.db):
  cfl8lrs1mxnnka  UPS Battery Charge Low (<80%) — break-tested pending ✓
  afl8lrs4mbaioa  UPS On Battery (power outage) — break-tested fired ✓

Note: nut_battery_test_result not exposed by nut-exporter v1.2.1.
Pass/fail tracked via syslog only for now. Adding to Phase 5 if exporter
gains test-result metric support.
2026-05-06 06:05:50 -05:00
tommy e3ee020d53 monitoring: add postfix queue + cert expiry scripts, Phase 4D alerts
postfix-queue-check.sh:
  - Reads mailq queue depth, writes postfix_queue_size{host=X} textfile metric
  - Deployed on compute3 (systemd node_exporter) and compute5 (Docker)
  - Cron: */5 * * * * as root on each host
  - Prometheus alert: postfix_queue_size > 10 (uid: efl8kjns461a8f)

node-exporter-compute5-compose.yml:
  - Added textfile volume mount /var/lib/node_exporter/textfile:/textfile:ro
  - Added --collector.textfile.directory=/textfile flag

cert-expiry-check.sh:
  - Also stored here for monitoring/ grouping

Phase 4D Grafana alert rules (all in Infrastructure Alerts folder):
  cfl8jqdlhu680d  TLS Cert Expiry Warning (30d)        — break-tested ✓
  afl8jqdoepwqod  TLS Cert ACME Renewal Failure (14d)  — no real certs in window
  ffl8k2ry0nu2od  Alertmanager Down                     — break-tested, fired ✓
  efl8kjns461a8f  Postfix Queue Backing Up              — metric confirmed, 5m window
  dfl8k2s0xjklcf  Authelia Restart Loop                 — cadvisor-based proxy metric

Rules stored in grafana.db only — not yaml-provisioned (Phase 5 candidate)
2026-05-06 05:46:07 -05:00