TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/spring-projects/spring-boot/llms.txt
Use this file to discover all available pages before exploring further.
/actuator/health endpoint gives you a real-time view of your application’s operational state. Spring Boot aggregates health information from all registered HealthIndicator beans — covering databases, caches, messaging systems, and disk space — into a single status. Monitoring tools poll this endpoint to detect outages; Kubernetes uses it to make pod scheduling and traffic routing decisions.
Health status values
Every health indicator returns one of the following statuses:| Status | Meaning | Default HTTP code |
|---|---|---|
UP | The component is functioning normally. | 200 |
DOWN | The component has failed. | 503 |
OUT_OF_SERVICE | The component has been deliberately taken offline. | 503 |
UNKNOWN | The component state cannot be determined. | 200 |
StatusAggregator that orders all individual statuses and takes the highest-severity one.
Showing health details
By default, the response contains only the top-level status. Control what is shown withmanagement.endpoint.health.show-details:
| Value | Behavior |
|---|---|
never (default) | Only the top-level status is returned. |
when-authorized | Full details are shown to authenticated users in the configured roles. |
always | Full details are shown to all users. |
show-components property accepts the same values and controls whether the names of individual indicators appear in the response without their full details.
Auto-configured health indicators
Spring Boot automatically configures indicators for common infrastructure components. Enable or disable each withmanagement.health.<key>.enabled:
Databases and data stores
Databases and data stores
| Key | Indicator | Checks |
|---|---|---|
db | DataSourceHealthIndicator | Obtains a connection from the DataSource. |
cassandra | CassandraDriverHealthIndicator | Cassandra database is up. |
couchbase | CouchbaseHealthIndicator | Couchbase cluster is up. |
elasticsearch | ElasticsearchRestClientHealthIndicator | Elasticsearch cluster is up. |
mongo | MongoHealthIndicator | MongoDB database is up. |
neo4j | Neo4jHealthIndicator | Neo4j database is up. |
redis | DataRedisHealthIndicator | Redis server is up. |
ldap | LdapHealthIndicator | LDAP server is up. |
management.health.db.ignore-routing-data-sources=true.Messaging and other services
Messaging and other services
| Key | Indicator | Checks |
|---|---|---|
rabbit | RabbitHealthIndicator | RabbitMQ server is up. |
jms | JmsHealthIndicator | JMS broker is up. |
mail | MailHealthIndicator | Mail server is up. |
hazelcast | HazelcastHealthIndicator | Hazelcast server is up. |
diskspace | DiskSpaceHealthIndicator | Checks for low disk space. |
ssl | SslHealthIndicator | SSL certificates are valid and not expiring soon. |
ping | PingHealthIndicator | Always returns UP. |
Kubernetes liveness and readiness indicators
Kubernetes liveness and readiness indicators
| Key | Indicator | Exposes |
|---|---|---|
livenessstate | LivenessStateHealthIndicator | The Liveness application availability state. |
readinessstate | ReadinessStateHealthIndicator | The Readiness application availability state. |
management.endpoint.health.probes.enabled=false.Writing a custom HealthIndicator
ImplementHealthIndicator and register the implementation as a Spring bean. The bean name minus the HealthIndicator suffix becomes the component key in the health response.
my (the HealthIndicator suffix is stripped).
For reactive applications using Spring WebFlux, implement ReactiveHealthIndicator instead to provide a non-blocking health check:
Custom status ordering and HTTP mappings
To add a customStatus (such as FATAL) and define how it sorts relative to built-in statuses:
Health groups
Group indicators to serve different audiences or purposes, such as separating infrastructure checks from application checks:/actuator/health/custom. Groups can also be made available on the main server port via additional-path:
Kubernetes liveness and readiness probes
Spring Boot automatically exposes liveness and readiness as health groups at/actuator/health/liveness and /actuator/health/readiness when running in a Kubernetes environment.
Optionally expose probes on the main server port
If actuator runs on a separate management port, the probe may succeed even when the main application is broken. Expose probes on the main port to avoid this:This makes the
liveness group available at /livez and readiness at /readyz on the main server port.The liveness probe should not depend on external systems such as databases. If an external system fails, Kubernetes will restart all application instances and may cause cascading failures. Reserve external checks for the readiness probe, and even then choose carefully.
Application lifecycle and probe states
| Startup phase | LivenessState | ReadinessState | HTTP server |
|---|---|---|---|
| Starting | BROKEN | REFUSING_TRAFFIC | Not started |
| Started | CORRECT | REFUSING_TRAFFIC | Refuses requests |
| Ready | CORRECT | ACCEPTING_TRAFFIC | Accepts requests |
| Shutdown phase | Liveness State | Readiness State | HTTP server |
|---|---|---|---|
| Running | CORRECT | ACCEPTING_TRAFFIC | Accepts requests |
| Graceful shutdown | CORRECT | REFUSING_TRAFFIC | New requests rejected |
| Shutdown complete | N/A | N/A | Server shut down |