# Elasticsearch 'onReady'

**URL:** <https://discuss.elastic.co/t/elasticsearch-onready/17134>\
**Category:** Elasticsearch\
**Created:** [April 22, 2014, 8:27pm UTC](https://discuss.elastic.co/t/elasticsearch-onready/17134 "2014-04-22T20:27:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicktackes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicktackes/32/1174_2.png) [@nicktackes](https://discuss.elastic.co/u/nicktackes)\
**Post date:** [April 22, 2014, 8:27pm UTC](https://discuss.elastic.co/t/elasticsearch-onready/17134/1 "2014-04-22T20:27:31Z")

</div>

Hi,

I am using foreman to start numerous subsystems such as mongodb,  
elasticsearch, redis and node. With node, I am using the Elasticsearch.js  
client.  
I would like to be able to verify that elasticsearch is ready for use.  
Should I be doing something like a cluster health call like this?

```
        esClient.cluster.health({waitForStatus:'green'}, function(err){
            callback(err)
        })

```

what is the best way to verify that elasticsearch is ready for use and its  
indexes can be accessed?

thanks

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d35498ac-fffe-424d-b826-1dd8fad31c9e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d35498ac-fffe-424d-b826-1dd8fad31c9e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [April 22, 2014, 8:34pm UTC](https://discuss.elastic.co/t/elasticsearch-onready/17134/2 "2014-04-22T20:34:35Z")

</div>

On Tue, Apr 22, 2014 at 4:27 PM, Nick Tackes [ntackes@gmail.com](mailto:ntackes@gmail.com) wrote:

> Hi,
> 
> I am using foreman to start numerous subsystems such as mongodb,  
> elasticsearch, redis and node. With node, I am using the Elasticsearch.js  
> client.  
> I would like to be able to verify that elasticsearch is ready for use.  
> Should I be doing something like a cluster health call like this?
> 
> ```
> esClient.cluster.health({waitForStatus:'green'}, function(err){
> callback(err)
> })
> 
> ```
> 
> what is the best way to verify that elasticsearch is ready for use and its  
> indexes can be accessed?

Wait for green works. Its a really really common idiom.

Nik

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAPmjWd0Au9QoYd-\_FYapyjdpHeO2fHuu-zyAxgt2o5n2ACAVOA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAPmjWd0Au9QoYd-_FYapyjdpHeO2fHuu-zyAxgt2o5n2ACAVOA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 1:34am UTC](https://discuss.elastic.co/t/elasticsearch-onready/17134/3 "2017-07-06T01:34:14Z")

</div>


