Elasticsearch 'onReady'


(nicktackes) #1

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/d35498ac-fffe-424d-b826-1dd8fad31c9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Nik Everett) #2

On Tue, Apr 22, 2014 at 4:27 PM, Nick Tackes 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAPmjWd0Au9QoYd-_FYapyjdpHeO2fHuu-zyAxgt2o5n2ACAVOA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(system) #3