-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: expose MD raid component devices #674
base: master
Are you sure you want to change the base?
Conversation
2c25043
to
1ad0a36
Compare
Note: rebased on top of master for reformatting Signed-off-by: Singee <[email protected]> Signed-off-by: Robin H. Johnson <[email protected]>
Note: rebased on top of master for reformatting Signed-off-by: Singee <[email protected]> Signed-off-by: Robin H. Johnson <[email protected]>
Note: rebased on top of master for reformatting Signed-off-by: Singee <[email protected]> Signed-off-by: Robin H. Johnson <[email protected]>
Signed-off-by: Singee <[email protected]>
Expose what component devices are part of a MD raid device, as well as the most common flags per-component. This will enable a future node_exporter metric showing which component of a RAID had failed. Signed-off-by: Robin H. Johnson <[email protected]> Signed-off-by: Robin H. Johnson <[email protected]>
1ad0a36
to
dca5b72
Compare
@SuperQ can you have a look at this please? |
I'm pretty sure this is already at least partially implemented by the mdraid sysfs parsing, https://pkg.go.dev/github.com/prometheus/[email protected]/sysfs#Mdraid Drawing attention once again to prometheus/node_exporter#1085 - I really think it's time to mark the old |
I agree, I think we should focus the effort on the sysfs |
@SuperQ can you please merge prometheus/node_exporter#3031 then - and I'll build on top of that to expose per-device state? |
@robbat2 Sure, sounds good. |
Faulty: strings.Contains(match[3], "(F)"), | ||
Spare: strings.Contains(match[3], "(S)"), | ||
Journal: strings.Contains(match[3], "(J)"), | ||
Replacement: strings.Contains(match[3], "(R)"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! R stands for Replacement!
Expose what component devices are part of a MD raid device, as well as the most common flags per-component. This will enable a future node_exporter metric showing which component of a RAID had failed.
This PR builds up top of PR 505, implementing the requested changes to detect the known RAID types on a given system.
Reference: #505
Signed-off-by: Robin Johnson [email protected]