mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Document health aggregation strategy and default status mappings
Closes gh-9580
This commit is contained in:
parent
528e334e1c
commit
a064a52f0b
@ -283,8 +283,10 @@ returned, and for an authenticated connection additional details are also displa
|
||||
Health information is collected from all
|
||||
{sc-spring-boot-actuator}/health/HealthIndicator.{sc-ext}[`HealthIndicator`] beans defined
|
||||
in your `ApplicationContext`. Spring Boot includes a number of auto-configured
|
||||
`HealthIndicators` and you can also write your own.
|
||||
|
||||
`HealthIndicators` and you can also write your own. By default, the final system state is derived
|
||||
by the `HealthAggregator` which sorts the statuses from each `HealthIndicator` based on an ordered list of statuses.
|
||||
The first status in the sorted list is used as the overall health status.
|
||||
If no `HealthIndicator` returns a status that is known to the `HealthAggregator`, an `UNKNOWN` status is used.
|
||||
|
||||
|
||||
=== Security with HealthIndicators
|
||||
@ -400,6 +402,25 @@ For example, the following maps `FATAL` to `HttpStatus.SERVICE_UNAVAILABLE`:
|
||||
endpoints.health.mapping.FATAL=503
|
||||
----
|
||||
|
||||
The default status mappings for the built-in statuses are:
|
||||
|
||||
[cols="1,3"]
|
||||
|===
|
||||
|Status |Mapping
|
||||
|
||||
|DOWN
|
||||
|SERVICE_UNAVAILABLE (503)
|
||||
|
||||
|OUT_OF_SERVICE
|
||||
|SERVICE_UNAVAILABLE (503)
|
||||
|
||||
|UP
|
||||
|No mapping by default, so http status is 200
|
||||
|
||||
|UNKNOWN
|
||||
|No mapping by default, so http status is 200
|
||||
|===
|
||||
|
||||
|
||||
|
||||
[[production-ready-application-info]]
|
||||
|
Loading…
Reference in New Issue
Block a user