Elasticsearch troubleshooting
· β 2 min read
Handling an Elasticsearch Index in the Red State GET _cat/shards?v=true&h=index,shard,prirep,state,node,unassigned.reason&s=state 1 2 ops-pod-loggie-2026.06.11 0 p UNASSIGNED NODE_LEFT ops-pod-loggie-2026.06.11 0 r UNASSIGNED ALLOCATION_FAILED Try to reallocate.
1 POST _cluster/reroute?retry_failed=true Or delete it outright.
1 DELETE ops-pod-loggie-2026.06.11 Scheduled Index Cleanup Keep all indexes for only 7 days.
Create an ILM policy 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 PUT _ilm/policy/ops-delete-after-7d { "policy": { "phases": { "hot": { "actions": {} }, "delete": { "min_age": "7d", "actions": { "delete": {} } } } } } Create an index template 1 2 3 4 5 6 7 8 9 10 PUT _index_template/ops-delete-after-7d { "index_patterns": ["*", "-.