前言
本文基于elasticsearch7.3.0版本
Cat命令
aliases
显示别名,过滤器,路由信息
GET _cat/aliases?v
alias index filter routing.index routing.search is_write_index
goods_order goods_order_2020-01-25 - - - -
返回字段 | 原文 | 含义 |
---|---|---|
alias | alias name | 别名 |
index | index alias points to | 索引别名指向 |
filter | filter | 过滤器 |
routing.index | index routing | 索引路由 |
routing.search | search routing | 搜索路由 |
is_write_index | write index | 写索引 |
allocation
显示每个节点分片数量、占用空间
GET _cat/allocation?v
shards disk.indices disk.used disk.avail disk.total disk.percent host ip node
70 431.6mb 8.9gb 130.2gb 139.2gb 6 10.61.149.206 10.61.149.206 10.61.149.206
70 442mb 9gb 130.1gb 139.2gb 6 10.61.149.199 10.61.149.199 10.61.149.199
返回字段 | 原文 | 含义 |
---|---|---|
shards | number of shards on node | 节点承载的分片数量 |
disk.indices | disk used by ES indices | 索引占用的空间大小 |
disk.used | disk used (total, not just ES) | 节点所在机器已使用的磁盘空间大下 |
disk.avail | disk available | 节点可用空间大小 |
disk.total | total capacity of all volumes | 节点总空间大小 |
disk.percent | percent disk used | 节点磁盘占用百分比 |
host | host of node | 节点host |
ip | ip of node | 节点ip |
node | name of node | 节点名称 |
count
显示索引文档的数量
GET _cat/count?v
epoch timestamp count
1585051390 12:03:10 2815367
返回字段 | 原文 | 含义 |
---|---|---|
epoch | seconds since 1970-01-01 00:00:00 | 自标准时间(1970-01-01 00:00:00)以来的秒数 |
timestamp | time in HH:MM:SS | 时分秒,utc时区 |
count | the document count | 文档总数 |
health
查看集群健康状况
GET _cat/health?v
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1585051499 12:04:59 order-common green 2 2 140 136 0 0 0 0 - 100.0%
返回字段 | 原文 | 含义 |
---|---|---|
epoch | seconds since 1970-01-01 00:00:00 | 自标准时间(1970-01-01 00:00:00)以来的秒数 |
timestamp | time in HH:MM:SS | 时分秒,utc时区 |
cluster | cluster name | 集群名称 |
status | health status | 集群状态 |
node.total | total number of nodes | 节点总数 |
node.data | number of nodes that can store data | 数据节点总数 |
shards | total number of shards | 分片总数 |
pri | number of primary shards | 主分片总数 |
relo | number of relocating nodes | 复制节点总数 |
init | number of initializing nodes | 初始化节点总数 |
unassign | number of unassigned shards | 未分配分片总数 |
pending_tasks | number of pending |