-
Notifications
You must be signed in to change notification settings - Fork 40.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
Configurable Health Indicator to observe HTTP Endpoints #36953
Comments
We talked about that in our last meeting, and we're not against it. Can you provide some more details how that http check would work? We worried a bit about configuration vs. flexibility. E.g. for a HTTP healthcheck, one should be able to configure the URL, timeouts and (I guess) headers. |
I did this a few times in the past and I was always missing this feature, big +1 from me. :) I think there are two main "flavors" of such a
Something like this. The adapter and other components are here, the client is here. I think both would be nice (not necessarily in one issue). |
Hi @mhalbritter, let me first describe the current implementation. At the moment is there a default configuration, but a connection and read timeout are configurable. In case of an negative result, the health check provides an error description, either the returned status code or the message from a caught exception. A generic implementation, suitable for the actuator framework needs in my opionion these features and the following additional features:
Having this features, the health indicator should be usefull for a wide range of scenarios. |
@jonatan-ivanov I will incoporate your suggestions, if I will implement it. |
This would help to mitigate the issue when actuator endpoints are deployed on a separate management context:
Related to #25471 |
Is this a duplicate of #25151 ? |
Hey @obfischer,
Are we talking about a ready-made class in Spring Boot which you can extend and add it to your context or are we talking about some properties which would enable that feature? I'm asking because I'm not keen on the idea of somehow specifying the matchers in the properties. |
Hi @mhalbritter, I think both should be possible.
|
I will start with a implementation in my own repository for now. If anyone has feature requirements, feel free to add them here as comment. |
@obfischer: How far are you with implementation? |
I would like to have a generic health indicator to observe the availability of an HTTP endpoint, provided by another service.
Why do I see the need for such an implementation? At my clients I see a wide use of Spring Boot Admin as central service to monitor Spring Boot based applications. Often a service is shown there as healthy, but it isn't healthy (I am aware of the difference of liveness and readyness) as an REST-Endpoint or any other HTTP endpoint is not available or reachable. Although they have also other monitoring solutions running, mostly it is much easier to add an health indicator in a Spring Boot application than to get another department to do it.
I have written such an health indicator over the last years many times and I would be happy to contribute it, if I get some advices how to implement it in such a way, that it fits at best to the actuator framework in Spring Boot under the aspects of architecture and maintainability.
The text was updated successfully, but these errors were encountered: