node_exporter icon indicating copy to clipboard operation
node_exporter copied to clipboard

Feature request: expose ioerr_cnt metrics

Open toshipp opened this issue 3 years ago • 5 comments

In Linux, the error counter for block devices can be retrieved from /sys/block/*/device/ioerr_cnt, but the current diskstats controller does not support them.

My use case that uses this counter is to detect if an HDD is broken or not.

toshipp avatar Dec 01 '21 07:12 toshipp

Thanks, in order to add this, we need parsing support for /sys/block/*/device/... added to https://github.com/prometheus/procfs.

SuperQ avatar Dec 01 '21 08:12 SuperQ

Just to confirm, that library handles procfs from the name, but this counter is provided by sysfs. Is it appropriate to implement it in that library?

toshipp avatar Dec 01 '21 09:12 toshipp

Correct, the procfs library handles parsing of both procfs and sysfs files.

SuperQ avatar Dec 01 '21 09:12 SuperQ

Understood.

toshipp avatar Dec 01 '21 09:12 toshipp

FWIW, I was considering adding this for my own use, and discovered that the bulk of the ioerr_cnt issues were actually smartd requesting things that the device didn't support. So it wasn't as good of a signal as I'd hoped for.

I'm planning on collecting SAS link metrics in #2386; this may or may not be helpful for your case.

scottlaird avatar May 31 '22 18:05 scottlaird