prometheus-community / node-exporter-textfile-collector-scripts

Scripts for node-exporter's textfile collector
Apache License 2.0
488 stars 185 forks source link

storcli.py: don't error out on unsupported features #201

Closed jcpunk closed 6 months ago

jcpunk commented 7 months ago

Tested hardware: LSI SAS3008 PCI-Express Fusion-MPT SAS-3 (rev 02)

This integrated RAID chip doesn't emit stats for these features.

LuminatiHD commented 7 months ago

While you're at it, could you do a similar thing for the drive temperature? We had a similar problem there with our drive.

jcpunk commented 7 months ago

I'm not sure which elements you need tweaked...

LuminatiHD commented 7 months ago

state["Drive Temperature"] returns "N/A" for some of our drives (Line 393). I have a merge request up on this as well, but it might be neater to have everything part of the same Pull request.

jcpunk commented 7 months ago

Updated, can you check it for sanity?. Do you know who might have merge rights on this repo?

LuminatiHD commented 7 months ago

Code looks good to me. For merge rights, I know dswarbrick has, but probably also all contributors that list prometheus as their workplace.

jcpunk commented 6 months ago

@dswarbrick Could you review this PR (and others for storcli.py)?

dswarbrick commented 6 months ago

@jcpunk Are these "N/A" and "Unknown" values being emitted by storcli for actual online and spun-up drives? This seems like a pretty big oversight by LSI to omit these data, considering that most of them are mandatory SMART items. Are you sure it's not just a case of a spun-down / offline / power-save / standby disk?

jcpunk commented 6 months ago

I can confirm these drives are spun up and serving data. In this instance the OS is on these drives.

dswarbrick commented 6 months ago

Since storcli is closed source, we don't have any way to dig deeper into why a spun-up drive is not reporting basic info like this. I'm okay with merging this, but we might want to consider a helper function in future to reduce some of the if-statement boilerplate code.