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.批量索引 ...
随机推荐
- 用go封装一下二级认证功能
用go封装一下二级认证 本篇为用go设计开发一个自己的轻量级登录库/框架吧 - 秋玻 - 博客园 (cnblogs.com)的二级认证业务篇,会讲讲二级认证业务的实现,给库/框架增加新的功能. 源码: ...
- [SUCTF 2019]CheckIn 1
看到字符upload 就想到了文件上传漏洞 就先上传一个一句话木马试试 似乎直接上传不成功,可能是有什么过滤 再上传一个包含一句话木马的图片试试 发现提示不能是图片,这时候就不会了,在网上找了一下wp ...
- java实现朴素rpc
五层协议中,RPC在第几层? 五层协议 应用层 传输层 网络层 链路层 物理层 我不知道,我要去大气层! 远程过程调用(RPC),比较朴素的说法就是,从某台机器调用另一台机器的一段代码,并获取返回结果 ...
- windows平板的开发和选型
今天谈一个老话题,windows系统的选型和开发.问题的起因是我们一个客户说,用安卓平板不安全,苹果系统不考虑,于是他们要用自认为安全的WIN7系统. 提到WINDOWS平台下的的平板系统,此事说来话 ...
- PHP-FFMpeg 操作音视频
目录 安装PHP-FFMpeg 视频中提取一张图片 视频中提取多张图片 调整视频大小 视频添加水印 生成音频波形 音频转换 给音频添加元数据 拼接多个音视频 截取音视频 提取 gif 动图 裁剪视频 ...
- 虹科案例 | Redis企业版数据库帮助金融机构满足客户需求
如今,传统银行与新兴银行正在进行激烈的竞争.随着苹果.亚马逊.谷歌等科技巨头正凭借其数字化.移动应用程序和云体验打入金融服务行业.为了进行公平竞争,传统银行也需要通过个性化的全渠道客户体验来实现交互式 ...
- 将.View.dll文件反编译出来的*Views*.cs文件转换成.cshtml
先使用反编译工具将.View.dll文件反编译放入文件夹,然后将文件夹整体复制进\src\viewcs2cshtml\viewcs2cshtml\bin\Debug\net6.0\viewcs 复制完 ...
- java 创建对象的5种方式
1.创建对象的5种方式 1.通过 new 关键字 这是最常用的一种方式,通过 new 关键字调用类的有参或无参构造方法来创建对象.比如 Object obj = new Object(); 2.通过 ...
- Idea单窗口导入多个项目模块
现在我们比较流行微服务,但是服务一旦多了,项目打开也是很麻烦的,运行内存16个G的电脑,基本上打开4,5个项目模块就顶不住了.那么,我们怎么把多个项目导入到一个idea窗口中呢? 实现效果 导入步骤 ...
- 服务器没有开放3306端口 远程访问MySQL数据库方法
一.前言 当装有MySQL的服务器为了防止数据库被黑,提高安全性,把3306端口禁止掉,禁止对外访问,我之前写过一篇是借助跳板机的SSH隧道来访问实现安全,这种情况依然需要开放3306端口和使用一 ...