You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Elasticsearch 5.6.16如何获取单个索引的健康状态?

获取Elasticsearch 5.6.16单个索引的健康状态方法

Elasticsearch 5.6.16原生支持获取单个索引的健康状态,以下是两种可行的方法:

1. 使用_cluster/health API指定索引

_cluster/health API支持在请求路径中直接指定目标索引,返回该索引专属的健康数据:

curl -XGET 'http://localhost:9200/_cluster/health/your_index_name?pretty'

返回结果包含该索引的status(green/yellow/red)、分片数、副本数等核心健康指标,不会混入其他索引的数据。

2. 使用_cat/indices API筛选单个索引

如果需要更简洁的可视化输出,可以用_cat/indices API,指定索引名称后查看health列:

curl -XGET 'http://localhost:9200/_cat/indices/your_index_name?v'

该请求会返回带表头的格式化数据,其中health字段即为目标索引的健康状态,同时还能查看索引大小、文档数量等附加信息。

注意:_cat/health API本身不支持指定单个索引,因此上述两种方法是该版本下获取单索引健康状态的最优方案。

内容的提问来源于stack exchange,提问作者DareToDead

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 12:45:42