-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Description
I've been using the Spring Boot Actuator health check functionality for a while now and really enjoy the easy of writing custom HealthIndicator
s. However, there is one need that Spring Boot Actuator does not currently support (see this Stack Overflow thread for reference here) that I'd like to suggest as a new feature but first I'd like to explain our challenge.
For our applications the /health
endpoint is queried very frequently (say every 5 seconds) to determine if fail over to another site needs to occur. For frequently executed queries the /heath
endpoint should report the health of the application, and not execute any HealthIndicator
s that check the health of external dependencies such as external web services because those calls are expensive.
Additionally, there are times where health checks against external dependencies are needed during post deployment or troubleshooting scenarios. It's very easy to write custom HealthIndicators
and having the ability to consolidate it all under one /health
endpoint is advantageous instead of writing additional code to expose this through another endpoint.
If this feature request is accepted I'd like to propose that the implementation is opt-in so by default custom HealthIndicator
s are executed like they are today so users don't find themselves in a situation where a HealthIndicator
is not run when they expect it to be.
Finally, if possible, I'd be willing to make the contributions to implement this feature as well.
Thank you!