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

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

storcli could not extract drive temperature #197

Closed LuminatiHD closed 8 months ago

LuminatiHD commented 10 months ago

The storcli script has given us errors when trying to extract the temperature of a drive. our output looks like this.

$ sudo /opt/MegaRAID/storcli/storcli64 /cALL/eALL/sALL show all J | grep "Drive Temperature"
"Drive Temperature" : " 41C (105.80 F)",
"Drive Temperature" : " 42C (107.60 F)",
"Drive Temperature" : " 41C (105.80 F)",
"Drive Temperature" : "N/A",
"Drive Temperature" : " 39C (102.20 F)",
"Drive Temperature" : " 40C (104.00 F)",
"Drive Temperature" : " 39C (102.20 F)",
"Drive Temperature" : " 26C (78.80 F)",

notice the Temperature "N/A" of one of the drives. Our server is old so it is possible that the drive is either broken or doesn't have the sensors to measure this.

I'll have up a pull request shortly trying to remedy this issue. For now I suggest making a small check if the drive temperature is even a number and skipping it if it isn't. I am open to different ideas.

LuminatiHD commented 8 months ago

Has been fixed here already: https://github.com/prometheus-community/node-exporter-textfile-collector-scripts/pull/201