Using the hot threads API
Sometimes, your cluster will slow down due to high levels of CPU usage, and you will need to understand why. Elasticsearch provides the ability to monitor hot threads in order to be able to understand where the problem is.
In Java, hot threads are threads that use a lot of CPU and take a long time to execute.
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.
How to do it...
To get the task information, we will perform the following steps:
- To retrieve the node information, the HTTP method that we use is
GET
, and thecurl
command is as follows...