public class EsClusterHealthCheck
extends com.codahale.metrics.health.HealthCheck
HealthCheck which checks the cluster state of an Elasticsearch cluster.| Constructor and Description |
|---|
EsClusterHealthCheck(org.elasticsearch.client.Client client)
Construct a new Elasticsearch cluster health check which will fail if the cluster health state is
ClusterHealthStatus.RED. |
EsClusterHealthCheck(org.elasticsearch.client.Client client,
boolean failOnYellow)
Construct a new Elasticsearch cluster health check.
|
| Modifier and Type | Method and Description |
|---|---|
protected com.codahale.metrics.health.HealthCheck.Result |
check()
Perform a check of the Elasticsearch cluster health.
|
public EsClusterHealthCheck(org.elasticsearch.client.Client client,
boolean failOnYellow)
client - an Elasticsearch Client instance connected to the clusterfailOnYellow - whether the health check should fail if the cluster health state is yellowpublic EsClusterHealthCheck(org.elasticsearch.client.Client client)
ClusterHealthStatus.RED.client - an Elasticsearch Client instance connected to the clusterprotected com.codahale.metrics.health.HealthCheck.Result check()
throws Exception
check in class com.codahale.metrics.health.HealthCheckHealthCheck.Result;
otherwise, an unhealthy HealthCheck.Result with a descriptive error
message or exceptionException - if there is an unhandled error during the health check; this will result in
a failed health checkCopyright © 2016. All rights reserved.