hyness / spring-cloud-config-server

Docker build of the spring-cloud-config-server
Apache License 2.0
74 stars 54 forks source link

Enable monitoring config server with Prometheus #57

Closed tkgregory closed 3 years ago

tkgregory commented 3 years ago

Thanks a lot for creating & maintaining this project!

It would be great if we could enable metrics endpoints for integrations with monitoring tools like Prometheus.

My use case is that I want to monitor the Spring Cloud Config Server with Prometheus. For that I need to expose /actuator/prometheus.

Right now I'm able to set management.endpoints.web.exposure.include=health,info,metrics which exposes /actuator/metrics. However, I need the /actuator/prometheus endpoint which exposes metrics in a custom format.

I think 2 changes would be required here:

  1. include the micrometer-registry-prometheus in the application artifact
  2. document the fact that users can now set management.endpoints.web.exposure.include=prometheus to enable Prometheus metrics

What do you think?

hyness commented 3 years ago

I think this would be a useful feature to add as well. It would need to be added like the other features as a simple profile to include. Prometheus is one micrometer implementation. I’ve also used the new relic integration. Ideally this would eventually support as many implementations as possible, but we can start with Prometheus.

Would you like to submit a pull request or is this a request for me to add it?

tkgregory commented 3 years ago

@hyness Good idea. It would be very helpful if you could add this, if you have time. I'm not so familiar with the way you're configuring the functionailty on/off here.

tkgregory commented 3 years ago

@hyness just so I can plan accordingly, do you think this will be added any time soon? Thanks!

hyness commented 3 years ago

Hello @tkgregory, I can’t give you any timelines unfortunately. However, the image already supports using a custom loader path for adding jars, which should allow you to add the Prometheus jars. See #49 for more details

tkgregory commented 3 years ago

Thank you so much @hyness . This is a really helpful change.