Elasticsearch 常用命令
状态查询
获取所有 _cat 系列的操作
curl http://localhost:9200/_cat
=^.^=
/_cat/allocation
/_cat/shards
/_cat/shards/{index}
/_cat/master
/_cat/nodes
/_cat/tasks
/_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/thread_pool/{thread_pools}
/_cat/plugins
/_cat/fielddata
/_cat/fielddata/{fields}
/_cat/nodeattrs
/_cat/repositories
/_cat/snapshots/{repository}
/_cat/templates集群状态
curl -X GET "localhost:9200/_cluster/health?pretty"节点状态
- 节点简要信息
curl -X GET "localhost:9200/_cat/nodes?pretty&v"
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
172.25.64.5 38 97 6 0.18 0.14 0.56 cdfhilmrstw - es02
172.25.64.3 54 97 6 0.18 0.14 0.56 cdfhilmrstw - es03
172.25.64.2 52 97 6 0.18 0.14 0.56 cdfhilmrstw * es01- 节点详细信息
curl -X GET "localhost:9200/_nodes/stats/http?pretty"后面的 http 是查看的属性,另外还有 indices, fs, http, jvm, os, process, thread_pool, discovery 等,支持组合(如 indices,fs,http)