procfs icon indicating copy to clipboard operation
procfs copied to clipboard

feat: expose MD raid component devices

Open robbat2 opened this issue 1 year ago • 5 comments

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: https://github.com/prometheus/procfs/pull/505 Signed-off-by: Robin Johnson [email protected]

robbat2 avatar Oct 03 '24 04:10 robbat2

@SuperQ can you have a look at this please?

robbat2 avatar Oct 05 '24 04:10 robbat2

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 https://github.com/prometheus/node_exporter/issues/1085 - I really think it's time to mark the old /proc/mdstat parser as deprecated, before any more technical debt gets added to it.

dswarbrick avatar Oct 09 '24 01:10 dswarbrick

I agree, I think we should focus the effort on the sysfs /sys/block/md* parsing.

SuperQ avatar Oct 09 '24 06:10 SuperQ

@SuperQ can you please merge https://github.com/prometheus/node_exporter/pull/3031 then - and I'll build on top of that to expose per-device state?

robbat2 avatar Oct 12 '24 04:10 robbat2

@robbat2 Sure, sounds good.

SuperQ avatar Oct 12 '24 07:10 SuperQ

This needs a rebase.

SuperQ avatar Jul 03 '25 09:07 SuperQ

This needs a rebase.

Done

robbat2 avatar Jul 04 '25 20:07 robbat2