ElasticSearch叢集狀態檢視命令大全 && 刨根問底 | Elasticsearch 5.X叢集多節點角色配置深入詳解
阿新 • • 發佈:2018-11-26
https://blog.csdn.net/pilihaotian/article/details/52460747
Elasticsearch中資訊很多,同時ES也有很多資訊檢視命令,可以幫助開發者快速查詢Elasticsearch的相關資訊。
- _cat
$ curl localhost:9200/_cat
=^.^=
/_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}
/_cat/nodeattrs
/_cat/repositories
/_cat/snapshots/{repository}
- verbose
每個命令都支援使用?v引數,來顯示詳細的資訊:
$ curl localhost:9200/_cat/master?v
id host ip node
yBet3cYzQbC68FRzLZDmFg 127.0 .0.1 127.0.0.1 lihao
- help
每個命令都支援使用help引數,來輸出可以顯示的列:
$ curl localhost:9200/_cat/master?help
id | | node id
host | h | host name
ip | | ip address
node | n | node name
- headers
通過h引數,可以指定輸出的欄位:
$ curl localhost:9200/_cat/master?v
id host ip node
yBet3cYzQbC68FRzLZDmFg 127.0 .0.1 127.0.0.1 lihao
$ curl localhost:9200/_cat/master?h=ip,node
127.0.0.1 lihao
- 數字型別的格式化
很多的命令都支援返回可讀性的大小數字,比如使用mb或者kb來表示。
$ curl localhost:9200/_cat/indices?v
health status index pri rep docs.count docs.deleted store.size pri.store.size
yellow open aaa 5 1 2 0 7.2kb 7.2kb
yellow open logstash-eos-2016.09.01 5 1 297 0 202.3kb 202.3kb
yellow open bank 5 1 1001 1 451.6kb 451.6kb
yellow open website 5 1 2 0 7.8kb 7.8kb
yellow open .kibana 1 1 5 1 26.6kb 26.6kb
yellow open logstash-eos-2016.09.02 5 1 11 0 33.9kb 33.9kb
yellow open test-2016.09.01 5 1 1 0 3.9kb 3.9kb
yellow open testst_index 5 1 0 0 795b 795b
刨根問底 | Elasticsearch 5.X叢集多節點角色配置深入詳解
https://blog.csdn.net/laoyang360/article/details/78290484