1. 程式人生 > >Elasticsearch叢集狀態檢視命令

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

 

help

每個命令都支援使用help引數,來輸出可以顯示的列:

$ curl localhost:9200/_cat/master?help

 

headers

通過h引數,可以指定輸出的欄位:

$ curl localhost:9200/_cat/master?v
$ curl localhost:9200/_cat/master?h=ip,node

 

數字型別的格式化

很多的命令都支援返回可讀性的大小數字,比如使用mb或者kb來表示。

$ curl localhost:9200/_cat/indices?v