Module org.elasticsearch.server
Class StableMasterHealthIndicatorService
java.lang.Object
org.elasticsearch.cluster.coordination.StableMasterHealthIndicatorService
- All Implemented Interfaces:
HealthIndicatorService
This indicator reports the health of master stability.
If we have had a master within the last 30 seconds, and that master has not changed more than 3 times in the last 30 minutes, then
this will report GREEN.
If we have had a master within the last 30 seconds, but that master has changed more than 3 times in the last 30 minutes (and that is
confirmed by checking with the last-known master), then this will report YELLOW.
If we have not had a master within the last 30 seconds, then this will will report RED with one exception. That exception is when:
(1) no node is elected master, (2) this node is not master eligible, (3) some node is master eligible, (4) we ask a master-eligible node
to run this indicator, and (5) it comes back with a result that is not RED.
Since this indicator needs to be able to run when there is no master at all, it does not depend on the dedicated health node (which
requires the existence of a master).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final Diagnosis
static final String
static final String
static final Diagnosis
static final Diagnosis
Fields inherited from interface org.elasticsearch.health.HealthIndicatorService
MAX_AFFECTED_RESOURCES_COUNT
-
Constructor Summary
ConstructorsConstructorDescriptionStableMasterHealthIndicatorService
(CoordinationDiagnosticsService coordinationDiagnosticsService, ClusterService clusterService) -
Method Summary
Modifier and TypeMethodDescriptioncalculate
(boolean verbose, int maxAffectedResourcesCount, HealthInfo healthInfo) boolean
A preflight indicator is an indicator that is run first and represents a serious cascading health problem.name()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.health.HealthIndicatorService
calculate, createIndicator
-
Field Details
-
NAME
- See Also:
-
TROUBLESHOOT_DISCOVERY
-
TROUBLESHOOT_UNSTABLE_CLUSTER
-
CONTACT_SUPPORT
-
INGEST_DISABLED_IMPACT_ID
- See Also:
-
AUTOMATION_DISABLED_IMPACT_ID
- See Also:
-
BACKUP_DISABLED_IMPACT_ID
- See Also:
-
-
Constructor Details
-
StableMasterHealthIndicatorService
public StableMasterHealthIndicatorService(CoordinationDiagnosticsService coordinationDiagnosticsService, ClusterService clusterService)
-
-
Method Details
-
name
- Specified by:
name
in interfaceHealthIndicatorService
-
isPreflight
public boolean isPreflight()Description copied from interface:HealthIndicatorService
A preflight indicator is an indicator that is run first and represents a serious cascading health problem. For example, the `stable_master` health indicator is a preflight indicator. When it is red it means that the node has witnessed too many master nodes which could mean there are missing nodes, or a discovery problem, or that the node itself has problems joining the elected master. For these reasons, it likely that the cluster state is not up-to-date enough for us to make health decisions off of it.- Specified by:
isPreflight
in interfaceHealthIndicatorService
- Returns:
- true if this is a preflight indicator, false otherwise.
-
calculate
public HealthIndicatorResult calculate(boolean verbose, int maxAffectedResourcesCount, HealthInfo healthInfo) - Specified by:
calculate
in interfaceHealthIndicatorService
-