Elasticsearch Learning Notes (i) Cat API

Source: Internet
Author: User
Tags aliases

One, cat general parameters

Verbose GET/_cat/xxx/?v Turn on verbose output
help GET/_cat/xxx/?help output Available columns
Headers GET /_cat/xxx/?h=column1,column2 specify columns for output
Sort GET /_cat/xxx/?v&s=column1,column2:desc,column3 sort the columns of the specified output by default in ascending order
Format GET /_cat/xxx?format=json Specifies the data format returned by the response: text (default), Json,yaml,smile,cbor (by setting Higher priority for the Multimedia format of the HTTP header of the Accept )

Second, Cat command

in the output cluster
Aliases GET/_cat/xxx/aliases?v GET/_cat/aliases/alias1,aliase2,aliase3 querying the current configuration index, filters, routes aliases If you need to specify one or more aliases, separate them with commas
allocation GET/_cat/allocation?v Query the number of shards (shard) allocated on each node and the hard disk capacity used by each shard (shard)
Count get /_cat/count?v quickly query the current entire cluster or the number of document (s) for the specified index (excluding deleted document that has not been cleaned out)
Fielddata GET/_cat/fielddata?v GET/_cat/fielddata?v&fields=xxx GET/_cat/fielddata/field1,field2,field3?v query heap memory used by Fileddata in each node in the cluster Specify Fields specify more than one field
Health GET/_cat/health?v GET/_cat/health?v&ts=false Querying health information for the current cluster (same as/_cluster/health)TS is used to control whether time stamps are displayed (timestamp)1. Common use is to monitor the health value between nodes2. Use this command to track the time of large cluster recovery  /_cat/health; sleep ; done. Green:the primary shard and replica shard for each index are active statesYellow:The primary shard for each index is active, but some replica shard are not active, in an unusable stateRed:Not all indexes primary shard are active, some indexes have data loss
indices get /_cat/indices/index1?v query For information about the specified index index1 (the number of Shard that comprise an index, the number of document, the number of doc deleted, the main memory size, and the total storage size for all indexes (including replicas)        the number of document and the number of deleted document are lucense levels, including the number of hidden document       to get the exact number of document Elasticsearch levels, you can use the cat count or the Count API
Master GET/_cat/master?v only used to display the node ID of master, bound IP Address, node name
Nodeattrs GET/_cat/nodeattrs?v output displays custom node properties
nodes get/_cat/nodes?vget/_cat/nodes?v&full_id=false Output the topology of the current cluster (including information about where the current node resides and the entire cluster, etc.)
full_id (true/false) is used to format the ID field to display the full length of the ID or shorthand
Pending tasks get/_cat/pending_tasks?v output the tasks being performed in the cluster (cluster-level changes such as: Create INDEX, update mapping, assign, or fail shard) with/_cluster/pending_tasks
plugins get/_cat/plugins?v output plug-in information for each node that is running
recovery get/_cat/recovery?v Provides a view of information about index shards recovering or having completed recovery recovery event actions can occur in a cluster where an index shard is moved from one node to another node. Can occur during snapshot recovery, a replication level change, node failure, or node startup. A node-initiated recovery operation is also called local storage recovery (The Shard is loaded from the hard disk when a node is started)
repositories get/_cat/repositories?v Register the snapshot repository
thread pool get/_cat/thread_pool output thread pool statistics for each node cluster range, returning active, queued, and denied statistics by default
shards get/_cat/shards
GET/_cat/shards/twitt*
segments get/_cat/segments?v
GET/_cat/segments/index1,index1
snapshots get/_cat/snapshots/repo1?v output snapshot information belonging to the specified warehouse (snapshots)
Each snapshot information includes information that it was started and stopped.
Templates GET/_cat/templates?vget/_cat/templates/templatename1get/_cat/templates/template* Outputs the information for the specified template that is currently present in the template information output


Official API Document: Https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html#intro

Elasticsearch Learning Notes (i) Cat API

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.