Fix invalid metric name panic reading powercap dir#1800
Closed
chicknsoup wants to merge 8 commits intoprometheus:masterfrom
chicknsoup:master
Closed
Fix invalid metric name panic reading powercap dir#1800chicknsoup wants to merge 8 commits intoprometheus:masterfrom chicknsoup:master
chicknsoup wants to merge 8 commits intoprometheus:masterfrom
chicknsoup:master
Conversation
Issue:
When the rz.Name contains invalid metric character ("-") like this:
# cat /sys/class/powercap/intel-rapl:0/name
package-15
Node exporter will panic
```
panic: "node_rapl_package-15_joules_total" is not a valid metric name
```
Signed-off-by: chinhnc <chicknsoupuds@gmail.com>
Signed-off-by: chinhnc <chicknsoupuds@gmail.com>
Signed-off-by: chinhnc <chicknsoupuds@gmail.com>
Author
|
How to fix the incompatible module? @roidelapluie |
Member
|
The fix here is maybe putting that name in a label value and fixing the metric name |
Signed-off-by: chinhnc <chicknsoupuds@gmail.com>
Formatting Signed-off-by: chinhnc <chicknsoupuds@gmail.com>
Author
Already put the name in a label-value pair. But, not sure how to fix the failed tests. |
Removed old rapl metrics Signed-off-by: chinhnc <chicknsoupuds@gmail.com>
Signed-off-by: chinhnc <chicknsoupuds@gmail.com>
Signed-off-by: chinhnc <chicknsoupuds@gmail.com>
Member
Contributor
|
I happened across this independently, looking at the docs (https://www.kernel.org/doc/html/latest/power/powercap/powercap.html) "power zone" is the name so some variant of that as the label name could work. |
Member
|
There's also an issue in the procfs library that needs to be fix: prometheus/procfs#320 |
Contributor
|
#320 looks pretty good to me. I did wonder though, what hardware could have that many packages. None the less, I think it looks like a proper fix.
Br,
Ukri
…________________________________
From: Ben Kochie <notifications@github.com>
Sent: Thursday, August 20, 2020 2:28 PM
To: prometheus/node_exporter <node_exporter@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: Re: [prometheus/node_exporter] Fix invalid metric name panic reading powercap dir (#1800)
There's also an issue in the procfs library that needs to be fix: prometheus/procfs#320<prometheus/procfs#320>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#1800 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAADPRV7XOTJJH2IRQNSG53SBUCFDANCNFSM4PILG7KQ>.
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
|
Member
|
Closing in favor of using the procfs fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
When the rz.Name contains invalid metric character ("-") like this:
# cat /sys/class/powercap/intel-rapl:0/name
package-15
Node exporter will panic
Signed-off-by: chinhnc chicknsoupuds@gmail.com