-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
powercap: RAPL zone 'package' appears duplicated with identical index and name #2147
Comments
Hi, @matej-g, @discordianfish i don't think it's a bug in procfs. The names can be identical, but path probably cant. Here is an example from my machine:
In both cases the name is package-0, but path should be different, so to fix it we only need change node-exporter part to something like this: descriptor := prometheus.NewDesc(
prometheus.BuildFQName(namespace, "rapl", rz.Name+"_joules_total"),
"Current RAPL "+rz.Name+" value in joules",
[]string{"index", "path"}, nil,
)
ch <- prometheus.MustNewConstMetric(
descriptor,
prometheus.CounterValue,
float64(newMicrojoules)/1000000.0,
index,
rz.Path,
) And the end result will be like this:
Alternatively we my need to change metrics name in someway, if we want to avoid adding path label for some reason. |
I have been trying out the node exporter on my machine when I noticed the
rapl
collector was filling up the logs on each scrape with error:After dumping out some more info about the zones in the node exporter's rapl collector, I noticed that the
package
is being reported twice with the same index:After checking out the
powercap
class, it looks like it is giving priority to the index embedded in the name of the RAPL zone. However, in my case, there are two zones with identical names / indices. After checking in/sys/class/powercap
on my machine, I noticed I have twopackage-0
zones:It seems then both are being parsed as
package
name with index 0, causing duplication and the aforementioned error on the side ofnode_exporter
Output of my
uname -a
for completeness sake:Linux <machine-name> 4.18.0-305.3.1.el8_4.x86_64 prometheus/procfs#1 SMP Mon May 17 10:08:25 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: