文章目录
转载请标明出处:
https://bigmaning.blog.csdn.net/article/details/113409008
本文出自:【BigManing的博客】
一、获取recovery统计信息
1、获取所有索引的recovery信息
http://local.elasticsearch:9200/_stats/recovery
2、获取指定索引的recovery信息
http://local.elasticsearch:9200/book/_stats/recovery
3、获取同类索引的recovery信息
log索引是按天滚动新增的,这样可以定义log-*
来查询所有log索引的统计信息
http://local.elasticsearch:9200/log-*/_stats/recovery
二、输出结果
{
"_shards": {
"total": 34,
"successful": 34,
"failed": 0
},
"_all": {
"primaries": {
"recovery": {
// 作为源分片,正在执行恢复的分片数量
"current_as_source": 0,
// 作为目标分片,正在执行恢复的分片数量
"current_as_target": 0,
// 恢复过程总等待时间
"throttle_time_in_millis": 36
}
},
"total": {
"recovery": {
"current_as_source": 0,
"current_as_target": 0,
"throttle_time_in_millis": 36
}
}
},
"indices": {
"book-20210206": {
"uuid": "06hsdygt9ZXT1T245L_4uiw",
"primaries": {
"recovery": {
"current_as_source": 0,
"current_as_target": 0,
"throttle_time_in_millis": 0
}
},
"total": {
"recovery": {
"current_as_source": 0,
"current_as_target": 0,
"throttle_time_in_millis": 0
}
}
},
...
}
}
三、结果详情
1、_shards
分片信息:总数、成功返回数、失败返回数
2、_all
全局维度统计详情
-
primaries
:主分片上的统计信息 -
total
: 所有分片(主分片+副本分片)上的统计信息
3、indices
索引维度统计详情