Merge pull request #18170 from dreis2211
* pr/18170: Polish "Remove management.health.status.order from docs" Fix link formatting in custom HealthIndicator section Remove management.health.status.order from docs Closes gh-18170
This commit is contained in:
@@ -23,6 +23,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.springframework.boot.actuate.health.HealthEndpoint;
|
||||
import org.springframework.boot.context.properties.NestedConfigurationProperty;
|
||||
|
||||
/**
|
||||
* Properties used to configure the health endpoint and endpoint groups.
|
||||
@@ -33,6 +34,7 @@ import org.springframework.boot.actuate.health.HealthEndpoint;
|
||||
*/
|
||||
public abstract class HealthProperties {
|
||||
|
||||
@NestedConfigurationProperty
|
||||
private final Status status = new Status();
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,6 +28,15 @@
|
||||
"name": "management.endpoint.health.show-details",
|
||||
"defaultValue": "never"
|
||||
},
|
||||
{
|
||||
"name": "management.endpoint.health.status.order",
|
||||
"defaultValue": [
|
||||
"DOWN",
|
||||
"OUT_OF_SERVICE",
|
||||
"UP",
|
||||
"UNKNOWN"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "management.endpoints.enabled-by-default",
|
||||
"type": "java.lang.Boolean",
|
||||
|
||||
@@ -748,7 +748,7 @@ NOTE: The identifier for a given `HealthIndicator` is the name of the bean witho
|
||||
In the preceding example, the health information is available in an entry named `my`.
|
||||
|
||||
In addition to Spring Boot's predefined {spring-boot-actuator-module-code}/health/Status.java[`Status`] types, it is also possible for `Health` to return a custom `Status` that represents a new system state.
|
||||
In such cases, a custom implementation of the{spring-boot-actuator-module-code}/health/StatusAggregator.java[`StatusAggregator`] interface also needs to be provided, or the default implementation has to be configured by using the `management.endpoint.health.status.order` configuration property.
|
||||
In such cases, a custom implementation of the {spring-boot-actuator-module-code}/health/StatusAggregator.java[`StatusAggregator`] interface also needs to be provided, or the default implementation has to be configured by using the `management.endpoint.health.status.order` configuration property.
|
||||
|
||||
For example, assume a new `Status` with code `FATAL` is being used in one of your `HealthIndicator` implementations.
|
||||
To configure the severity order, add the following property to your application properties:
|
||||
|
||||
Reference in New Issue
Block a user