-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Handle duplicated TYPE line for prometheus metrics #18813
Comments
Pinging @elastic/integrations-platforms (Team:Platforms) |
I think the underlying problem is that we use a different lib to parse metrics than Prometheus is using, this seems to cause some unexpected behaviors when the source data doesn't really follow with the format. We may want to investigate a way to use the same code paths that Prometheus is using to collect metrcs @ChrsMark I'm not sure this one is trivial, what's the approach you had in mind? |
Hmm, yeap it might not be so easy yes. The code cannot even "unpack" the response, right? |
Is there any plan to fix this? |
Hey we plan to move to an improved parsing library so this might fix this one too: #24707 |
I too am getting this error on
|
@xuoguoto do you have a similar case with what is described in this issue's description? If so I'm afraid that there is no quick fix for this at the moment since this violated the Prometheus standard. As mentioned in previous comment these kind of issues might be resolved when/if we finally move to a new parsing library (#24707). |
@ChrsMark From the exporter, here is what I see when greping for
Is this a problem? |
Here we got this issue but with a slight variation.
|
@hamelg, I encountered the same issue as you. Metrics are exposed via Prometheus JMX Exporter. The weird thing is, that metricbeat behaves differnt on different versions of the JMX Exporter With MX Exporter v 0.14.0 everything works as expected – metrics are exported, with v 0.16.1 I get the following error
Output with MX Exporter v 0.14.0
Output with MX Exporter v 0.16.1:
|
Hey @peterschrott ! Could you also share the returned headers in both cases if you |
A quick heads-up on this. A Prometheus server is able to scrape metrics from an endpoint that exposes duplicated metrics. In that case both metrics are collected without and issue. I verified that the case reported in the issue's description can be handled without an issue by a Prom Server. So for an endpoint exposing the following:
The Prom Server will collect both metrics for example:
So in that case with the current Metricbeat module we are not able to provide the same experience. The upgrade of the library at #33865 will solve this issue. As far as the java client exporters is concerned, I cannot say for sure what was the issue but I suspect that it has to do with https://github.com/prometheus/client_java/releases/tag/parent-0.10.0 or something similar as reported at #24554. In such cases the headers need to be verified and if the endpoint is |
Describe the enhancement:
Opening the issue for enhancement on behalf of a user.
They are collecting MicroProfile Metrics from Payara in JSON format.
Unfortunately the Payara versions 5.193.1, 5.194 and 5.201 have a bug in their MicroProfile Metrics implementation and the output contains repeated TYPE lines
This violates the standard and Metricbeat yields an error:
The request is to be able to have Metricbeat to ignore duplicate (identical) TYPE lines (convert Error to Warning) and process data nevertheless.
This bug is fixed in
Payara 5.202RC1
but the upgrade is complex and lengthy due to scale of usage.Describe a specific use case for the enhancement or feature:
Allow users in "bugged" version of Payara to still use Metricbeat.
As per private discussion with @exekias and @sorantis . Opening the case to keep a register of demand.
The text was updated successfully, but these errors were encountered: