If your Alibaba Cloud Elasticsearch cluster becomes abnormal, you can use the commands provided in this topic for troubleshooting.

Note You can run the commands provided in this topic in the Kibana console. For more information, see Log on to the Kibana console.

Cluster

Command Description
GET /_cat/health?v Queries the health status of a cluster. A cluster can be in the green, red, or yellow state. For information about these states, see View the health status of an Elasticsearch cluster.
GET /_cluster/health?pretty=true Queries the health status of a cluster. pretty=true indicates that the command output will be formatted. You can also add other query parameters. Examples:
  • level=indices: indicates that the command output will include index status.
  • level=shards: indicates that the command output will include shard status.
GET /_cluster/stats Queries the system information of a cluster, such as CPU utilization and JVM heap memory usage.
GET /_cluster/state Queries the details of a cluster, such as the nodes and shards in the cluster.
GET /_cluster/pending_tasks Queries the pending tasks of a cluster.
GET /_cluster/settings Queries the settings of a cluster.

Node

Command Description
GET /_cat/master?v Queries the information of dedicated master nodes in a cluster.
GET /_cat/nodes?v Queries the information of each node in a cluster, such as CPU utilization, JVM heap memory usage, and load status.
GET /_cat/nodeattrs?v Queries the custom attributes of a single node.
GET /_nodes/stats?pretty=true Queries the status of a node.
GET /_nodes/process Queries processes on a node.
GET /_nodes/hot_threads Queries tasks that are handled by threads with high consumption.
GET /_nodes/<nodeip>/jvm,process,os Queries the JVM heap memory usage, processes, and operating system information of a specific node.
GET _cat/plugins?v Queries plug-ins on each node.
GET /_cat/thread_pool?v Queries the information of thread pools for each node, such as the thread pool type, number of active threads, and size of the task queue.

Shard

Command Description
GET /_cat/shards?v Queries the details of each shard in a cluster, such as the index name, shard number, shard type (primary shard or replica shard), shard status, number of documents, and disk space used by the shard. If a shard allocation failure occurs, the command output also includes the reason for the failure. You can also specify an index to view the preceding information of the index. Example: GET _cat/shards/<index>?v.
GET /_cat/allocation?v Queries shard allocation on each node in a cluster.
GET /_cat/recovery?v Queries the recovery of each shard in a cluster.

Segment

GET /_cat/segments?v

Queries the information of segments in each index of a cluster, such as the segment name, shard to which the segment belongs, memory or disk space used by the segment, and whether a flush is performed. You can also specify an index to view the preceding information of the index. Example: GET _cat/segment/<index>?v.

Index

Command Description
GET /_cat/indices?v Queries the details of all indexes in a cluster, such as the index health status, number of primary shards, number of replica shards, and number of documents. You can also specify an index to view the preceding information of the index. Example: GET _cat/indices/<index>?v.
GET /_cat/aliases?v Queries the information of all index aliases of a cluster, such as the index name and routing configurations.

Mapping

Command Description
GET /_mapping Queries the mappings of all indexes in a cluster.
GET /<index>/<type>/_mapping Queries the mapping of a specific index.

Document

Command Description
GET /_cat/count?v Queries the number of documents in a cluster. You can also specify an index to view the preceding information of the index. Example: GET _cat/count/<index>?v.
GET /<index>/<type>/<id> Queries data in documents.

Snapshot

Command Description
GET _snapshot/_all Queries all snapshots.
GET _snapshot/<snapshot_name>/_status Queries the status of a specific snapshot.