Point Grafana disk-usage panels at the real DOCKER_ROOT mountpoint - #2738
Merged
Conversation
Grafana's "Host & Docker Monitoring" dashboard (id 15120) hard-codes mountpoint="/" in its Root FS / disk-usage panels, so installs with DOCKER_ROOT on a separate filesystem (e.g. /srv/docker) never see disk usage for that partition. ethd already detects DOCKER_ROOT via `docker system info`, but not the real mountpoint backing it. This adds DOCKER_ROOT_MOUNTPOINT, detected via findmnt/df (same pattern already used in __optimize_host), passed through to the grafana container, and used by a new fix_docker_mountpoint helper in provision.sh to rewrite mountpoint="/" in the one dashboard that actually hard-codes it. No-op when DOCKER_ROOT is on "/", which is the default and most common case.
yorickdowne
self-requested a review
August 4, 2026 05:02
yorickdowne
requested changes
Aug 4, 2026
Co-authored-by: Yorick Downe <71337066+yorickdowne@users.noreply.github.com>
yorickdowne
approved these changes
Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Grafana's "Host & Docker Monitoring" dashboard (id 15120) hard-codes
mountpoint="/"in its Root FS / disk-usage panels ("Root FS Used","RootFS Total", "Used Disk Space"). On installs where
DOCKER_ROOTliveson its own filesystem (e.g.
/srv/docker), these panels always reportedthe root filesystem's usage instead of the filesystem that actually
holds Docker's data.
DOCKER_ROOT_MOUNTPOINTvar todefault.env, detected byethdvia
findmnt/df(same pattern already used in__optimize_host),right after the existing
DOCKER_ROOTdetection in__handle_docker.grafanacontainer viagrafana.yml.fix_docker_mountpointhelper ingrafana/provision.shthatrewrites
mountpoint="/"to the real mountpoint in dashboard 15120'sJSON via
jq.staking dashboard (17846) don't hard-code a mountpoint filter, so
they're left untouched.
DOCKER_ROOTis on/(the default, and by far the mostcommon setup) — verified the JSON output is byte-for-byte identical
in that case.
Manually tested:
DOCKER_ROOT_MOUNTPOINT=/): dashboard unchanged.DOCKER_ROOT_MOUNTPOINT=/srv/docker):confirmed via
jqagainst the live dashboard 15120 JSON that bothmountpoint="/",fstype!="rootfs"andfstype!="rootfs",mountpoint="/"orderings get rewritten correctly and output stays valid JSON.
ethd update's existing.envmigration path places the newvar at the same position as in
default.env(right afterDOCKER_ROOT), not appended at the end — this requires theENV_VERSIONbump included here.shellcheck ethd grafana/provision.shclean (no new findings).Related issue
None filed — found while investigating Grafana disk-usage reporting on
a host with
DOCKER_ROOTon a separate mount.