java.lang.Object
org.elasticsearch.health.HealthService
This service collects health indicators from all modules and plugins of elasticsearch
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHealthService
(List<HealthIndicatorService> healthIndicatorServices, ThreadPool threadPool) Creates a new HealthService. -
Method Summary
Modifier and TypeMethodDescriptionvoid
getHealth
(Client client, String indicatorName, boolean verbose, int maxAffectedResourcesCount, ActionListener<List<HealthIndicatorResult>> listener) Returns the list of HealthIndicatorResult for this cluster.
-
Field Details
-
HEALTH_API_ID_PREFIX
- See Also:
-
-
Constructor Details
-
HealthService
Creates a new HealthService. Accepts a list of regular indicator services and a list of preflight indicator services. Preflight indicators are run first and represent serious cascading health problems. If any of these preflight indicators are not GREEN status, all remaining indicators are likely to be degraded in some way or will not be able to calculate their state correctly. The remaining health indicators will return UNKNOWN statuses in this case.
-
-
Method Details
-
getHealth
public void getHealth(Client client, @Nullable String indicatorName, boolean verbose, int maxAffectedResourcesCount, ActionListener<List<HealthIndicatorResult>> listener) Returns the list of HealthIndicatorResult for this cluster.- Parameters:
client
- A client to be used to fetch the health data from the health nodeindicatorName
- If not null, the returned results will only have this indicatorverbose
- Whether to compute the details portion of the resultsmaxAffectedResourcesCount
- The maximum number of affected resources to return per each type.listener
- A listener to be notified of the list of all HealthIndicatorResult if indicatorName is null, or one HealthIndicatorResult if indicatorName is not null- Throws:
ResourceNotFoundException
- if an indicator name is given and the indicator is not found
-