Skip to content

report disk usage where the data actually lives - #19

Merged
mrq1911 merged 3 commits into
masterfrom
feature/disk-path
Aug 21, 2026
Merged

report disk usage where the data actually lives#19
mrq1911 merged 3 commits into
masterfrom
feature/disk-path

Conversation

@mrq1911

@mrq1911 mrq1911 commented Aug 21, 2026

Copy link
Copy Markdown
Member

fixes #5.

DiskUsage hardcoded the platform root, so nodes with data on a separate partition reported the wrong figures.

  • new DISK_PATH env var, default / (\ on windows) — payload shape is unchanged, so no swarmpit-side change needed
  • log instead of silently returning zeroes when the path can't be read, since a typo'd DISK_PATH is now a way to get 0% disk

verified against a real second mount — DISK_PATH=/mnt/data on a 64m tmpfs reports total=67108864 where root reports total=1996001169408.

build, vet and tests pass on golang:1.12. tests cover the default, the override, and a bad path returning zeroes rather than panicking.

@mrq1911

mrq1911 commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

pushed a second commit documenting DOCKER_HOST / DOCKER_API_VERSION / tls in the same readme block — it answers #10 (already supported, just undocumented) and the config trap behind #13 and #14. put it here rather than in its own branch since it edits the same lines as the DISK_PATH entry.

@mrq1911
mrq1911 merged commit 9cd4b42 into master Aug 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Monitor all disk usage not only root

1 participant