What are cluster health states in Elasticsearch and what causes each?
Answer
Elasticsearch reports cluster health as green, yellow, or red. Green means all primary and replica shards are allocated and active — the cluster is fully operational. Yellow means all primary shards are allocated (data is safe, all search and indexing works), but one or more replica shards are unallocated — typically because you have a single-node cluster and replicas cannot be placed on the same node as their primary. Red means one or more primary shards are unallocated — the cluster is missing data and those shards cannot be searched or written to. Red status triggers immediately when a node goes down before its primary shards' replicas can be promoted. Use GET /_cluster/health?level=shards to identify which specific shards are problematic.
Previous
What is dynamic mapping templates in Elasticsearch?
Next
What is hot-warm-cold architecture in Elasticsearch?
More Elasticsearch Questions
View all →- Advanced What is hot-warm-cold architecture in Elasticsearch?
- Advanced What is Index Lifecycle Management (ILM) in Elasticsearch?
- Advanced What is Cross-Cluster Replication (CCR) and Cross-Cluster Search (CCS)?
- Advanced How do script_score and function_score work for custom relevance?
- Advanced What are Elasticsearch hardware tuning best practices?