Elasticsearch-Cat命令详解

前言

本文基于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
  • 7
    点赞
  • 40
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值