Elasticsearch查看索引情况 cat indices

x33g5p2x  于2021-03-14 发布在 ElasticSearch  
字(1.1k)|赞(0)|评价(0)|浏览(1689)

原文链接 : https://www.elastic.co/guide/en/elasticsearch/reference/5.0/cat-indices.html

译文链接 : http://www.apache.wiki/display/Elasticsearch/cat+indices

贡献者 : [那伊抹微笑]

indices 命令提供了每一个索引的 cross-section(横截面)。这些信息跨越了多个节点。

% curl 'localhost:9200/_cat/indices/twi*?v'
health status index    pri rep docs.count docs.deleted store.size pri.store.size
green  open   twitter    5   1      11434            0       64mb           32mb
green  open   twitter2   2   0       2030            0      5.8mb          5.8mb

我们可以很快的知道一个索引的分片数量,Lucene 级别的文档数量,包括隐藏的文档(例如,嵌套的类型),已删除的文档,主存储的大小,和总存储大小(包括副本在内的所有分片)。这些暴漏的 metric(度量)直接来自 Lucene API

Primaries

默认情况下,索引的统计信息将显示它们所有的索引分片,包括副本。提供一个 pri 标记可以只查看 primaries context 中的相关统计信息。

示例

哪些索引是 yellow

% curl localhost:9200/_cat/indices?health=yellow
yellow open  wiki     2 1  6401 1115 151.4mb 151.4mb
yellow open  twitter  5 1 11434    0    32mb    32mb

什么索引使用的硬盘空间最大(不包括副本)?

% curl 'localhost:9200/_cat/indices?bytes=b' | sort -rnk8
green open  wiki     2 0  6401 1115 158843725 158843725
green open  twitter  5 1 11434    0  67155614  33577857
green open  twitter2 2 0  2030    0   6125085   6125085

wiki 索引的分片中有多少合并操作已完成?

% curl 'localhost:9200/_cat/indices/wiki?pri&v&h=health,index,pri,rep,docs.count,mt'
health index docs.count mt pri.mt
green  wiki        9646 16     16

每一个索引使用了多少内存?

% curl 'localhost:9200/_cat/indices?v&h=i,tm'
i     tm
wiki  8.1gb
test  30.5kb
user  1.9mb

相关文章

微信公众号

最新文章

更多