You can get
cluster health by using cluster health API.
GET _cluster/health
GET _cluster/health
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 }
"cluster_name":
"cluster_sample"
Cluster name
represents name of the cluster, here my cluster name is "cluster_sample".
"status": "yellow"
Status is
green/yellow/red
Status
|
description
|
green
|
All
primary and replica shards are ready and your cluster is fully operational.
|
yellow
|
All
primary shards are ready, some (or) all replica shards are not ready.
|
red
|
Some (or)
all primary shards are not ready
|
"number_of_data_nodes": 1
Represents
number of data nodes, currently it is 1.
"active_primary_shards": 6
Represents
number of active primary shard in your cluster.
"active_shards": 6
It is sum of
total primary and replica shards.
"relocating_shards": 0
Number of
shards that are moving from one node to another.
"initializing_shards": 0
Number of
shards that are freshly created.
"unassigned_shards": 6
unassigned
shards are actually unassigned replicas of your actual shards from the master
node.
No comments:
Post a Comment