@ -382,9 +382,15 @@ to your application properties:
@@ -382,9 +382,15 @@ to your application properties:
management.health.status.order=DOWN, OUT_OF_SERVICE, UNKNOWN, UP
----
You might also want to register custom status mappings with the `HealthMvcEndpoint`
if you access the health endpoint over HTTP. For example you could map `FATAL` to
`HttpStatus.SERVICE_UNAVAILABLE`.
The HTTP status code in the response reflects the overall health status (e.g. `UP`
maps to 200, `OUT_OF_SERVICE` or `DOWN` to 503). You might also want to register custom
status mappings with the `HealthMvcEndpoint` if you access the health endpoint over HTTP.
For example, the following maps `FATAL` to `HttpStatus.SERVICE_UNAVAILABLE`:
[source,properties,indent=0]
----
endpoints.health.mappings.FATAL=503
----
@ -677,9 +683,8 @@ If you don't want to expose endpoints over HTTP you can set the management port
@@ -677,9 +683,8 @@ If you don't want to expose endpoints over HTTP you can set the management port
----
[[production-ready-health-access-restrictions]]
=== HTTP health endpoint access restrictions
=== HTTP health endpoint format and access restrictions
The information exposed by the health endpoint varies depending on whether or not it's
accessed anonymously, and whether or not the enclosing application is secure.
By default, when accessed anonymously in a secure application, any details about the
@ -689,6 +694,58 @@ endpoint being used in a denial of service attack. The `endpoints.health.time-to
@@ -689,6 +694,58 @@ endpoint being used in a denial of service attack. The `endpoints.health.time-to
property is used to configure the caching period in milliseconds. It defaults to 1000,
i.e. one second.
Sample summarized HTTP response (default for anonymous request):