Monitoring segments with the segment API
Monitoring the index segments means monitoring the health of an index. It contains information about the number of segments and the data that is stored in them.
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.
In order 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.
To correctly execute the following commands, you will need an index that is populated with the ch04/populate_kibana.sh
commands. These are available in the online code.
How to do it...
To get information about index segments, we will perform the following steps:
- To retrieve the index segments, the HTTP method...