# Elasticsearch cluster health is "status": "yellow"

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-health-is-status-yellow/111171>\
**Category:** Elasticsearch\
**Created:** [December 11, 2017, 8:26pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-is-status-yellow/111171 "2017-12-11T20:26:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [December 11, 2017, 8:26pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-is-status-yellow/111171/1 "2017-12-11T20:26:40Z")

</div>

I have elasticsearch 6.x cluster and I just noticed that status is yellow

> GET \_cluster/health

```
{
  "cluster_name": "X",
  "status": "yellow",
  "timed_out": false,
  "number_of_nodes": 5,
  "number_of_data_nodes": 5,
  "active_primary_shards": 1911,
  "active_shards": 3824,
  "relocating_shards": 0,
  "initializing_shards": 0,
  "unassigned_shards": 1,
  "delayed_unassigned_shards": 0,
  "number_of_pending_tasks": 0,
  "number_of_in_flight_fetch": 0,
  "task_max_waiting_in_queue_millis": 0,
  "active_shards_percent_as_number": 99.97385620915033
}

```

How does one troubleshoot? How can I make it green again?

Please advise.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 11, 2017, 8:46pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-is-status-yellow/111171/2 "2017-12-11T20:46:16Z")

</div>

You probably need to wait until all shards are recovered.

BUT you probably have too many shards per node. You should reduce that number.

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [December 11, 2017, 8:50pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-is-status-yellow/111171/3 "2017-12-11T20:50:58Z")

</div>

I did noticed that one of nodes was down and I restart it and even though I'm not seeing any "Shard Activity", cluster health still says yellow(

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 11, 2017, 10:08pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-is-status-yellow/111171/4 "2017-12-11T22:08:15Z")

</div>

What are the pending tasks? [https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cat-pending-tasks.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cat-pending-tasks.html)

Can you run explain and paste the results here? [https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cluster-allocation-explain.html#\_explain\_api\_request](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cluster-allocation-explain.html#_explain_api_request)

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [December 11, 2017, 10:19pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-is-status-yellow/111171/5 "2017-12-11T22:19:46Z")

</div>

@dadoonet

[cat pending tasks | Elasticsearch Reference [6.0] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cat-pending-tasks.html)

```
# curl --silent --request GET --header 'Content-Type: application/json' $ELASTICSEARCH_URI/_cat/pending_tasks?v
insertOrder timeInQueue priority source
# 

```

[Cluster Allocation Explain API | Elasticsearch Reference [6.0] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/cluster-allocation-explain.html#cluster-allocation-explain)

```
# curl --silent --request GET --header 'Content-Type: application/json' $ELASTICSEARCH_URI/_cluster/health/explain?pretty
{
  "cluster_name" : "X",
  "status" : "red",
  "timed_out" : true,
  "number_of_nodes" : 5,
  "number_of_data_nodes" : 5,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}
# 

```

this time it said "red", but I'm looking in Kibana and it says yellow

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [December 12, 2017, 8:57pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-is-status-yellow/111171/6 "2017-12-12T20:57:18Z")

</div>

possibly related to: [Kibana Monitoring App reports Elasticsearch as Version: 6.0.0 instead of 6.0.1 - X-Pack - Discuss the Elastic Stack](https://discuss.elastic.co/t/kibana-monitoring-app-reports-elasticsearch-as-version-6-0-0-instead-of-6-0-1/111186)

as I restarted one of the nodes that was 6.0.0, now all nodes are on 6.0.1 and there are no `unassigned_shards` anymore, and status back to GREEN!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [January 9, 2018, 8:57pm UTC](https://discuss.elastic.co/t/elasticsearch-cluster-health-is-status-yellow/111171/7 "2018-01-09T20:57:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
