prometheus / procfs

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

CPU vulnerability reporting from sysfs is broken #531

Closed mwasilew2 closed 1 year ago

mwasilew2 commented 1 year ago

I was working on: https://github.com/prometheus/node_exporter/issues/1046 and got a panic when trying to get cpu vulnerabilities:

panic: Couldn't create metrics handler: couldn't create collector: failed to get vulnerabilities: unknown vulnerability state for itlb_multihit: Not affected

Turns out that the parser is looking for "Not Affected" rather than "Not affected". I'm not sure where the capital letter came from. I don't see it in the sysfs code. I suspect it was copied from the comment in the relevant PR: https://github.com/prometheus/procfs/pull/106#issuecomment-414981407 and this actually never worked.