Explain the shard allocations

  • POST also GET /_cluster/allocation/explain
Auth

Get explanations for shard allocations in the cluster. For unassigned shards, it provides an explanation for why the shard is unassigned. For assigned shards, it provides an explanation for why the shard is remaining on its current node and has not moved or rebalanced to another node. This API can be very useful when attempting to diagnose why a shard is unassigned or why a shard continues to remain on its current node when you might expect otherwise.

Query parameters

include_disk_info boolean · default: false

If true, returns information about disk usage and shard sizes.

include_yes_decisions boolean · default: false

If true, returns YES decisions in explanation.

master_timeout string · default: 30s

Period to wait for a connection to the master node.

Request body

current_node string

Specifies the node ID or the name of the node to only explain a shard that is currently located on the specified node.

index string

Specifies the name of the index that you would like an explanation for.

primary boolean

If true, returns explanation for the primary shard for the given shard ID.

shard number

Specifies the ID of the shard that you would like an explanation for.

Response

application/json
allocate_explanation string
allocation_delay string
allocation_delay_in_millis number
can_allocate enum
Values: yes no worse_balance throttled awaiting_info allocation_delayed no_valid_shard_copy no_attempt
can_move_to_other_node enum
Values: yes no worse_balance throttled awaiting_info allocation_delayed no_valid_shard_copy no_attempt
can_rebalance_cluster enum
Values: yes no worse_balance throttled awaiting_info allocation_delayed no_valid_shard_copy no_attempt
can_rebalance_cluster_decisions object[]
decider string required
decision enum required
Values: NO YES THROTTLE ALWAYS
explanation string required
can_rebalance_to_other_node enum
Values: yes no worse_balance throttled awaiting_info allocation_delayed no_valid_shard_copy no_attempt
can_remain_decisions object[]
decider string required
decision enum required
Values: NO YES THROTTLE ALWAYS
explanation string required
can_remain_on_current_node enum
Values: yes no worse_balance throttled awaiting_info allocation_delayed no_valid_shard_copy no_attempt
cluster_info object
nodes map string to object required
<string> object
node_name string required
least_available object required
path string required
total_bytes number required
used_bytes number required
free_bytes number required
free_disk_percent number required
used_disk_percent number required
most_available object required
path string required
total_bytes number required
used_bytes number required
free_bytes number required
free_disk_percent number required
used_disk_percent number required
shard_sizes map string to number required
shard_data_set_sizes map string to string
shard_paths map string to string required
reserved_sizes object[] required
node_id string required
path string required
total number required
shards string[] required
configured_delay string
configured_delay_in_millis number
current_node object
id string required
name string required
roles enum[] required
Values: master data data_cold data_content data_frozen data_hot data_warm client ingest ml voting_only transform remote_cluster_client coordinating_only
attributes map string to string required
transport_address string required
weight_ranking number required
current_state string required
index string required
move_explanation string
node_allocation_decisions object[]
deciders object[]
decider string required
decision enum required
Values: NO YES THROTTLE ALWAYS
explanation string required
node_attributes map string to string required
node_decision enum required
Values: yes no worse_balance throttled awaiting_info allocation_delayed no_valid_shard_copy no_attempt
node_id string required
node_name string required
roles enum[] required
Values: master data data_cold data_content data_frozen data_hot data_warm client ingest ml voting_only transform remote_cluster_client coordinating_only
store object
allocation_id string required
found boolean required
in_sync boolean required
matching_size_in_bytes number required
matching_sync_id boolean required
store_exception string required
transport_address string required
weight_ranking number
primary boolean required
rebalance_explanation string
remaining_delay string
remaining_delay_in_millis number
shard number required
unassigned_info object
at union oneOf required
One of: string or number
last_allocation_status string
reason enum required
Values: INDEX_CREATED CLUSTER_RECOVERED INDEX_REOPENED DANGLING_INDEX_IMPORTED NEW_INDEX_RESTORED EXISTING_INDEX_RESTORED REPLICA_ADDED ALLOCATION_FAILED NODE_LEFT REROUTE_CANCELLED REINITIALIZED REALLOCATED_REPLICA PRIMARY_FAILED FORCED_EMPTY_PRIMARY MANUAL_ALLOCATION
details string
failed_allocation_attempts number
delayed boolean
allocation_status string
note string