- 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)
1.6 KiB
1.6 KiB
node_exporter — Prometheus exporter for host metrics
Exposes machine metrics (CPU, memory, disk, filesystem, network) for Prometheus.
Supported distributions
- Arch Linux (package
prometheus-node-exporter, extra repo) - Debian/Ubuntu (package
prometheus-node-exporter)
Configuration
See defaults/main.yml.
Optional:
node_exporter_listen_address: "127.0.0.1:9100"
Keep localhost-only — Prometheus scrapes it locally on the same host. To add
collectors (e.g. --collector.systemd, --collector.textfile.directory), extend
node_exporter_listen_address or override the args in host_vars.
Collectors
The role enables, on top of the defaults:
--collector.zfs— ZFS pool/dataset metrics.--collector.systemd— unit state (node_systemd_unit_state), restart counts (node_systemd_restart_count_total) and timer trigger times (node_systemd_timer_last_trigger_seconds/..._next_trigger_seconds). Powers the systemd dashboard (failed units, timers that stopped firing).--collector.textfile.directory={{ node_exporter_textfile_dir }}— re-exposes*.promfiles dropped into that directory. The backup role writesbackup_*metrics there; other cron/timer jobs can do the same.
Pairing with Prometheus
prometheus_scrape_configs:
- job_name: 'node'
static_configs:
- targets: ['localhost:9100']
Operations
systemctl status prometheus-node-exporter
curl -s http://127.0.0.1:9100/metrics | head
journalctl -u prometheus-node-exporter -f
Dependencies
None. Standalone exporter.