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

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

Some disks doesnt report device speed correctly, crashing script execution #175

Open ARPABoy opened 1 year ago

ARPABoy commented 1 year ago

Some disks doesnt report device speed correctly when pd_device_speed metric assigns a string value: "Unknown" script execution crashes in that case assign a 0 speed value.

dswarbrick commented 4 months ago

My gut feeling is that transforming an "unknown" value to a value of zero is going to obscure cases where disks are spun-down, and truly have a rotational speed of zero. I think it would be better to simply omit the metric if it is not a valid numeric value (which can be tested with isnumeric()).