feat(monitoring): add backup and systemd metrics, alerts, and dashboards

- backup role emits last-success/run metrics into node_exporter's textfile collector
- node_exporter enables systemd and textfile collectors
- prometheus deploys BackupStale/BackupTimerSilent/SystemdUnitFailed alert rules
- grafana gains Backups - Restic and Systemd dashboards
- fix prometheus.yml params rendering (quote values so {job=...} stays a string)
This commit is contained in:
Clément Désiles
2026-09-09 12:07:50 +02:00
parent 8756eb1183
commit f6c4d36bbe
16 changed files with 335 additions and 7 deletions
+7
View File
@@ -13,6 +13,13 @@ backup_dumps_dir: /var/lib/backup/dumps
# be excluded from snapshots rather than silently backing itself up.
backup_cache_dir: /var/cache/restic
# Directory node_exporter's textfile collector reads `*.prom` files from. The
# backup script drops one file per job here on every run, so Prometheus can
# track last-success timestamps and alert when backups go silent. Must match
# node_exporter_textfile_dir in roles/node_exporter/defaults/main.yml. Metrics
# are only written when the directory exists (i.e. node_exporter is deployed).
backup_metrics_dir: /var/lib/node_exporter/textfile_collector
# ---------------------------------------------------------------------------
# Schedule (systemd OnCalendar syntax) - per-job `schedule` overrides this
# ---------------------------------------------------------------------------