feat(#105): Docker storage usage in detailed health endpoint#122
feat(#105): Docker storage usage in detailed health endpoint#122dennisonbertram merged 1 commit intomainfrom
Conversation
Add docker_disk (filesystem-level /var/lib/docker stats), docker_storage (Docker API breakdown: images_size_bytes, containers_size_bytes, volumes_size_bytes, build_cache_size_bytes, total_size_gb) to the detailed health response. Either disk path exceeding 90% triggers "degraded" status. Adds DiskUsage method to docker.Client interface. Closes #105 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6e20c892a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| for _, img := range du.Images { | ||
| if img != nil { | ||
| usage.ImagesSize += img.Size |
There was a problem hiding this comment.
Use unique image bytes when aggregating Docker image usage
DiskUsage() sums img.Size for every image entry, but image.Summary.Size is the full size of each image including shared layers, so hosts with many images sharing base layers will have those bytes counted multiple times. This inflates ImagesSize and therefore docker_storage.total_size_gb, making the detailed health endpoint report significantly higher usage than what Docker actually stores on disk in common multi-image environments.
Useful? React with 👍 / 👎.
Summary
docker_diskanddocker_storagefields to detailed health responseTest plan
TestHealthDetailed_*— 7 tests covering storage data, errors, cache bypassgo test ./...passesCloses feat(health): include Docker storage usage in detailed health endpoint #105
🤖 Generated with Claude Code