# Quadlet unit: node-exporter (rootless, boot-persistent) — RENDERED ARTIFACT. # Regenerate: python3 scripts/service-map.py render node-exporter-unit --host dankserver # Source: shared/services.yml (entry node-exporter) + this template. # # Install path on dankserver: ~/.config/containers/systemd/node-exporter.container # Unit name: node-exporter.service (container name: node-exporter) # # Host metrics source for Prometheus. Replaces the compose service of the same # name (the "Observability" block): Dankclaw moved to this quadlet on # 2026-09-11, Dankserver on 2026-09-16 — its compose-only copy died at a reboot # and stayed dead (rootless Podman does not restart bare containers after the # explicit stop shutdown performs), dead for a day and a half before anyone # noticed. One owner per container name; no compose file remains anywhere. # # HOST NAMESPACE. It must run in the host network namespace to report the # host's own interfaces/connections, and --pid=host for the processes and # cgroups collectors. "localhost" inside the container is therefore the host's # loopback, which is what the homepage status timer probes. # # LISTEN ADDRESSES. Exactly two: loopback for the homepage status probe, and # the LAN address, because Prometheus — which runs in a container on # dankclaw_default — scrapes http://192.168.0.235:9100/metrics # (shared/prometheus/prometheus.yml, job "node-dankserver"). node_exporter has no # authentication, so the wildcard bind stays off the table; this is the # pairing that removes the unauthenticated observability surface on every # host, and both consumers are accounted for. # # MOUNTS. The container reads the host's /proc, /sys and / as /host/* # read-only and is pointed at them with --path.*; it writes nothing anywhere. [Unit] Description=Prometheus node exporter (Dankserver host metrics) After=network-online.target Wants=network-online.target [Container] ContainerName=node-exporter Image=docker.io/prom/node-exporter:latest Network=host PodmanArgs=--pid=host Exec=--path.procfs=/host/proc --path.sysfs=/host/sys --path.rootfs=/rootfs --web.listen-address=127.0.0.1:9100 --web.listen-address=192.168.0.235:9100 Volume=/proc:/host/proc:ro Volume=/sys:/host/sys:ro Volume=/:/rootfs:ro HealthCmd=wget --spider -q http://localhost:9100/metrics HealthInterval=30s HealthTimeout=10s HealthRetries=3 HealthStartPeriod=30s [Service] Restart=always RestartSec=10 [Install] WantedBy=default.target