Saturday 21 November 2015

How to know cluster name in elastic search?

By using cluster health API, you can get the cluster name.

Method: GET
URL : http://localhost:9200/_cluster/health?pretty=true


Response like below.
{
       "cluster_name": "elasticsearch",
       "status": "red",
       "timed_out": false,
       "number_of_nodes": 1,
       "number_of_data_nodes": 1,
       "active_primary_shards": 57,
       "active_shards": 57,
       "relocating_shards": 0,
       "initializing_shards": 0,
       "unassigned_shards": 83
    }


Prevoius                                                 Next                                                 Home

No comments:

Post a Comment