Skip to content

HOWTO check nodes list and nodes status in an elasticsearch cluster

Why do that

In case of non-nominal cluster status, or after an incident, you may want - To check that all nodes are taking part to the elasticsearch cluster (some may be left out of the cluster, therefore meaning unused resources) - To check that each of this node reports

Prerequisites

  • Have access to an administration server together with the allowed access to elasticsearch load-balancer administration network (typically you must be allowed to login on the PunchPlatform administration servers)
  • have the tool available on that administration server
  • know the fully qualified name of the elasticsearch load balancer servers administration address (this is recorded in your punchplatform.properties elasticsearch section)

What to do

To know the nodes participating in the cluster, together with their key metrics

From the command line of the administration server, type:

curl http://mysocldb0ap:8081/es_search/elasticsearch/_cat/nodes?pretty

The output will look like :

host        ip             heap.percent   ram.percent   load  node.role  master  name        
essearch01  192.168.13.3   35             25            0.27  d          *       Handy Lookout
essearch03  192.168.13.5   38             23            0.19  d                  Fey Singer
essearch02  102.168.13.4   35             27            0.25  d                  Happy Countryman

If some of the nodes declared in your punchplatform.properties elasticsearch section for this cluster do not appear in the command output, this could mean that :

  • the missing nodes are down
  • the missing nodes is in that the error condition (check the corresponding elasticsearch service status and the associated logs)
  • the missing nodes are isolated from the rest of the cluster nodes because of a networking failure

More information

Refer to Elasticsearch CAT for the complete documentation for the web API.