The _cat parameter allows you to see some information about the cluster, such as whether the cluster is healthy, what nodes it has, and what the index is.
Detecting Cluster Health
Curl Localhost:9200/_cat/health?v Description:
is a file transfer tool that works under the command line using URL syntax
Access the port number of the cluster, which can be modified. Changes are generally not recommended through configuration file changes
Prefix _ is a habit of URL parameters
Through? v Displays the meaning of each column below the response information that is returned:
Epoch Timestamp cluster status node.total node.data shards pri relo init unassign
1417844762 21:46:02 elasticsearch Yellow 1 1 10 10 0 0 10
- Response Information Description
Cluster: Displays the name of the cluster
Status: The health status of the cluster, generally: green (all normal, cluster function sound), yellow (all data available, some replication is not assigned), red (some data is not available, the cluster is partially usable)
Node.total: Number of nodes
Node.data: Number of nodes that store data
Shards: Number of shards, by default, 5 shards per index, and one copy at a time
List all nodes of the cluster
Curl Localhost:9200/_cat/nodes?v Response Information
Host IP heap.percent ram.percent load node.role Master Name
Hadoop 192.168.205.134 6 0.01 d * Adri Nital
List all the indexes
Curl Localhost:9200/_cat/indices?v Response Information
Health status Index PRI rep docs.count docs.deleted Store.size pri.store.size
Yellow Open Bank 5 1 947 423.8kb 423.8kb
Yellow Open Test_index 5 1 3 0 9.3kb 9.3kb
View information that _cat allows to view
By command: Curl localhost:9200/_cat/can list what the _cat parameter allows to see, and here's the information:
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/indices
/_cat/indices/{index}
/_cat/segments
/_cat/segments/{index}
/_cat/count
/_cat/count/{index}
/_cat/recovery
/_cat/recovery/{index}
/_cat/health
/_cat/pending_tasks
/_cat/aliases
/_cat/aliases/{alias}
/_cat/thread_pool
/_cat/plugins
/_cat/fielddata
/_cat/fielddata/{fields}
Elasticsearch Study notes-02 cluster-related operations _cat parameters