AI Hints
Home›Elasticsearch Tutorial›Shards, Health and Performance
Elasticsearch · Lesson 107 of 120

Health Colors

Green, yellow, red.

⏱ 2 min read▶ Video at 1:41:02🎓 Free
Watch this lesson in the Elasticsearch courseWatch on YouTube ↗Full Elasticsearch course

Every cluster has a health color. Green means everything is fine. Yellow means data is safe but some replicas are missing. Red means some primary data is unavailable.

  • Green
  • Yellow
  • Red

From yellow to green

With one replica on a one node cluster, health is yellow. We set replicas to zero. Run it. Now every shard is assigned, and health is green.

Dev Tools Consoletext
PUT logs?filter_path=acknowledged
{ "settings": { "number_of_shards": 1, "number_of_replicas": 1 } }

GET _cluster/health/logs?filter_path=status

PUT logs/_settings?filter_path=acknowledged
{ "number_of_replicas": 0 }

GET _cluster/health/logs?filter_path=status
Output
# PUT logs 200 OK
{"acknowledged": true}

# GET _cluster/health/logs 200 OK
{"status": "yellow"}

# PUT logs/_settings 200 OK
{"acknowledged": true}

# GET _cluster/health/logs 200 OK
{"status": "green"}

What to do

Green needs nothing. Yellow on a single node is normal, but in production, add nodes. Red needs action now, and allocation explain tells you why a shard isn't assigned.

ColorMeaningAction
Greenall shards assignednothing
Yellowreplicas missingadd nodes
Redprimary missingallocation/explain

Summary

Green is healthy, yellow is missing replicas, and red is missing primary data. Next, refresh and indexing speed.

Key takeaways
  • Green
  • Yellow
  • Red
Next up: Refresh and Performance — near real time