查看集群的健康状态 curl -XGET http://192.168.1.93:9200/_cat/health?v 查询所有的节点 curl -XGET http://192.168.1.93:9200/_cat/nodes?v 查询所有的索引 curl -XGET http://192.168.1.93:9200/_cat/indices?v 统计es索引信息下的文档数量
curl -XGET 'http://192.168.1.93:9200/_cat/count'
统计某个索引信息下的文档数量
curl -XGET 'http://192.168.1.93:9200/_cat/count/api-core-2015.12.31' 查看某一类索引 curl -XGET 'http://192.168.1.93:9200/_cat/indices/api-core-*?pretty' 查看某个索引的健康状态 curl -s http://192.168.1.93:9200/_cat/indices/IndexName?h=status 查看所有关闭的索引 curl -XGET http://192.168.1.93:9200/_cat/indices | awk '$1=="close"' 打开某个关闭的索引 curl -X POST "192.168.1.93:9200/api-core-2019.08.16/_open?pretty" 删除某个索引 curl -XDELETE 'http://192.168.1.93:9200/api-core-2019.08.11' 删除某类索引 curl -XDELETE 'http://192.168.1.93:9200/api-core-*'
查看某个索引的健康状态
查看所有关闭的索引
打开某个关闭的索引
查看某一类索引
查看集群的健康状态
每个命令都支持使用?v参数,来显示详细的信息
/_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}