From d20ed65c61d2d4c65e2b6853f93a2dcdef236ea9 Mon Sep 17 00:00:00 2001 From: Christian Dupuis Date: Thu, 22 May 2014 22:53:08 +0200 Subject: [PATCH] Update docs for new extended health support fixes #930 --- .../main/asciidoc/production-ready-features.adoc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 5547e0e9419..d157e042661 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -151,10 +151,10 @@ To provide custom health information you can register a Spring bean that impleme import org.springframework.stereotype.Component; @Component - public class MyHealth implements HealthIndicator { + public class MyHealth implements HealthIndicator { @Override - public String health() { + public Health health() { // perform some specific health check return ... } @@ -170,6 +170,16 @@ Redis, MongoDB and RabbitMQ. Spring Boot adds the `HealthIndicator` instances automatically if beans of type `DataSource`, `MongoTemplate`, `RedisConnectionFactory`, `RabbitTemplate` are present in the `ApplicationContext`. +Besides implementing custom `HealthIndicator`s and using out-of-box {sc-spring-boot-actuator}/health/Status.{sc-ext}[`Status`] +types, it is also possible to introduce custom `Status` types for different or more complex system +states. In that case a custom implementation of the {sc-spring-boot-actuator}/health/HealthAggregator.{sc-ext}[`HealthAggregator`] +interface needs to be provided or the default implementation has to be configured using the +`health.status.order` configuration property. + +Assuming a new `Status` with code `FATAL` is being used in one of your `HealthIndicator` +implementations. To configure the severity or order add the following to your application properties: +`healt.status.order: FATAL, DOWN, UNKOWN, UP`. + [[production-ready-application-info]]