Skip to content
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

[Enhancement request] example for elastic SCRAPPING SpringBoot Actuator /prometheus endpoint #418

Open
patpatpat123 opened this issue Jan 28, 2023 · 0 comments

Comments

@patpatpat123
Copy link

Hello Elastic team,

This is my first post in this repo.
First of all, I would like to say big thanks for putting those examples together.
They are very clear and helpful.

For me in particular, I learned a lot with this example:
https://github.com/elastic/examples/blob/master/scraping-prometheus-k8s-with-metricbeat/metricbeat-prometheus-auto-discover.yaml

I would like to reach out with a small enhancement request please:
SpringBoot with the latest micrometer combined with SpringBoot actuator offers a very nice /prometheus endpoint.
The information provided by this endpoint are very useful and appreciated by the community.

Here is the official doc: https://docs.spring.io/spring-boot/docs/2.5.6/reference/html/actuator.html#actuator.metrics.export.prometheus

Here is a small example of the very clear metrics as http response:

# HELP http_server_requests_active_seconds_max  
# TYPE http_server_requests_active_seconds_max gauge
http_server_requests_active_seconds_max{exception="none",method="GET",outcome="SUCCESS",status="200",uri="UNKNOWN",} 0.4322848
# HELP http_server_requests_active_seconds  
# TYPE http_server_requests_active_seconds summary
http_server_requests_active_seconds_active_count{exception="none",method="GET",outcome="SUCCESS",status="200",uri="UNKNOWN",} 1.0
http_server_requests_active_seconds_duration_sum{exception="none",method="GET",outcome="SUCCESS",status="200",uri="UNKNOWN",} 0.4322638

Some prometheus scrappers can SCRAP this endpoint and forward the metrics onto prometheus server, following a very nice "poll the metrics" instead of having the app proactively send the metrics.

However, this requires relying on some prometheus scrappers, as well as a prometheus server.

Our team enjoy and heavily use Elastic Stack.

Would it be possible to have an example where the Elastic Stack scrap this /prometheus endpoint, get the metrics (fingers crossed they are compatible with Elastc) and send them to Elastic please?

This would be a great example and a great addition.

Thank you for your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant