Spring Boot Actuator /health endpoint does not show database or file system information Spring Boot Actuator /health endpoint does not show database or file system information spring spring

Spring Boot Actuator /health endpoint does not show database or file system information


By default Spring sets the below property to never. To be able to see full health details add the below property to your application.properties.

management.endpoint.health.show-details=always


From the spring-boot documentation:

45.6 Security with HealthIndicators

Information returned by HealthIndicators is often somewhat sensitive in nature. For example, you probably don’t want to publish details of your database server to the world. For this reason, by default, only the health status is exposed over an unauthenticated HTTP connection. If you are happy for complete health information to always be exposed you can set endpoints.health.sensitive to false. Health responses are also cached to prevent “denial of service” attacks. Use the endpoints.health.time-to-live property if you want to change the default cache period of 1000 milliseconds.

Make sure to have following properties set.

endpoints.health.sensitive=true # Mark if the endpoint exposes sensitive information.management.health.db.enabled=true # Enable database health check.management.health.defaults.enabled=true # Enable default health indicators.management.health.diskspace.enabled=true # Enable disk space health check.


In cases if you are using spring security, then by default security is enabled for actuator endpoints, disable it in your yml file -

management:    security:           enabled: false