-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Metrics clashing name #3940
Comments
Hi @M0NsTeRRR, I'm not sure what the issue is here - these are both metrics exposed by the Prometheus go client - https://github.com/prometheus/client_golang. They are named differently, and so by classical Prometheus rules they don't conflict, though I do recognize that OpenMetrics has some slightly different expectations. To be clear, when you parse with the python client, are you parsing directly or through the In the Caddy codebase we enable OpenMetrics negotiation automatically, which may be why the python client is running into that issue. |
Hello @hairyhenderson, When I parse them with the python client I use the direct output of the caddy exporter. I've read this issue : prometheus/common#253 (comment) |
Thanks for finding that issue @M0NsTeRRR. It does look significantly related. I think what that means is the presence of I'm not sure what we can do other than disabling OpenMetrics negotiation support or - probably better - make it configurable. It'd probably also be a good idea to file a bug in Modulo holidays/etc, I can do both of these things at some point over the next few days 😉... |
Of course thanks you, i'm learning golang since few days so I can't help you a lot on that works ahah :), feel free to tag me here or in the new issue if you need some logs or config files |
Ok, I've added an option to disable the negotiation in #3944, and logged prometheus/client_golang#829. Once #3944 is merged this issue can be closed, since you'll be able to configure the metrics handler to avoid the OM negotiation, which should be fine. It may be too late to get this into Caddy 2.3.0, but hopefully not 😅 |
@M0NsTeRRR when 2.3.0 is released (probably sometime over the next week) you can upgrade to that and set If you're using the metrics handler that's on the admin endpoint you'll need to switch to the explicit metrics handler instead since the admin one can't be configured. Based on conversation in the |
Okay, thanks you @hairyhenderson for your quick fix :) |
I'm running exporter-exporter to expose caddy metric with TLS and cert authentication and it appears
go_memstats_alloc_bytes
is in collision with an other metric
The two metrics
If I try to parse them with the prometheus client parser
This is the output I get
Openmetrics suffixes
https://github.com/prometheus/client_python/blob/f81891f57bf3d20a9bb87ea62b6c6b4a6c06f803/prometheus_client/openmetrics/parser.py#L466
The text was updated successfully, but these errors were encountered: