Find why a shard is unassigned
ElasticsearchMaintenanceCommand
GET /_cluster/allocation/explain
{
"index": "customer",
"shard": 0,
"primary": true
}What it does
Explains in detail why a specific shard could not be allocated (unassigned).
When to use it
When looking for the reason behind unassigned shards in a yellow/red cluster.
Caution
Read-only diagnostic command; no risk.