prometheus / procfs

procfs provides functions to retrieve system, kernel and process metrics from the pseudo-filesystem proc.
Apache License 2.0
755 stars 311 forks source link

Fix NODEV errors on Thinkpad when parsing battery status #641

Closed marvin-sinister closed 1 month ago

marvin-sinister commented 1 month ago

On thinkpads, reading power_supply class charge_control_end_threshold returns no such device error, which results in battery metrics not being exported.

Fixes: https://github.com/prometheus/node_exporter/issues/3019

SuperQ commented 1 month ago

LGTM, although, it seems to be only some thinkpads. My X1 Carbon seems to work OK for this file.