Add property to disable default health indicators

Add a "management.health.defaults.enabled" property that controls whether
the default health indicators are enabled. This allow to disable them all
by default and still enable individual ones using their respective
specific property.

Closes gh-2298
This commit is contained in:
Stephane Nicoll
2015-07-28 16:27:56 +02:00
parent 15442b9667
commit b569918db1
7 changed files with 195 additions and 40 deletions

View File

@@ -716,6 +716,7 @@ content into your application; rather pick only the properties that you need.
management.health.elasticsearch.enabled=true
management.health.elasticsearch.indices= # comma-separated index names
management.health.elasticsearch.response-timeout=100 # the time, in milliseconds, to wait for a response from the cluster
management.health.defaults.enabled=true # enable default health indicators
management.health.diskspace.enabled=true
management.health.diskspace.path=.
management.health.diskspace.threshold=10485760

View File

@@ -260,6 +260,8 @@ The following `HealthIndicators` are auto-configured by Spring Boot when appropr
|Checks that a Solr server is up.
|===
TIP: It is possible to disable them all using the `management.health.defaults.enabled`
property.
==== Writing custom HealthIndicators