elasticsearch

How to check Elasticsearch cluster health?


I tried to check it via

curl -XGET 'http://localhost:9200/_cluster/health'

but nothing happened. Seems it's waiting for something. The console did not come back. Had to kill it with CTRL+C.

I also tried to check for existing indices via

curl -XGET 'http://localhost:9200/_cat/indices?v'

Same behavior as above.


Solution

  • To check on elasticsearch cluster health you need to use

    curl localhost:9200/_cat/health
    

    More on the cat APIs here.

    I usually use elasticsearch-head plugin to visualize that.

    You can find it's github project here.

    It's easy to install sudo $ES_HOME/bin/plugin -i mobz/elasticsearch-head and then you can open localhost:9200/_plugin/head/ in your web brower.

    You should have something that looks like this :

    enter image description here