ElasticSearch常用操作命令彙總

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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章