-
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
Prometheus scrape fails with error 406 #16870
Comments
Pinging @elastic/integrations-platforms (Team:Platforms) |
So I don't know if I am exactly doing this correctly but I believe I got micrometer 1.3.0 running with Tomcat using the spring-boot-actuator-demo, and I am unable to get metricbeat to fail while fetching from Steps I did to try and reproduce the issue:
The metricbeat is able to reach the prometheus endpoint and the events are reported by metricbeat. I am no Java or Maven expert, so any pointers in helping me reproduce this bug would be helpful. |
This configuration fixes the issue.
|
I am still unable to reproduce this issue. Using spring-boot (1.55.22, which uses Spring framwork 4.3.25.RELEASE) along with micrometer (1.3.0) and micrometer-registry-prometheus (1.3.0). I am unable to get it to fail still. I have spend a considerable amount of time trying to reproduce the same setup you are mentioning with no success. Each time metricbeat is able to scrape the prometheus metrics, without any issues. Here is the
And the
Just to show that its rendering prometheus metrics correctly from my spring-boot example:
|
This is not using spring boot |
@tarp2699 I am unable to get this working without spring boot, would you be able to provide a skeleton project that represents the error your hitting? |
I'm not a developer myself, I can try to setup a meeting with our developer that configured this and see if we can get to a point of re-creation. Let me know and I can try to arrange this. |
@tarp2699 Yes that would be very helpful in reproducing these, so we can ensure that metricbeat works out of the box for everyone. |
It seems that using Prometheus collector metricset against Tomcat with micrometer 1.3.0 results on an error 406 from the server. This is most likely produced by a missing
Accept
header in our request, leaving the server with no clue of what formats we accept.We must reproduce this issue and research the right set of headers that we must send to be compatible with what exporters expect.
The text was updated successfully, but these errors were encountered: