Loading...
Loading...
Diagnose a non-green Elasticsearch cluster and surface the single most likely cause with remediation. Use when an operator reports yellow or red status, unassigned shards, allocation failures, or wants read-only triage before deeper investigation. Teaches replica-vs-primary impact, allocation decider classification, and data-loss awareness.
npx skill4agent add elastic/agent-skills elasticsearch-cluster-healthelasticelasticGET /GET /_cat/indicesGET /{index}/_mappingGET /{index}/_settings/index.modePOST /_queryelasticGET /_cluster/healthstatusgreenyellowredunassigned_shardsinitializing_shardsrelocating_shardsinitializing_shards > 0unassigned_shards == 0GET /_cat/recoveryGET /_cluster/healthstatusGET /_cluster/health?level=indicesunassigned_shards.security.kibana*.fleet-*GET /_cat/shards/{index}?h=index,shard,prirep,state,unassigned.reasonprirep=pprirep=rstatusunassigned_shardsPOST /_cluster/allocation/explain{ "index": "<index>", "shard": <id>, "primary": <true|false> }primaryfalsetruecan_allocatenoyesthrottledno_valid_shard_copyunassigned_info.reasonNODE_LEFTINDEX_CREATEDcan_allocatenoallocate_explanationnode_allocation_decisions[].deciders[]decision: "NO"disk_thresholdfilterawarenessprimary: falseNODE_LEFTprimary: truecan_allocateno_valid_shard_copydecision: "NO"unassigned_info.reason| Signal | Cause class | Typical remediation (operator applies) |
|---|---|---|
| Disk high/low watermark exceeded | Free disk on the named node, add data-node capacity, or adjust |
| Allocation filtering or zone awareness | Add a node that satisfies |
| Transient recovery | Wait; monitor |
| No surviving shard copy | See step 5 — data loss scenario |
| Delayed allocation or cluster state catch-up | Check |
NODE_LEFTcluster.routing.allocation.disk.watermark.highdisk_thresholdexplanationnode_allocation_decisionsallocate_explanationes-node-2GET /_cat/allocationallocate_empty_primaryno_valid_shard_copycan_allocate: no_valid_shard_copyPOST /_cluster/rerouteallocate_empty_primaryallocate_empty_primaryunassigned_info.reason: NODE_LEFTnode_allocation_decisionsprimary: falseprimary: trueGET /_cat/allocationGET /_cat/recoverylogs-2025-07primary: falseunassigned_info.reason: NODE_LEFTdisk_thresholdes-node-2orders-2025primary: truecan_allocate: no_valid_shard_copylast_allocation_status: no_valid_shard_copyallocate_empty_primary| HTTP API (shorthand) | |
|---|---|
| |
| |
| |
| |
| |
| |
| |
| |