-
Notifications
You must be signed in to change notification settings - Fork 41.2k
/actuator/health
returns 404 if no indicator is present
#18676
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
Comments
@philwebb I am new here. I want to fix it as my first work. Can I do it? |
@weiwensangsang Thanks for the offer but this is part of the release notes on the WIKI and as such it's a little hard to contribute to. |
/actuator/health
returns 404 if no indicator is present
We've discussed this one today and while we have to document the effect of disabling the health indicators, having no indicator shouldn't lead to a 404. It's inconsistent with JMX and having the endpoint disappearing (from an HTTP client’s perspective) doesn’t make sense. We've decided to return a simple |
I am just upgrading our application to Spring Boot 2.2.0. I am basically following the release notes at:
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.2-Release-Notes
As far as I can see, there is only one behavioral change missing in the documentation.
In my Spring Boot 2.1 application, I had disabled the heath endpoint defaults with:
management.health.defaults.enabled=false
This disabled all health indicators apart from from the
ApplicationHealthIndicator
.Now with Sprint Boot 2.2, the same endpoint returns a 404 HTTP response. My other applications still work the same because they additionally define some custom health indicators.
It seems to be related to the following fix:
#17926
It is now always added. But it seems disabled with the defaults. According the
HealthContributorAutoConfigurationTests
the behavior was changed intentionally, and as such it should be added to the release notes IMHO.The text was updated successfully, but these errors were encountered: