# Cluster health vs indices health

**URL:** https://discuss.elastic.co/t/cluster-health-vs-indices-health/173202
**Category:** Elasticsearch
**Created:** [March 20, 2019, 6:03pm UTC](https://discuss.elastic.co/t/cluster-health-vs-indices-health/173202 "2019-03-20T18:03:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ninad\_Pradhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ninad_pradhan/32/33548_2.png) [@Ninad\_Pradhan](https://discuss.elastic.co/u/Ninad_Pradhan)
#### Post date: [March 20, 2019, 6:03pm UTC](https://discuss.elastic.co/t/cluster-health-vs-indices-health/173202/1 "2019-03-20T18:03:46Z")

</div>

We have an IOT project in an embedded system environment where we have limited linux box and resources, so we our application and elasticsearch on the same 3 machine cluster. Now it can happen the linux machines can bounce and when that happens we want to wait for elasticsearch to be up and running, the systemctl reports elasticsearch is up, the cluster health reports green, but  
since the all indices are not yet green, our app crashes.

How is it that the cluster health report green using  
[http://localhost:9200/\_cluster/health](http://localhost:9200/_cluster/health)  
while some of the indices below are still red  
[http://localhost:9200/\_cat/indices?h=h](http://localhost:9200/_cat/indices?h=h)

Is there a command to make sure elasticsearch is up and ready to use?  
I assumed if cluster health reports green, then applications should safely be able to use elasticsearch, certainly thats not the case.

---

<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: [March 20, 2019, 6:20pm UTC](https://discuss.elastic.co/t/cluster-health-vs-indices-health/173202/2 "2019-03-20T18:20:20Z")

</div>

I don't think that can happen. If one of the indices is RED or YELLOW the cluster has then the same "color".

Could you share the output of each response?  
And also the result of `GET /`?

---

<div class="post-metadata">

### Author: ![Ninad\_Pradhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ninad_pradhan/32/33548_2.png) [@Ninad\_Pradhan](https://discuss.elastic.co/u/Ninad_Pradhan)
#### Post date: [March 20, 2019, 6:41pm UTC](https://discuss.elastic.co/t/cluster-health-vs-indices-health/173202/3 "2019-03-20T18:41:05Z")

</div>

You are right, this works, I had an issue with this and had switched if master was active  
[http://localhost:9200/\_cluster/state/master\_node](http://localhost:9200/_cluster/state/master_node),

Anyways the status works like you said.  
Thanks for the quick response.

---

<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: [April 17, 2019, 6:41pm UTC](https://discuss.elastic.co/t/cluster-health-vs-indices-health/173202/4 "2019-04-17T18:41:13Z")

</div>

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