Package io.micronaut.opensearch.health
Class OpenSearchClientHealthIndicator
java.lang.Object
io.micronaut.opensearch.health.OpenSearchClientHealthIndicator
- All Implemented Interfaces:
- io.micronaut.core.order.Ordered,- io.micronaut.management.health.indicator.HealthIndicator
@Singleton
public class OpenSearchClientHealthIndicator
extends Object
implements io.micronaut.management.health.indicator.HealthIndicator
Health indicator integration for the configured OpenSearch cluster.
- 
Field SummaryFields inherited from interface io.micronaut.core.order.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionOpenSearchClientHealthIndicator(org.opensearch.client.opensearch.OpenSearchAsyncClient client) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionorg.reactivestreams.Publisher<io.micronaut.management.health.indicator.HealthResult>Tries to call the cluster info API on OpenSearch to obtain information about the cluster.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.order.OrderedgetOrder
- 
Constructor Details- 
OpenSearchClientHealthIndicatorpublic OpenSearchClientHealthIndicator(org.opensearch.client.opensearch.OpenSearchAsyncClient client) Constructor.- Parameters:
- client- The OpenSearch high level REST client.
 
 
- 
- 
Method Details- 
getResultpublic org.reactivestreams.Publisher<io.micronaut.management.health.indicator.HealthResult> getResult()Tries to call the cluster info API on OpenSearch to obtain information about the cluster. If the call succeeds, the OpenSearch cluster health status (GREEN / YELLOW / RED) will be included in the health indicator details.- Specified by:
- getResultin interface- io.micronaut.management.health.indicator.HealthIndicator
- Returns:
- A positive health result UP if the cluster can be communicated with and is in either GREEN or YELLOW status. A negative health result DOWN if the cluster cannot be communicated with or is in RED status.
 
 
-