ElasticSearch之Health API
查看当前集群全部健康指标的信息,执行如下命令:
curl -X GET "https://localhost:9200/_health_report?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
执行结果输出如下:
{
"status" : "green",
"cluster_name" : "elasticsearch",
"indicators" : {
"master_is_stable" : {
"status" : "green",
"symptom" : "The cluster has a stable master node",
"details" : {
"current_master" : {
"node_id" : "aKgBu7LgS9a6iPYH8n2JPw",
"name" : "jackie-ubuntu"
},
"recent_masters" : [
{
"node_id" : "aKgBu7LgS9a6iPYH8n2JPw",
"name" : "jackie-ubuntu"
}
]
}
},
"repository_integrity" : {
"status" : "green",
"symptom" : "No snapshot repositories configured."
},
"shards_availability" : {
"status" : "green",
"symptom" : "This cluster has all shards available.",
"details" : {
"initializing_primaries" : 0,
"restarting_primaries" : 0,
"started_primaries" : 1,
"unassigned_replicas" : 0,
"initializing_replicas" : 0,
"creating_primaries" : 0,
"restarting_replicas" : 0,
"unassigned_primaries" : 0,
"started_replicas" : 0,
"creating_replicas" : 0
}
},
"disk" : {
"status" : "green",
"symptom" : "The cluster has enough available disk space.",
"details" : {
"indices_with_readonly_block" : 0,
"nodes_with_enough_disk_space" : 1,
"nodes_with_unknown_disk_status" : 0,
"nodes_over_high_watermark" : 0,
"nodes_over_flood_stage_watermark" : 0
}
},
"shards_capacity" : {
"status" : "green",
"symptom" : "The cluster has enough room to add new shards.",
"details" : {
"data" : {
"max_shards_in_cluster" : 1000
},
"frozen" : {
"max_shards_in_cluster" : 3000
}
}
},
"slm" : {
"status" : "green",
"symptom" : "No Snapshot Lifecycle Management policies configured",
"details" : {
"slm_status" : "RUNNING",
"policies" : 0
}
},
"ilm" : {
"status" : "green",
"symptom" : "Index Lifecycle Management is running",
"details" : {
"policies" : 20,
"stagnating_indices" : 0,
"ilm_status" : "RUNNING"
}
}
}
}
查看当前集群健康指标比如shards_availability的信息,执行如下命令:
curl -X GET "https://localhost:9200/_health_report/shards_availability?pretty" --cacert $ES_HOME/config/certs/http_ca.crt -u "elastic:ohCxPH=QBE+s5=*lo7F9"
执行结果输出如下:
{
"cluster_name" : "elasticsearch",
"indicators" : {
"shards_availability" : {
"status" : "green",
"symptom" : "This cluster has all shards available.",
"details" : {
"initializing_primaries" : 0,
"restarting_primaries" : 0,
"started_primaries" : 1,
"unassigned_replicas" : 0,
"initializing_replicas" : 0,
"creating_primaries" : 0,
"restarting_replicas" : 0,
"unassigned_primaries" : 0,
"started_replicas" : 0,
"creating_replicas" : 0
}
}
}
}
目前支持的指标:
master_is_stableshards_availabilitydiskilm,即Indexing Lifecycle Managementrepository_integrityslm,即Snapshot Lifecycle Managementshards_capacity
相关资料
ElasticSearch之Health API的更多相关文章
- elasticsearch中的API
elasticsearch中的API es中的API按照大类分为下面几种: 文档API: 提供对文档的增删改查操作 搜索API: 提供对文档进行某个字段的查询 索引API: 提供对索引进行操作 查看A ...
- Elasticsearch for python API模块化封装
Elasticsearch for python API模块化封装 模块的具体功能 检测Elasticsearch节点是否畅通 查询Elasticsearch节点健康状态 查询包含的关键字的日志(展示 ...
- ElasticSearch的常用API
ElasticSearch的常用API 1.在服务器上怎么查ES的信息 # 通过使用_cat可以查看支持的命令 ### curl localhost:9200/_cat eg: /_cat/alloc ...
- Elasticsearch利用cat api快速查看集群状态、内存、磁盘使用情况
使用场景 当Elasticsearch集群中有节点挂掉,我们可以去查看集群的日志信息查找错误,不过在查找错误日志之前,我们可以通过elasticsearch的cat api简单判断下各个节点的状态,包 ...
- Springboot整合elasticSearch的官方API实例
前言:在上一篇博客中,我介绍了从零开始安装ElasticSearch,es是可以理解为一个操作数据的中间件,可以把它作为数据的存储仓库来对待,它具备强大的吞吐能力和计算能力,其基于Lucene服务器开 ...
- Elasticsearch中JAVA API的使用
1.Elasticsearch中Java API的简介 Elasticsearch 的Java API 提供了非常便捷的方法来索引和查询数据等. 通过添加jar包,不需要编写HTTP层的代码就可以开始 ...
- elasticsearch【cat API,系统数据】指令汇总
本博文讲述的ES获取系统数据的API是基于Elasticsearch 2.4.1版本的. 0. overview a. 下面将要介绍的所有的指令,都支持一个查询参数v(verbose),用来显示详细的 ...
- Elasticsearch使用REST API实现全文检索
通过rest api添加检索数据,阅读官方文档可以发现,elasticsearch支持动态映射,但是其中有不少问题,且听慢慢详解. 本文主要讲述三点内容: 1 Elasticsearch常用的rest ...
- ElasticSearch 中 REST API 详解
本文主要内容: 1 ElasticSearch常用的操作 2 ElasticSearchbulk命令 ES REST API elasticsearch支持多种通讯,其中包括http请求响应服务,因此 ...
- Elasticsearch:创建 API key 接口访问 Elasticsearch
转载自:https://blog.csdn.net/UbuntuTouch/article/details/107181440 在之前我的文章 "Elastic:使用Postman来访问El ...
随机推荐
- SQL Server 使用C#窗体与数据库连接,制作数据库查看器
SQL Server 使用C#窗体与数据库连接,制作数据库查看器 本文中心:讨论C#对SQL Server 的增删改查,使用Treeview制作数据库查看器. SSMS部分:确保SQL Server ...
- 解密Prompt系列15. LLM Agent之数据库应用设计:DIN & C3 & SQL-Palm & BIRD
上一章我们主要讲搜索引擎和LLM的应用设计,这一章我们来唠唠大模型和DB数据库之间的交互方案.有很多数据平台已经接入,可以先去玩玩再来看下面的实现方案,推荐 sql translate:简单,文本到S ...
- Dubbo3应用开发——架构的演变过程
Dubbo3应用开发--架构的演变过程 什么是Dubbo 早期Dubbo的定位: 基于Java的高性能,轻量级的RPC框架:SOA[Service-Oriented Architecture ⾯向服务 ...
- Solution -「洛谷 P3600」随机数生成器
Desciption Link. 给定一个值域在 \([1,x]\) 的长度为 \(n\) 的序列(由随机数构成),求给定一组区间中的最小值的最大值的期望. Solution 记: \[w=\max\ ...
- redis 源码分析:Jedis 哨兵模式连接原理
1. 可以从单元测试开始入手 查看类JedisSentinelPool private static final String MASTER_NAME = "mymaster"; ...
- python第2~5章 code
02基本语法 print('he\aaa\aaa') # 这是一个打印语句,请你看见了不要慌张# 这是一个注释# 注释会被解释器所忽略# print(123+456) 这行代码被注释了,将不会执行pr ...
- Linux常用命令大全 Linux Commands Line - v1.0
The most complete and updated list of commands on linux by LinuxGuide.it - over 350 commands! ...
- P4899 [IOI2018] werewolf 狼人 题解
P4899 [IOI2018] werewolf 狼人 题解 题目描述 省流: \(n\) 个点,\(m\) 条边,\(q\) 次询问,对于每一次询问,给定一个起点 \(S\) 和终点 \(T\) , ...
- 解决使用mitmprox抓包可以访问网页,但是使用python request 调用该网站接口报错问题
可能有几种原因导致这种情况.以下是一些常见的问题和可能的解决方法: 证书验证问题: 当你使用mitmproxy抓包时,它通常会生成自签名的SSL证书,以便进行中间人攻击检查.但在Python中使用re ...
- Mysql [Show global status] 命令 参数详解(转)
Aborted_clients:由于客户端没有正确关闭连接导致客户端终止而中断的连接数. Aborted_connects:试图连接到MySQL服务器而失败的连接数. Binlog_cache_dis ...