es查询所欲_Elasticsearch(es)查看集群所有索引情况

本文介绍了如何使用Elasticsearch的Cat API来查看集群中所有索引的状态,包括健康状态、索引名称、文档数量等关键信息,并提供了通过curl命令和Kibana Dev Tools执行的方法。此外,还解释了返回结果中各项指标的含义。
摘要由CSDN通过智能技术生成

Elasticsearch(es)查看集群所有索引情况可以使用 cat API 查看。

命令

可以在终端执行 curl 命令或在 es 工具上执行 get 请求(如 kibana 的 dev tools)。

终端命令

curl -XGET 'localhost:9200/_cat/indices?v&pretty'

Kibana Dev Tools 上执行

GET _cat/indices?v&pretty

返回信息如下:

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size

green open qa jCHwgQn0QX2tM2dA9dJi8w 8 2 211572 53 3.3gb 1.1gb

......

返回信息的第一行对应的每一列字段意义如下:

health

当前健康状态

status

开启/关闭(open/close)状态

index

索引名称

uuid

索引 uuid

pri

主分片数目

rep

副本分片数目

docs.count

可用的文档数目

docs.deleted

已删除的文档数目

store.size

主分片和副本分片的存储文档空间大小

pri.store.size

主分片的存储文档空间大小

关于列字段的更多内容,也可以通过增加 help 参数进行查看。

GET _cat/indices?help

输出如下:

health | h | current health status

status | s | open/close status

index | i,idx | index name

uuid | id,uuid | index uuid

pri | p,shards.primary,shardsPrimary | number of primary shards

rep | r,shards.replica,shardsReplica | number of replica shards

docs.count | dc,docsCount | available docs

docs.deleted | dd,docsDeleted | deleted docs

creation.date | cd | index creation date (millisecond value)

creation.date.string | cds | index creation date (as string)

store.size | ss,storeSize | store size of primaries & replicas

pri.store.size | | store size of primaries

completion.size | cs,completionSize | size of completion

pri.completion.size | | size of completion

fielddata.memory_size | fm,fielddataMemory | used fielddata cache

pri.fieldda

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值