Saturday, 21 November 2015

Elasticsearch: Get Cluster health at index level

Cluster health api takes level parameter, By using this we can get cluster health at index level.

GET _cluster/health?level=indices
Response like below.

{
   "cluster_name": "cluster_sample",
   "status": "yellow",
   "timed_out": false,
   "number_of_nodes": 1,
   "number_of_data_nodes": 1,
   "active_primary_shards": 6,
   "active_shards": 6,
   "relocating_shards": 0,
   "initializing_shards": 0,
   "unassigned_shards": 6,
   "indices": {
      "books": {
         "status": "yellow",
         "number_of_shards": 5,
         "number_of_replicas": 1,
         "active_primary_shards": 5,
         "active_shards": 5,
         "relocating_shards": 0,
         "initializing_shards": 0,
         "unassigned_shards": 5
      },
      ".marvel-2015.01.07": {
         "status": "yellow",
         "number_of_shards": 1,
         "number_of_replicas": 1,
         "active_primary_shards": 1,
         "active_shards": 1,
         "relocating_shards": 0,
         "initializing_shards": 0,
         "unassigned_shards": 1
      }
   }
}



Prevoius                                                 Next                                                 Home

No comments:

Post a Comment