@@ -36,15 +36,19 @@ Prometheus ──alerts──▶ Alertmanager ──webhook──▶ Remediation
3636| ** Loki** | Log aggregation backend (Docker Compose, NFS storage) | ` deploy-loki.yml ` |
3737| ** Promtail** | Log shipper on every host → Loki | ` deploy-promtail-fleet.yml ` |
3838| ** Remediation bridge** | Alertmanager → Ansible auto-remediation | ` deploy-remediation-bridge.yml ` |
39+ | ** Alert rules** | 23 Prometheus alert rules (parameterized) | ` deploy-alert-rules.yml ` |
40+ | ** Fleet patching** | 5-stage safe patching pipeline (audit→snapshot→patch→smoke→rollback) | ` fleet-patch.yml ` |
3941
40- ** 4 targeted remediation playbooks** — called automatically by the bridge or manually:
42+ ** 6 targeted remediation playbooks** — called automatically by the bridge or manually:
4143
4244| Playbook | When it runs |
4345| ---------| -------------|
44- | ` remediation/restart-container.yml ` | ` ContainerDown ` alert |
45- | ` remediation/service-restart.yml ` | ` SystemdServiceFailed ` alert |
46- | ` remediation/cleanup-disk.yml ` | ` DiskSpaceHigh ` alert |
47- | ` remediation/caddy-reload.yml ` | ` TLSCertExpiringSoon ` alert |
46+ | ` remediation/restart-container.yml ` | ` ContainerDown ` , ` ContainerOOM ` alerts |
47+ | ` remediation/service-restart.yml ` | ` SystemdServiceFailed ` , ` HighMemoryUsage ` , ` DNSResolutionFailed ` alerts |
48+ | ` remediation/cleanup-disk.yml ` | ` DiskSpaceWarning ` , ` DiskSpaceCritical ` alerts |
49+ | ` remediation/caddy-reload.yml ` | ` TLSCertExpiringSoon/Critical/Expired ` , ` TLSHandshakeFailed ` alerts |
50+ | ` remediation/host-recovery.yml ` | ` HostDown ` alert — Proxmox VM/LXC auto-recovery |
51+ | ` remediation/remount-nfs.yml ` | ` NFSMountUnavailable ` alert — NFS mount recovery |
4852
4953---
5054
@@ -182,6 +186,7 @@ Secrets go in `group_vars/all/vault.yml` (see `vault.yml.example` for all requir
182186| ` roles/common ` | Passwordless sudo for ansible_user | [ README] ( roles/common/README.md ) |
183187| ` roles/restic ` | Restic install, repo init, backup + prune | [ README] ( roles/restic/README.md ) |
184188| ` roles/restic_backup ` | Systemd timer/service units for scheduled backups | [ README] ( roles/restic_backup/README.md ) |
189+ | ` roles/server_hardening ` | SSH hardening, UFW firewall, sysctl tuning | [ README] ( roles/server_hardening/README.md ) |
185190
186191---
187192
@@ -215,6 +220,55 @@ See [`playbooks/REMEDIATION-BRIDGE.md`](playbooks/REMEDIATION-BRIDGE.md) for:
215220
216221---
217222
223+ ## Alert rules
224+
225+ 23 Prometheus alert rules across 7 categories, all parameterized via ` group_vars ` :
226+
227+ | Category | Alerts |
228+ | ----------| --------|
229+ | ** Host health** | ` HostDown ` , ` DiskSpaceWarning ` , ` DiskSpaceCritical ` , ` HighMemoryUsage ` , ` EnabledServiceInactive ` |
230+ | ** Container** | ` ContainerDown ` , ` ContainerOOM ` , ` ContainerRestartLoop ` |
231+ | ** TLS** | ` TLSCertExpiringSoon ` , ` TLSCertExpiringCritical ` , ` TLSCertExpired ` , ` TLSProbeFailure ` , ` TLSHandshakeFailed ` |
232+ | ** Backup** | ` ResticBackupStale ` , ` ResticBackupFailed ` |
233+ | ** Infrastructure** | ` NFSMountUnavailable ` , ` HighSwapUsage ` , ` HighLoadAverage ` , ` HighDiskIOWait ` |
234+ | ** Network** | ` HTTPEndpointDown ` , ` DNSResolutionFailed ` |
235+ | ** Services** | ` SystemdServiceFailed ` , ` SystemdTimerFailed ` |
236+
237+ Deploy:
238+ ``` bash
239+ ansible-playbook playbooks/deploy-alert-rules.yml --check --limit docker-host
240+ ansible-playbook playbooks/deploy-alert-rules.yml --limit docker-host
241+ ```
242+
243+ ---
244+
245+ ## Fleet patching
246+
247+ 5-stage safe patching pipeline. Each stage is tag-gated — nothing runs unless you explicitly ask for it.
248+
249+ | Stage | Tag | What it does |
250+ | -------| -----| -------------|
251+ | ** Audit** | ` audit ` | Dry-run ` apt upgrade ` , map packages to running services |
252+ | ** Snapshot** | ` snapshot ` | Proxmox VM/LXC snapshot before patching |
253+ | ** Patch** | ` patch ` | ` apt safe ` upgrade + automatic service restarts |
254+ | ** Smoke** | ` smoke ` | Post-patch service health validation |
255+ | ** Rollback** | ` rollback ` | Revert to pre-patch Proxmox snapshot |
256+
257+ ``` bash
258+ # Audit all hosts
259+ ansible-playbook playbooks/fleet-patch.yml --tags audit
260+
261+ # Full patch cycle on one host
262+ ansible-playbook playbooks/fleet-patch.yml --tags snapshot,patch,smoke --limit wiki-host
263+
264+ # Rollback if something broke
265+ ansible-playbook playbooks/fleet-patch.yml --tags rollback -e target_host=wiki-host -e rollback_date=20260312
266+ ```
267+
268+ Requires ` playbooks/vars/fleet-patch-vars.yml ` — see ` fleet-patch-vars.yml.example ` .
269+
270+ ---
271+
218272## Security Notes
219273
220274- All secrets encrypted via ` ansible-vault ` — no plaintext passwords anywhere
0 commit comments