Get the cluster health status
- GET /_cluster/health/{index}
- GET /_cluster/health
You can also use the API to get the health status of only specified data streams and indices. For data streams, the API retrieves the health status of the stream’s backing indices.
The cluster health status is: green, yellow or red. On the shard level, a red status indicates that the specific shard is not allocated in the cluster. Yellow means that the primary shard is allocated but replicas are not. Green means that all shards are allocated. The index level status is controlled by the worst shard status.
One of the main benefits of the API is the ability to wait until the cluster reaches a certain high watermark health level. The cluster status is controlled by the worst index status.
Responses
-
active_shards_percentstring -
The ratio of active shards in the cluster expressed as a string formatted percentage.
-
active_shards_percent_as_numbernumberrequired -
The ratio of active shards in the cluster expressed as a percentage.
-
delayed_unassigned_shardsnumberrequired -
The number of shards whose allocation has been delayed by the timeout settings.
-
indicesmap string to object -
<string>object -
shardsmap string to object -
<string>object -
statusrequired -
Supported values include:
green(orGREEN): All shards are assigned.yellow(orYELLOW): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.red(orRED): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.unknownunavailable
-
Values:
greenGREENyellowYELLOWredREDunknownunavailable -
statusrequired -
Supported values include:
green(orGREEN): All shards are assigned.yellow(orYELLOW): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.red(orRED): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.unknownunavailable
-
Values:
greenGREENyellowYELLOWredREDunknownunavailable -
number_of_pending_tasksnumberrequired -
The number of cluster-level changes that have not yet been executed.
-
statusrequired -
Supported values include:
green(orGREEN): All shards are assigned.yellow(orYELLOW): All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.red(orRED): One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.unknownunavailable
-
Values:
greenGREENyellowYELLOWredREDunknownunavailable -
task_max_waiting_in_queuestring -
The time since the earliest initiated task is waiting for being performed.
-
task_max_waiting_in_queue_millisnumberrequired -
The time expressed in milliseconds since the earliest initiated task is waiting for being performed.