-
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
Metricbeat Prometheus module can't fetch over 200K event in one shot #11912
Comments
I wasn't able to reproduce, any hint on how to replicate the scenario? |
Well my config is as simple as following. How many events did your Prometheus server return? @odacremolbap `metricbeat.modules:
|
The reason of your problem is not "Metricbeat Prometheus module can't fetch over 200K event in one shot",please check your prometheus_url is correct.You can use this command and have a test |
Well Prometheus API works well with the query |
Hi all, Cheers, |
Since 7.5.0, metricbeat logs more information when this error happens (#13749), could someone with this problem share the error message on 7.5 or greater? |
I believe I'm seeing the same behavior in a Java Quarkus MicroProfile enabled app (as #14513 referenced here). Running metricbeat 7.5.1 I'm getting the following error:
The prometheus metrics retrieved from my /metrics endpoint validated correctly using Prometheus promtool but somehow fails when trying to decode the response by metricbeat prometheus collector. (The problem in this case is definitively not a too large response as I only have a few metrics). I can't understand where it's getting 't from as it's nowhere in the response. Would be great to be able to debug log what data it's actually trying to decode, but even setting debug logging I'm not seeing any information regarding what it's trying to decode? (or even which metric value) only the error above, which is hard to understand where it's coming from. |
@christian-morin It is possible that for some reason Metricbeat is receiving a different response, if it is an error #15712 will help to investigate it, this change will be included in 7.6.1. In the meantime you could try to run a custom build of the 7.6 branch. |
@jsoriano ran this with 7.6.1 and noticed a new (and correct) error-description "unexpected status code 406 from server", which made me realise that the request from metricbeat is sent without an Accept header which creates this behavior for some prometheus-implementations which require this header to be set. Noticed an issue has been created for this in #16870 |
@christian-morin thanks for the update! Does the workaround mentioned in #16870 work for you? |
@jsoriano yes, adding the Accept header in the Prometheus module config as
Made it start working! |
Ok, I am going to close this issue as since 7.5 (#13749) it is easier to diagnose what is happening on these cases, and we can continue with specific issues. Thanks all! |
i have the same problem. When the run it as curl could see the events but getting the below error in the module.error.message |
did u got solution |
I am following the tutorial at https://www.elastic.co/guide/en/observability/8.5/monitor-java-app.html#_what_youll_learn_3, and now I am having the error like:
I do not know what caused the problem. |
config:
metricbeat.modules:
period: 10s
hosts: ["<prometheus_url>"]
metrics_path: '/federate'
query:
'match[]': '{name!=""}'
namespace: example
response:
"error": {
"message": "Unable to decode response from prometheus endpoint"
}
For confirmed bugs, please report:
When a query in a Prometheus directive returns over roughly 200k events, this error comes out.
The text was updated successfully, but these errors were encountered: