Provides explanations for shard allocations in the cluster Added in 5.0.0
Query parameters
-
include_disk_info boolean
If true, returns information about disk usage and shard sizes.
-
include_yes_decisions boolean
If true, returns YES decisions in explanation.
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
-
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.
GET /_cluster/allocation/explain
curl \
-X GET http://api.example.com/_cluster/allocation/explain \
-H "Content-Type: application/json" \
-d '"{\n \"index\": \"my-index-000001\",\n \"shard\": 0,\n \"primary\": false,\n \"current_node\": \"my-node\"\n}"'
Request example
{
"index": "my-index-000001",
"shard": 0,
"primary": false,
"current_node": "my-node"
}
Response examples (200)
{
"allocate_explanation": "string",
"allocation_delay": "string",
"": 42.0,
"can_allocate": "yes",
"can_move_to_other_node": "yes",
"can_rebalance_cluster": "yes",
"can_rebalance_cluster_decisions": [
{
"decider": "string",
"decision": "NO",
"explanation": "string"
}
],
"can_rebalance_to_other_node": "yes",
"can_remain_decisions": [
{
"decider": "string",
"decision": "NO",
"explanation": "string"
}
],
"can_remain_on_current_node": "yes",
"cluster_info": {
"nodes": {
"additionalProperty1": {
"node_name": "string",
"least_available": {
"path": "string",
"total_bytes": 42.0,
"used_bytes": 42.0,
"free_bytes": 42.0,
"free_disk_percent": 42.0,
"used_disk_percent": 42.0
},
"most_available": {
"path": "string",
"total_bytes": 42.0,
"used_bytes": 42.0,
"free_bytes": 42.0,
"free_disk_percent": 42.0,
"used_disk_percent": 42.0
}
},
"additionalProperty2": {
"node_name": "string",
"least_available": {
"path": "string",
"total_bytes": 42.0,
"used_bytes": 42.0,
"free_bytes": 42.0,
"free_disk_percent": 42.0,
"used_disk_percent": 42.0
},
"most_available": {
"path": "string",
"total_bytes": 42.0,
"used_bytes": 42.0,
"free_bytes": 42.0,
"free_disk_percent": 42.0,
"used_disk_percent": 42.0
}
}
},
"shard_sizes": {
"additionalProperty1": 42.0,
"additionalProperty2": 42.0
},
"shard_data_set_sizes": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"shard_paths": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"reserved_sizes": [
{
"node_id": "string",
"path": "string",
"total": 42.0,
"shards": [
"string"
]
}
]
},
"configured_delay": "string",
"current_node": {
"id": "string",
"name": "string",
"roles": [
"master"
],
"attributes": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"transport_address": "string",
"weight_ranking": 42.0
},
"current_state": "string",
"index": "string",
"move_explanation": "string",
"node_allocation_decisions": [
{
"deciders": [
{
"decider": "string",
"decision": "NO",
"explanation": "string"
}
],
"node_attributes": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"node_decision": "yes",
"node_id": "string",
"node_name": "string",
"roles": [
"master"
],
"store": {
"allocation_id": "string",
"found": true,
"in_sync": true,
"matching_size_in_bytes": 42.0,
"matching_sync_id": true,
"store_exception": "string"
},
"transport_address": "string",
"weight_ranking": 42.0
}
],
"primary": true,
"rebalance_explanation": "string",
"remaining_delay": "string",
"shard": 42.0,
"unassigned_info": {
"": "string",
"last_allocation_status": "string",
"reason": "INDEX_CREATED",
"details": "string",
"failed_allocation_attempts": 42.0,
"delayed": true,
"allocation_status": "string"
},
"note": "string"
}