Explain the shard allocations
/_cluster/allocation/explain Get explanations for shard allocations in the cluster. This API accepts the current_node, index, primary and shard parameters in the request body or in query parameters, but not in both at the same time. 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. Refer to the linked documentation for examples of how to troubleshoot allocation issues using this API.
Parameters
query Query Parameters
| Name | Type |
|---|---|
index The name of the index that you would like an explanation for. | type TypesIndexName = string |
shard An identifier for the shard that you would like an explanation for. | number |
primary If true, returns an explanation for the primary shard for the specified shard ID. | boolean |
current_node Explain a shard only if it is currently located on the specified node name or node ID. | type TypesNodeId = string |
include_disk_info If true, returns information about disk usage and shard sizes. | boolean |
include_yes_decisions If true, returns YES decisions in explanation. | boolean |
master_timeout Period to wait for a connection to the master node. | type TypesDuration = string | "-1" | "0" |
Request Body
index?:
shard?: number;
primary?: boolean;
current_node?:
}
Responses
allocate_explanation?: string;
allocation_delay?:
allocation_delay_in_millis?:
can_allocate?:
can_move_to_other_node?:
can_rebalance_cluster?:
can_rebalance_cluster_decisions?:
can_rebalance_to_other_node?:
can_remain_decisions?:
can_remain_on_current_node?:
cluster_info?:
configured_delay?:
configured_delay_in_millis?:
current_node?:
current_state: string;
index:
move_explanation?: string;
node_allocation_decisions?:
primary: boolean;
rebalance_explanation?: string;
remaining_delay?:
remaining_delay_in_millis?:
shard: number;
unassigned_info?:
note?: string;
}