Elasticsearch provides a convenient way in which to manage the cluster state, and this is one of the first things to check if any problems do occur.
Controlling the cluster health using an API
Getting ready
You will need an up-and-running Elasticsearch installation—similar to the one that we described in the Downloading and installing Elasticsearch recipe in Chapter 1, Getting Started.
To execute the commands, any HTTP client can be used, such as Curl (https://curl.haxx.se/) or Postman (https://www.getpostman.com/). You can use the Kibana console as it provides code completion and better character escaping for Elasticsearch.