Explain the shard allocations
- POST also GET /_cluster/allocation/explain
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_infoboolean · default: false If true, returns information about disk usage and shard sizes.
-
include_yes_decisionsboolean · default: false If true, returns YES decisions in explanation.
-
master_timeoutstring Duration · default: 30s Period to wait for a connection to the master node.
Request
-
current_nodestring -
Specifies the node ID or the name of the node to only explain a shard that is currently located on the specified node.
-
indexstring IndexName -
Specifies the name of the index that you would like an explanation for.
-
primaryboolean -
If true, returns explanation for the primary shard for the given shard ID.
-
shardnumber -
Specifies the ID of the shard that you would like an explanation for.
Response
-
allocate_explanationstring -
allocation_delaystring Duration -
allocation_delay_in_millisDurationValueUnitMillis -
can_allocateDecision -
Values:
yesnoworse_balancethrottledawaiting_infoallocation_delayedno_valid_shard_copyno_attempt -
can_move_to_other_nodeDecision -
Values:
yesnoworse_balancethrottledawaiting_infoallocation_delayedno_valid_shard_copyno_attempt -
can_rebalance_clusterDecision -
Values:
yesnoworse_balancethrottledawaiting_infoallocation_delayedno_valid_shard_copyno_attempt -
can_rebalance_cluster_decisionsAllocationDecision -
deciderstringrequired -
decisionAllocationExplainDecisionrequired -
Values:
NOYESTHROTTLEALWAYS -
explanationstringrequired -
can_rebalance_to_other_nodeDecision -
Values:
yesnoworse_balancethrottledawaiting_infoallocation_delayedno_valid_shard_copyno_attempt -
can_remain_decisionsAllocationDecision -
deciderstringrequired -
decisionAllocationExplainDecisionrequired -
Values:
NOYESTHROTTLEALWAYS -
explanationstringrequired -
can_remain_on_current_nodeDecision -
Values:
yesnoworse_balancethrottledawaiting_infoallocation_delayedno_valid_shard_copyno_attempt -
cluster_infoClusterInfo -
nodesmap string to NodeDiskUsagerequired -
<string>NodeDiskUsage -
node_namestring Namerequired -
least_availableDiskUsagerequired -
pathstringrequired -
total_bytesnumberrequired -
used_bytesnumberrequired -
free_bytesnumberrequired -
free_disk_percentnumberrequired -
used_disk_percentnumberrequired -
most_availableDiskUsagerequired -
pathstringrequired -
total_bytesnumberrequired -
used_bytesnumberrequired -
free_bytesnumberrequired -
free_disk_percentnumberrequired -
used_disk_percentnumberrequired -
shard_sizesmap string to numberrequired -
shard_data_set_sizesmap string to string -
shard_pathsmap string to stringrequired -
reserved_sizesReservedSizerequired -
configured_delaystring Duration -
configured_delay_in_millisDurationValueUnitMillis -
current_nodeCurrentNode -
idstring Idrequired -
namestring Namerequired -
rolesNodeRolesrequired -
Values:
masterdatadata_colddata_contentdata_frozendata_hotdata_warmclientingestmlvoting_onlytransformremote_cluster_clientcoordinating_only -
attributesmap string to stringrequired -
transport_addressstringrequired -
weight_rankingnumberrequired -
current_statestringrequired -
indexstring IndexNamerequired -
move_explanationstring -
node_allocation_decisionsNodeAllocationExplanation -
decidersAllocationDecision -
deciderstringrequired -
decisionAllocationExplainDecisionrequired -
Values:
NOYESTHROTTLEALWAYS -
explanationstringrequired -
node_attributesmap string to stringrequired -
node_decisionDecisionrequired -
Values:
yesnoworse_balancethrottledawaiting_infoallocation_delayedno_valid_shard_copyno_attempt -
node_idstring Idrequired -
node_namestring Namerequired -
rolesNodeRolesrequired -
Values:
masterdatadata_colddata_contentdata_frozendata_hotdata_warmclientingestmlvoting_onlytransformremote_cluster_clientcoordinating_only -
storeAllocationStore -
allocation_idstringrequired -
foundbooleanrequired -
in_syncbooleanrequired -
matching_size_in_bytesnumberrequired -
matching_sync_idbooleanrequired -
store_exceptionstringrequired -
transport_addressstringrequired -
weight_rankingnumber -
primarybooleanrequired -
rebalance_explanationstring -
remaining_delaystring Duration -
remaining_delay_in_millisDurationValueUnitMillis -
shardnumberrequired -
unassigned_infoUnassignedInformation -
atDateTimerequired -
last_allocation_statusstring -
reasonUnassignedInformationReasonrequired -
Values:
INDEX_CREATEDCLUSTER_RECOVEREDINDEX_REOPENEDDANGLING_INDEX_IMPORTEDNEW_INDEX_RESTOREDEXISTING_INDEX_RESTOREDREPLICA_ADDEDALLOCATION_FAILEDNODE_LEFTREROUTE_CANCELLEDREINITIALIZEDREALLOCATED_REPLICAPRIMARY_FAILEDFORCED_EMPTY_PRIMARYMANUAL_ALLOCATION -
detailsstring -
failed_allocation_attemptsnumber -
delayedboolean -
allocation_statusstring -
notestring