[CELEBORN-2403] Add worker metrics for disk status and unhealthy disk count - #3782
Open
yew1eb wants to merge 4 commits into
Open
[CELEBORN-2403] Add worker metrics for disk status and unhealthy disk count#3782yew1eb wants to merge 4 commits into
yew1eb wants to merge 4 commits into
Conversation
SteNicholas
reviewed
Aug 5, 2026
| "color": "green" | ||
| }, | ||
| { | ||
| "color": "red", |
Member
There was a problem hiding this comment.
No need for read color. Please verify the grafana dashboard.
zaynt4606
reviewed
Aug 6, 2026
| }, | ||
| "editorMode": "code", | ||
| "expr": "metrics_DiskStatus_Value{instance=~\"${instance}\"}", | ||
| "legendFormat": "${baseLegend} {{mountpoint}}", |
Contributor
There was a problem hiding this comment.
The legendFormat here uses "${baseLegend} {{mountpoint}}", but all existing panels with labels (e.g. id=270, 271, 272) put the label variables before ${baseLegend} — e.g. "{{statusCode}} ${baseLegend}", "{{dbBackend}} {{operation}}/{{status}} ${baseLegend}".
For consistency, consider changing to "{{mountpoint}} ${baseLegend}".
| "mode": "off" | ||
| } | ||
| }, | ||
| "mappings": [], |
Contributor
There was a problem hiding this comment.
The mappings field is empty for the DiskStatus panel. Consider adding value mappings to map the numeric status values (0-4) to readable status names (HEALTHY, READ_OR_WRITE_FAILURE, IO_HANG, HIGH_DISK_USAGE, CRITICAL_ERROR).
…tatus value mappings
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 changes were proposed in this pull request?
Add two gauges on the worker to expose disk health status, registered in
LocalDeviceMonitor.init()and evaluated lazily from the liveDiskInfo.statusat scrape time:UnhealthyDiskCount— the number of local disks whose status is notHEALTHY, intended for alerting (e.g.> 0).DiskStatuswith amountpointlabel — the currentDiskStatusvalue (0: HEALTHY, 1: READ_OR_WRITE_FAILURE, 2: IO_HANG, 3: HIGH_DISK_USAGE, 4: CRITICAL_ERROR) of each disk, for locating the exact unhealthy disk.Also included: two corresponding panels in the Grafana dashboard (
assets/grafana/celeborn-dashboard.json) and the new metrics indocs/monitoring.md.Why are the changes needed?
DeviceMonitoralready maintainsDiskInfo.statusfor every local disk, but none of the existing metrics expose it —DeviceOSFreeBytes/DeviceCelebornFreeBytesreport capacity, andDevice_<name>_<Status>_Countonly counts non-critical error events. To notice a broken disk, operators have to grep worker logs, which makes alerting on disk failures impossible.Does this PR resolve a correctness bug?
Does this PR introduce any user-facing change?
Two new worker metrics are exposed:
UnhealthyDiskCountandDiskStatus(with amountpointlabel).How was this patch tested?
monitor disk status metricsinDeviceMonitorSuitecovering the multi-disk scenario: all disks healthy initially, then one disk markedREAD_OR_WRITE_FAILURE(aggregate count becomes 1 and only that disk's gauge changes), then recovered toHEALTHY../build/mvn test -pl workerpasses.python3 dev/lint_grafana.py assets/grafana/celeborn-dashboard.jsonpasses../build/mvn spotless:check -pl workerpasses.