The gauges almost certainly show N/A because every disk query filters on `mountpoint="/rootfs"`, and the node-exporter you run now never reports that mountpoint. I couldn't confirm this against the live Prometheus because it needs the basic-auth login. The cause comes from reading the config and the node_exporter source.
**Why:** commit `a49dca6` (July 30) switched node-exporter from `stefanprodan/swarmprom-node-exporter:v0.16.0` to `prom/node-exporter:v1-busybox`. The old version reported the host disk as `/rootfs`. Version 1.x reports the host's real mountpoints (`/`, `/boot` and so on) and only adjusts paths if `--path.rootfs` is set. Your service in `swarmprom/swarmprom.yml` still mounts `/:/rootfs:ro` but doesn't pass that flag. So every query in `swarmprom/templates/swarmprom-disk-dash.json.j2` and the per-node gauges in `_node_disk_gauges.json.j2` comes back empty. That's 12 filters across the two files, covering the summary tiles, gauges, graphs and table. Only the Disk I/O panels still work.
**Suggested fix:**
1. In the node-exporter command in `swarmprom/swarmprom.yml`, add `--path.rootfs=/rootfs`. Also rename the deprecated flag to `--collector.filesystem.mount-points-exclude`, which 2.0 will require, and add `rootfs` to its exclude pattern:
```diff
-exec /bin/node_exporter --path.procfs=/host/proc --path.sysfs=/host/sys --collector.textfile.directory=/tmp/node-meta --collector.filesystem.ignored-mount-points=''^/(sys|proc|dev|host|etc)($$|/)'' --no-collector.ipvs
+exec /bin/node_exporter --path.rootfs=/rootfs --path.procfs=/host/proc --path.sysfs=/host/sys --collector.textfile.directory=/tmp/node-meta --collector.filesystem.mount-points-exclude=''^/(sys|proc|dev|host|etc|rootfs)($$|/)'' --no-collector.ipvs
```
2. In both dashboard templates, change `mountpoint=\"/rootfs\"` to `mountpoint=\"/\"`:
```
sed -i 's|mountpoint=\\"/rootfs\\"|mountpoint=\\"/\\"|g' swarmprom/templates/swarmprom-disk-dash.json.j2 swarmprom/templates/_node_disk_gauges.json.j2
```
Optionally, switch `node_filesystem_free_bytes` to `node_filesystem_avail_bytes` so the gauges match what `df` shows.
3. Redeploy with the swarmprom play so `docker stack deploy` updates node-exporter.
**A second possible problem:** as committed, the node-exporter command writes to `/etc/node-exporter` before starting the exporter. If the busybox image has no such directory, that write fails and node_exporter never starts. Your uncommitted `swarmprom.yml` already fixes this with `/tmp/node-meta`, and it also adds the `node_name` label that the per-node gauges need. Make sure that version is the one deployed.
**To confirm with your Prometheus login:**
- `count by (mountpoint) (node_filesystem_size_bytes)` should show no `/rootfs` today.
- After the fix, `count by (node_name) (node_filesystem_size_bytes{mountpoint="/"})` should list every node.
- If a single gauge still shows N/A, check `up{job="node-exporter"}` for a down target, for example port 9100 blocked by the firewall.
I haven't changed anything in the repo, and I can make these edits on a branch and open an MR if you want. Separately, `swarmprom/defaults/main.yml` has the Grafana and Prometheus admin password committed in plain text.
- Log in to post comments