Queries the information of all the nodes in an Elasticsearch cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

The GetLogs operation does not have operation-specific request headers and uses only common request headers. For more information, see Common request headers.

Request syntax

GET /openapi/instances/{InstanceId}/nodes HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
InstanceId String Path Yes es-cn-tl32cpgwa002l****

The ID of the instance.

extended Boolean Query No false

Specifies whether to return the monitoring information of the nodes in the cluster. Default value: no. Valid values:

  • true (default): returns
  • false

Response parameters

Parameter Type Example Description
RequestId String 0D71B597-F3FF-5B56-88D7-74F9D3F7****

The ID of the request.

Result Array of Result

The return results.

heapPercent String 21.6%

The Java Virtual Machine (JVM) heap memory usage of the node.

zoneId String cn-hangzhou-i

The zone ID of the node.

cpuPercent String 4.2%

The CPU utilization.

Note If the extended request parameter is set to true and the monitoring information of the nodes in the cluster is being synchronized, the value of the cpuPercent parameter is null. In this case, you need to send a request again after 10 seconds to obtain the value of the cpuPercent parameter.
host String 10.15.XX.XX

The IP address of the node.

nodeType String WORKER

The type of the nodes. Valid values:

  • MASTER: dedicated master node
  • WORKER: hot node
  • WORKER_WARM: warm node
  • COORDINATING: client node
  • KIBANA: Kibana node
diskUsedPercent String 1.0%

The disk usage.

port Integer 9200

The port that is used to connect to the node.

loadOneM String 0.12

The 1-minute load of the node.

health String GREEN

The health status of the node. Valid values: GREEN, YELLOW, RED, and GRAY.

Examples

Sample requests

GET /openapi/instances/es-cn-tl32cpgwa002l****/nodes HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json

Sample success responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Result" : [ {
    "nodeType" : "WORKER",
    "host" : "10.15.XX.XX",
    "port" : 9200,
    "zoneId" : "cn-hangzhou-i",
    "heapPercent" : "21.6%",
    "cpuPercent" : "4.2%",
    "loadOneM" : "0.12",
    "diskUsedPercent" : "1.0%",
    "health" : "GREEN"
  }, {
    "nodeType" : "WORKER",
    "host" : "10.15.XX.XX",
    "port" : 9200,
    "zoneId" : "cn-hangzhou-i",
    "heapPercent" : "23.3%",
    "cpuPercent" : "3.6%",
    "loadOneM" : "0.04",
    "diskUsedPercent" : "1.0%",
    "health" : "GREEN"
  }, {
    "nodeType" : "WORKER",
    "host" : "10.15.XX.XX",
    "port" : 9200,
    "zoneId" : "cn-hangzhou-i",
    "heapPercent" : "18.3%",
    "cpuPercent" : "2.7%",
    "loadOneM" : "0.08",
    "diskUsedPercent" : "1.0%",
    "health" : "GREEN"
  }, {
    "nodeType" : "KIBANA",
    "host" : "10.15.XX.XX",
    "port" : 5601,
    "zoneId" : "cn-hangzhou-i",
    "health" : "GREEN"
  } ],
  "RequestId" : "0D71B597-F3FF-5B56-88D7-74F9D3F7****"
}

Error codes

For a list of error codes, visit the API Error Center.

FAQ

Q: When the ListAllNode API is used, the returned results are incomplete. In some cases, no metrics such as diskUsedPercent, cpuPercent, and heapPercent are returned. What do I do?

A: Unlike the Elasticsearch Client API, OpenAPI cannot ensure that the status of all metrics of a cluster can be obtained in real time. For example, when the cluster load is high or unstable, some metric information cannot be returned. In this case, you can use the Elasticsearch Client API to obtain the metrics of the Elasticsearch cluster itself. For more information, see Access Alibaba Cloud Elasticsearch Elasticsearch through a client.