ElasticSearch之Index stats API
获取指定索引的统计数据。
获取指定索引的全部统计数据,命令样例如下:
curl -X GET "https://localhost:9200/testindex_001/_stats?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
执行结果的样例,如下:
{
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
},
"_all" : {
"primaries" : {
"docs" : {
"count" : 0,
"deleted" : 0
},
"shard_stats" : {
"total_count" : 1
},
"store" : {
"size_in_bytes" : 249,
"total_data_set_size_in_bytes" : 249,
"reserved_in_bytes" : 0
},
"indexing" : {
"index_total" : 0,
"index_time_in_millis" : 0,
"index_current" : 0,
"index_failed" : 0,
"delete_total" : 0,
"delete_time_in_millis" : 0,
"delete_current" : 0,
"noop_update_total" : 0,
"is_throttled" : false,
"throttle_time_in_millis" : 0,
"write_load" : 0.0
},
"get" : {
"total" : 0,
"time_in_millis" : 0,
"exists_total" : 0,
"exists_time_in_millis" : 0,
"missing_total" : 0,
"missing_time_in_millis" : 0,
"current" : 0
},
"search" : {
"open_contexts" : 0,
"query_total" : 0,
"query_time_in_millis" : 0,
"query_current" : 0,
"fetch_total" : 0,
"fetch_time_in_millis" : 0,
"fetch_current" : 0,
"scroll_total" : 0,
"scroll_time_in_millis" : 0,
"scroll_current" : 0,
"suggest_total" : 0,
"suggest_time_in_millis" : 0,
"suggest_current" : 0
},
"merges" : {
"current" : 0,
"current_docs" : 0,
"current_size_in_bytes" : 0,
"total" : 0,
"total_time_in_millis" : 0,
"total_docs" : 0,
"total_size_in_bytes" : 0,
"total_stopped_time_in_millis" : 0,
"total_throttled_time_in_millis" : 0,
"total_auto_throttle_in_bytes" : 20971520
},
"refresh" : {
"total" : 8,
"total_time_in_millis" : 50,
"external_total" : 5,
"external_total_time_in_millis" : 52,
"listeners" : 0
},
"flush" : {
"total" : 1,
"periodic" : 1,
"total_time_in_millis" : 174
},
"warmer" : {
"current" : 0,
"total" : 4,
"total_time_in_millis" : 1
},
"query_cache" : {
"memory_size_in_bytes" : 0,
"total_count" : 0,
"hit_count" : 0,
"miss_count" : 0,
"cache_size" : 0,
"cache_count" : 0,
"evictions" : 0
},
"fielddata" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"global_ordinals" : {
"build_time_in_millis" : 0
}
},
"completion" : {
"size_in_bytes" : 0
},
"segments" : {
"count" : 0,
"memory_in_bytes" : 0,
"terms_memory_in_bytes" : 0,
"stored_fields_memory_in_bytes" : 0,
"term_vectors_memory_in_bytes" : 0,
"norms_memory_in_bytes" : 0,
"points_memory_in_bytes" : 0,
"doc_values_memory_in_bytes" : 0,
"index_writer_memory_in_bytes" : 0,
"version_map_memory_in_bytes" : 0,
"fixed_bit_set_memory_in_bytes" : 0,
"max_unsafe_auto_id_timestamp" : -1,
"file_sizes" : { }
},
"translog" : {
"operations" : 0,
"size_in_bytes" : 55,
"uncommitted_operations" : 0,
"uncommitted_size_in_bytes" : 55,
"earliest_last_modified_age" : 26213582
},
"request_cache" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"hit_count" : 0,
"miss_count" : 0
},
"recovery" : {
"current_as_source" : 0,
"current_as_target" : 0,
"throttle_time_in_millis" : 0
},
"bulk" : {
"total_operations" : 0,
"total_time_in_millis" : 0,
"total_size_in_bytes" : 0,
"avg_time_in_millis" : 0,
"avg_size_in_bytes" : 0
},
"dense_vector" : {
"value_count" : 0
}
},
"total" : {
"docs" : {
"count" : 0,
"deleted" : 0
},
"shard_stats" : {
"total_count" : 1
},
"store" : {
"size_in_bytes" : 249,
"total_data_set_size_in_bytes" : 249,
"reserved_in_bytes" : 0
},
"indexing" : {
"index_total" : 0,
"index_time_in_millis" : 0,
"index_current" : 0,
"index_failed" : 0,
"delete_total" : 0,
"delete_time_in_millis" : 0,
"delete_current" : 0,
"noop_update_total" : 0,
"is_throttled" : false,
"throttle_time_in_millis" : 0,
"write_load" : 0.0
},
"get" : {
"total" : 0,
"time_in_millis" : 0,
"exists_total" : 0,
"exists_time_in_millis" : 0,
"missing_total" : 0,
"missing_time_in_millis" : 0,
"current" : 0
},
"search" : {
"open_contexts" : 0,
"query_total" : 0,
"query_time_in_millis" : 0,
"query_current" : 0,
"fetch_total" : 0,
"fetch_time_in_millis" : 0,
"fetch_current" : 0,
"scroll_total" : 0,
"scroll_time_in_millis" : 0,
"scroll_current" : 0,
"suggest_total" : 0,
"suggest_time_in_millis" : 0,
"suggest_current" : 0
},
"merges" : {
"current" : 0,
"current_docs" : 0,
"current_size_in_bytes" : 0,
"total" : 0,
"total_time_in_millis" : 0,
"total_docs" : 0,
"total_size_in_bytes" : 0,
"total_stopped_time_in_millis" : 0,
"total_throttled_time_in_millis" : 0,
"total_auto_throttle_in_bytes" : 20971520
},
"refresh" : {
"total" : 8,
"total_time_in_millis" : 50,
"external_total" : 5,
"external_total_time_in_millis" : 52,
"listeners" : 0
},
"flush" : {
"total" : 1,
"periodic" : 1,
"total_time_in_millis" : 174
},
"warmer" : {
"current" : 0,
"total" : 4,
"total_time_in_millis" : 1
},
"query_cache" : {
"memory_size_in_bytes" : 0,
"total_count" : 0,
"hit_count" : 0,
"miss_count" : 0,
"cache_size" : 0,
"cache_count" : 0,
"evictions" : 0
},
"fielddata" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"global_ordinals" : {
"build_time_in_millis" : 0
}
},
"completion" : {
"size_in_bytes" : 0
},
"segments" : {
"count" : 0,
"memory_in_bytes" : 0,
"terms_memory_in_bytes" : 0,
"stored_fields_memory_in_bytes" : 0,
"term_vectors_memory_in_bytes" : 0,
"norms_memory_in_bytes" : 0,
"points_memory_in_bytes" : 0,
"doc_values_memory_in_bytes" : 0,
"index_writer_memory_in_bytes" : 0,
"version_map_memory_in_bytes" : 0,
"fixed_bit_set_memory_in_bytes" : 0,
"max_unsafe_auto_id_timestamp" : -1,
"file_sizes" : { }
},
"translog" : {
"operations" : 0,
"size_in_bytes" : 55,
"uncommitted_operations" : 0,
"uncommitted_size_in_bytes" : 55,
"earliest_last_modified_age" : 26213582
},
"request_cache" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"hit_count" : 0,
"miss_count" : 0
},
"recovery" : {
"current_as_source" : 0,
"current_as_target" : 0,
"throttle_time_in_millis" : 0
},
"bulk" : {
"total_operations" : 0,
"total_time_in_millis" : 0,
"total_size_in_bytes" : 0,
"avg_time_in_millis" : 0,
"avg_size_in_bytes" : 0
},
"dense_vector" : {
"value_count" : 0
}
}
},
"indices" : {
"testindex_001" : {
"uuid" : "7iGJRFfxRd2jD3qP-KDRmQ",
"health" : "yellow",
"status" : "open",
"primaries" : {
"docs" : {
"count" : 0,
"deleted" : 0
},
"shard_stats" : {
"total_count" : 1
},
"store" : {
"size_in_bytes" : 249,
"total_data_set_size_in_bytes" : 249,
"reserved_in_bytes" : 0
},
"indexing" : {
"index_total" : 0,
"index_time_in_millis" : 0,
"index_current" : 0,
"index_failed" : 0,
"delete_total" : 0,
"delete_time_in_millis" : 0,
"delete_current" : 0,
"noop_update_total" : 0,
"is_throttled" : false,
"throttle_time_in_millis" : 0,
"write_load" : 0.0
},
"get" : {
"total" : 0,
"time_in_millis" : 0,
"exists_total" : 0,
"exists_time_in_millis" : 0,
"missing_total" : 0,
"missing_time_in_millis" : 0,
"current" : 0
},
"search" : {
"open_contexts" : 0,
"query_total" : 0,
"query_time_in_millis" : 0,
"query_current" : 0,
"fetch_total" : 0,
"fetch_time_in_millis" : 0,
"fetch_current" : 0,
"scroll_total" : 0,
"scroll_time_in_millis" : 0,
"scroll_current" : 0,
"suggest_total" : 0,
"suggest_time_in_millis" : 0,
"suggest_current" : 0
},
"merges" : {
"current" : 0,
"current_docs" : 0,
"current_size_in_bytes" : 0,
"total" : 0,
"total_time_in_millis" : 0,
"total_docs" : 0,
"total_size_in_bytes" : 0,
"total_stopped_time_in_millis" : 0,
"total_throttled_time_in_millis" : 0,
"total_auto_throttle_in_bytes" : 20971520
},
"refresh" : {
"total" : 8,
"total_time_in_millis" : 50,
"external_total" : 5,
"external_total_time_in_millis" : 52,
"listeners" : 0
},
"flush" : {
"total" : 1,
"periodic" : 1,
"total_time_in_millis" : 174
},
"warmer" : {
"current" : 0,
"total" : 4,
"total_time_in_millis" : 1
},
"query_cache" : {
"memory_size_in_bytes" : 0,
"total_count" : 0,
"hit_count" : 0,
"miss_count" : 0,
"cache_size" : 0,
"cache_count" : 0,
"evictions" : 0
},
"fielddata" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"global_ordinals" : {
"build_time_in_millis" : 0
}
},
"completion" : {
"size_in_bytes" : 0
},
"segments" : {
"count" : 0,
"memory_in_bytes" : 0,
"terms_memory_in_bytes" : 0,
"stored_fields_memory_in_bytes" : 0,
"term_vectors_memory_in_bytes" : 0,
"norms_memory_in_bytes" : 0,
"points_memory_in_bytes" : 0,
"doc_values_memory_in_bytes" : 0,
"index_writer_memory_in_bytes" : 0,
"version_map_memory_in_bytes" : 0,
"fixed_bit_set_memory_in_bytes" : 0,
"max_unsafe_auto_id_timestamp" : -1,
"file_sizes" : { }
},
"translog" : {
"operations" : 0,
"size_in_bytes" : 55,
"uncommitted_operations" : 0,
"uncommitted_size_in_bytes" : 55,
"earliest_last_modified_age" : 26213582
},
"request_cache" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"hit_count" : 0,
"miss_count" : 0
},
"recovery" : {
"current_as_source" : 0,
"current_as_target" : 0,
"throttle_time_in_millis" : 0
},
"bulk" : {
"total_operations" : 0,
"total_time_in_millis" : 0,
"total_size_in_bytes" : 0,
"avg_time_in_millis" : 0,
"avg_size_in_bytes" : 0
},
"dense_vector" : {
"value_count" : 0
}
},
"total" : {
"docs" : {
"count" : 0,
"deleted" : 0
},
"shard_stats" : {
"total_count" : 1
},
"store" : {
"size_in_bytes" : 249,
"total_data_set_size_in_bytes" : 249,
"reserved_in_bytes" : 0
},
"indexing" : {
"index_total" : 0,
"index_time_in_millis" : 0,
"index_current" : 0,
"index_failed" : 0,
"delete_total" : 0,
"delete_time_in_millis" : 0,
"delete_current" : 0,
"noop_update_total" : 0,
"is_throttled" : false,
"throttle_time_in_millis" : 0,
"write_load" : 0.0
},
"get" : {
"total" : 0,
"time_in_millis" : 0,
"exists_total" : 0,
"exists_time_in_millis" : 0,
"missing_total" : 0,
"missing_time_in_millis" : 0,
"current" : 0
},
"search" : {
"open_contexts" : 0,
"query_total" : 0,
"query_time_in_millis" : 0,
"query_current" : 0,
"fetch_total" : 0,
"fetch_time_in_millis" : 0,
"fetch_current" : 0,
"scroll_total" : 0,
"scroll_time_in_millis" : 0,
"scroll_current" : 0,
"suggest_total" : 0,
"suggest_time_in_millis" : 0,
"suggest_current" : 0
},
"merges" : {
"current" : 0,
"current_docs" : 0,
"current_size_in_bytes" : 0,
"total" : 0,
"total_time_in_millis" : 0,
"total_docs" : 0,
"total_size_in_bytes" : 0,
"total_stopped_time_in_millis" : 0,
"total_throttled_time_in_millis" : 0,
"total_auto_throttle_in_bytes" : 20971520
},
"refresh" : {
"total" : 8,
"total_time_in_millis" : 50,
"external_total" : 5,
"external_total_time_in_millis" : 52,
"listeners" : 0
},
"flush" : {
"total" : 1,
"periodic" : 1,
"total_time_in_millis" : 174
},
"warmer" : {
"current" : 0,
"total" : 4,
"total_time_in_millis" : 1
},
"query_cache" : {
"memory_size_in_bytes" : 0,
"total_count" : 0,
"hit_count" : 0,
"miss_count" : 0,
"cache_size" : 0,
"cache_count" : 0,
"evictions" : 0
},
"fielddata" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"global_ordinals" : {
"build_time_in_millis" : 0
}
},
"completion" : {
"size_in_bytes" : 0
},
"segments" : {
"count" : 0,
"memory_in_bytes" : 0,
"terms_memory_in_bytes" : 0,
"stored_fields_memory_in_bytes" : 0,
"term_vectors_memory_in_bytes" : 0,
"norms_memory_in_bytes" : 0,
"points_memory_in_bytes" : 0,
"doc_values_memory_in_bytes" : 0,
"index_writer_memory_in_bytes" : 0,
"version_map_memory_in_bytes" : 0,
"fixed_bit_set_memory_in_bytes" : 0,
"max_unsafe_auto_id_timestamp" : -1,
"file_sizes" : { }
},
"translog" : {
"operations" : 0,
"size_in_bytes" : 55,
"uncommitted_operations" : 0,
"uncommitted_size_in_bytes" : 55,
"earliest_last_modified_age" : 26213582
},
"request_cache" : {
"memory_size_in_bytes" : 0,
"evictions" : 0,
"hit_count" : 0,
"miss_count" : 0
},
"recovery" : {
"current_as_source" : 0,
"current_as_target" : 0,
"throttle_time_in_millis" : 0
},
"bulk" : {
"total_operations" : 0,
"total_time_in_millis" : 0,
"total_size_in_bytes" : 0,
"avg_time_in_millis" : 0,
"avg_size_in_bytes" : 0
},
"dense_vector" : {
"value_count" : 0
}
}
}
}
}
获取指定索引的指定指标的统计数据,命令样例如下:
curl -X GET "https://localhost:9200/testindex_001/_stats/completion?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
执行结果的样例,如下:
{
"_shards" : {
"total" : 2,
"successful" : 1,
"failed" : 0
},
"_all" : {
"primaries" : {
"completion" : {
"size_in_bytes" : 0
}
},
"total" : {
"completion" : {
"size_in_bytes" : 0
}
}
},
"indices" : {
"testindex_001" : {
"uuid" : "7iGJRFfxRd2jD3qP-KDRmQ",
"health" : "yellow",
"status" : "open",
"primaries" : {
"completion" : {
"size_in_bytes" : 0
}
},
"total" : {
"completion" : {
"size_in_bytes" : 0
}
}
}
}
}
允许指定的指标,如下:
_all,默认值,即全部指标,无需显式指定。completiondocsfielddataflushgetindexingmergequery_cacherefreshrequest_cachesearchsegmentsstoretranslog
方法参数
level,指标的统计级别,可选值:
- cluster
- indices
- shards
相关资料
- Index stats API
- Suggesters
- Refresh API
- Text type family
- Flush API
- Index API
- Merge
- Refresh API
- Shard request cache settings
- Translog
ElasticSearch之Index stats API的更多相关文章
- elasticsearch中常用的API
elasticsearch中常用的API分类如下: 文档API: 提供对文档的增删改查操作 搜索API: 提供对文档进行某个字段的查询 索引API: 提供对索引进行操作,查看索引信息等 查看API: ...
- Elasticsearch 单模式下API的增删改查操作
<pre name="code" class="html">Elasticsearch 单模式下API的增删改查操作 http://192.168. ...
- Elasticsearch Java Rest Client API 整理总结 (二) —— SearchAPI
目录 引言 Search APIs Search API Search Request 可选参数 使用 SearchSourceBuilder 构建查询条件 指定排序 高亮请求 聚合请求 建议请求 R ...
- ElasticSearch入门-搜索(java api)
ElasticSearch入门-搜索(java api) package com.qlyd.searchhelper; import java.util.Map; import net.sf.json ...
- Elasticsearch Java Rest Client API 整理总结 (三)——Building Queries
目录 上篇回顾 Building Queries 匹配所有的查询 全文查询 Full Text Queries 什么是全文查询? Match 全文查询 API 列表 基于词项的查询 Term Term ...
- 使用curator 来管理elasticsearch的index
这里我们参考官网安装curator https://www.cookiesinn.org/elasticsearch_curator_delete_indices/ https://www.elast ...
- Atitit.index manager api design 索引管理api设计
Atitit.index manager api design 索引管理api设计 1. kw 1 1.1. 索引类型 unique,normal,fulltxt 1 1.2. 聚集索引(cluste ...
- Atitit.index manager api design 索引管理api设计
Atitit.index manager api design 索引管理api设计 1. kw1 1.1. 索引类型 unique,normal,fulltxt1 1.2. 聚集索引(clustere ...
- elasticsearch 第四篇(API约定)
对多个indices进行操作 es中大多resetapi支持请求多个index, 例如”test1,test2,test3”,index也可以使用通配符, 例如”test*“, 还可以使用+,-来包含 ...
- Elasticsearch批处理操作——bulk API
Elasticsearch提供的批量处理功能,是通过使用_bulk API实现的.这个功能之所以重要,在于它提供了非常高效的机制来尽可能快的完成多个操作,与此同时使用尽可能少的网络往返. 1.批量索引 ...
随机推荐
- 【解惑】孜孜不倦,用足球赛程详解c#中的yield return用法
在一个知名企业赞助的足球联赛中,有256支球队参赛.为了确保比赛的顺利进行,企业指派了小悦负责熬夜加班制定每一个球队的赛程.尽管她对足球的了解并不多,但是她对待工作的认真态度却让人钦佩. 在小悦的努力 ...
- NebulaGraph实战:3-信息抽取构建知识图谱
自动信息抽取发展了几十年,虽然模型很多,但是泛化能力很难用满意来形容,直到LLM的诞生.虽然最终信息抽取质量部分还是需要专家审核,但是已经极大的提高了信息抽取的效率.因为传统方法需要大量时间来完成 ...
- SharedPreferences-PreferenceUtils
SharedPreferences easy use import android.content.Context; import android.content.SharedPreference ...
- LVGL双向链表学习笔记
LVGL双向链表学习笔记 1.LVGL链表数据类型分析 对于LVGL双向链表的使用,我们需要关注lv_ll.h和lv_ll.c两个文件,其中lv_ll.h里面包含了链表结构类型定义,以及相关API的声 ...
- 深入理解 python 虚拟机:GIL 源码分析——天使还是魔鬼?
深入理解 python 虚拟机:GIL 源码分析--天使还是魔鬼? 在目前的 CPython 当中一直有一个臭名昭著的问题就是 GIL (Global Interpreter Lock ),就是全局解 ...
- 用go封装和实现扫码登录
用go封装和实现扫码登录 本篇为用go设计开发一个自己的轻量级登录库/框架吧 - 秋玻 - 博客园 (cnblogs.com)的扫码登录业务篇,会讲讲扫码登录的实现,给库/框架增加新的功能,最后说明使 ...
- 6.使用leetcode去练习语言
目录 1 本章预览 2 简单题举例 2.1 题目描述 2.2 题目解析 2.3 题解 2.4 涉及基础语法 3 中等题举例 3.1 题目描述 3.2 题目解析 3.3 题解 3.4 涉及基础语法 4 ...
- vscode双击没反应,后台也看不到进程的解决方案
百度找的解决方案: cmd窗口执行 netsh winsock reset 重置命令. 删除Romaing下的Code文件夹 修改Code/User/locale.json(我没找到这个文件)中的&q ...
- P1119 floyd
最开始看错数据了没看到Q = 100 是50%的数据以为跑q遍floyd能过,结果只有30,其他全t 1.要注意题目中的条件,挖掘一些性质 2.本题的另一个关键的是要对floyd的过程原理比较熟悉,f ...
- `.NET Web`新人入门必学项目`EarthChat`
.NET Web新人入门必学项目EarthChat EarthChat是一个基于.NET 7的实战项目,EarthChat提供了很多的最佳实践,EarthChat的目标也是成为一个很多人都喜欢的大型聊 ...