cat API

官方地址

GET /_cat/XXX?v GET /_cat/XXX?v&format=json

v 是指带着列信息
支持指定返回内容的格式 默认为text
?format=text(json/smile/yaml/cbor)

查看节点别名

GET /_cat/aliases?v curl -X GET “192.168.xxx.xxx:9200/_cat/aliases?v”

每个节点分配了几个shard,对磁盘的占用空间大小,使用率

GET /_cat/allocation?v curl -X GET “192.168.xxx.xxx:9200/_cat/allocation?v”

群集或单个索引的document计数

GET /_cat/count?v curl -X GET “192.168.xxx.xxx:9200/_cat/count?v GET /_cat/count/index_name?v curl -X GET “192.168.xxx.xxx:9200/_cat/count/index_name?v”

显示集群中每个数据节点上fielddata当前正在使用的堆内存量

GET /_cat/fielddata?v curl -X GET “192.168.xxx.xxx:9200/_cat/fielddata?v”

查看集群健康情况

GET /_cat/health?v curl -X GET “192.168.xxx.xxx:9200/_cat/health?v”

查看索引的信息

GET _cat/indices?v GET _cat/indices/index_name?v curl -X GET “192.168.xxx.xxx:9200/_cat/indices/twi*?v&s=index”

查看master信息

GET /_cat/master?v curl -X GET “192.168.xxx.xxx:9200/_cat/master?v”

查看node信息

GET /_cat/nodes?v curl -X GET “192.168.xxx.xxx:9200/_cat/nodes?v”

当前pending没执行完的task的具体情况,执行的是什么操作

创建索引,更新映射,分配或失败分片的列表 GET /_cat/pending_tasks?v curl -X GET “192.168.xxx.xxx:9200/_cat/pending_tasks?v”

查看安装的插件

GET /_cat/plugins?v&s=component&h=name,component,version,description curl -X GET “192.168.xxx.xxx:9200/_cat/plugins?v&s=component&h=name,component,version,description”

shard recovery恢复的过程情况

GET /_cat/recovery?v curl -X GET “192.168.xxx.xxx:9200/_cat/recovery?v”

查看在群集中注册的快照存储库

GET /_cat/repositories?v curl -X GET “192.168.xxx.xxx:9200/_cat/repositories?v

查看线程池使用

GET /_cat/thread_pool curl -X GET “192.168.xxx.xxx:9200/_cat/thread_pool”

查看shard情况

GET _cat/shards?v GET _cat/shards/index_name?v curl -X GET “192.168.xxx.xxx:9200/_cat/shards/index_name?v

索引segment文件的情况,在哪个node上,有多少个document,占用了多少磁盘空间,有多少数据在内存中,是否可以搜索

GET /_cat/segments?v GET _cat/segments/index_name?v curl -X GET “192.168.xxx.xxx:9200/_cat/segments/index_name?v

查看tempalte

GET /_cat/templates?v&s=name curl -X GET “192.168.xxx.xxx:9200/_cat/templates?v&s=name”