Skip to content

Instantly share code, notes, and snippets.

@atosdas
Created September 9, 2019 07:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atosdas/da07c0decce6784552aebd1e4e3b6ad2 to your computer and use it in GitHub Desktop.
Save atosdas/da07c0decce6784552aebd1e4e3b6ad2 to your computer and use it in GitHub Desktop.
Cluster health status
[root@ageu1m-cbs-elk-es-vm5 elasticsearch]# curl -XGET http://172.18.3.198:9200/_cluster/health?pretty
{
"cluster_name" : "lobster",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 6,
"number_of_data_nodes" : 6,
"active_primary_shards" : 8,
"active_shards" : 19,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
======
Stopped elasticsearch service in two of the VMs (vm2,vm3)
===
after stopping the service still cluster status is showing "green"
====
[root@ageu1m-cbs-elk-es-vm5 elasticsearch]# curl -XGET http://172.18.3.198:9200/_cluster/health?pretty
{
"cluster_name" : "lobster",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 4,
"number_of_data_nodes" : 4,
"active_primary_shards" : 8,
"active_shards" : 19,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
@atosdas
Copy link
Author

atosdas commented Sep 9, 2019

Cluster health status output before and after stopping the elasticsearch service

still the cluster health status is showing : green

Note : If I am stopping the service in any of the node the status must change to "Yellow" or "Red".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment