How to get the number of data nodes for an Elasticsearch cluster

Original photo by Anastasia Taioglou on Unsplash.

Let’s say that we want to get the number of data nodes for an Elasticsearch cluster.

How can we do that with an API?

There are other ways you may be able to check this, like in code in Terraform or in an AWS console. You may be able to see it in something like Kibana that shows all the data nodes.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tremaine Eto

Tremaine Eto

Senior Software Engineer @ Iterable | Previously worked at DIRECTV, AT&T, and Tinder | UCLA Computer Science alumni | Follow me for software engineering tips!