Class ElasticsearchRestHealthIndicator
java.lang.Object
org.springframework.boot.actuate.health.AbstractHealthIndicator
org.springframework.boot.actuate.elasticsearch.ElasticsearchRestHealthIndicator
- All Implemented Interfaces:
HealthContributor
,HealthIndicator
HealthIndicator
for an Elasticsearch cluster using a RestClient
.- Since:
- 2.1.1
- Author:
- Artsiom Yudovin, Brian Clozel, Filip Hrisafov
-
Constructor Summary
ConstructorDescriptionElasticsearchRestHealthIndicator
(org.elasticsearch.client.RestClient client) ElasticsearchRestHealthIndicator
(org.elasticsearch.client.RestHighLevelClient client) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doHealthCheck
(Health.Builder builder) Actual health check logic.Methods inherited from class org.springframework.boot.actuate.health.AbstractHealthIndicator
health
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.boot.actuate.health.HealthIndicator
getHealth
-
Constructor Details
-
ElasticsearchRestHealthIndicator
public ElasticsearchRestHealthIndicator(org.elasticsearch.client.RestHighLevelClient client) -
ElasticsearchRestHealthIndicator
public ElasticsearchRestHealthIndicator(org.elasticsearch.client.RestClient client)
-
-
Method Details
-
doHealthCheck
Description copied from class:AbstractHealthIndicator
Actual health check logic.- Specified by:
doHealthCheck
in classAbstractHealthIndicator
- Parameters:
builder
- theHealth.Builder
to report health status and details- Throws:
Exception
- anyException
that should create aStatus.DOWN
system status.
-