curl命令操作ElasticSearch

_cat系列提供了一系列查询elasticsearch集群状态的接口。你可以通过执行 curl -XGET localhost:9200/_cat 命令,获取所有_cat系列的操作,可以在下列命令后加上?v格式化输出,也可以加上?help查看命令相关信息。结果如下:

[root@C20-23U-10 ~]# curl -XGET 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}

猜你喜欢

转载自www.cnblogs.com/feiqiangsheng/p/10962097.html