IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 大数据 -> Elasticsearch集群健康 -> 正文阅读

[大数据]Elasticsearch集群健康

官网文档:

https://www.elastic.co/guide/en/elasticsearch/reference/7.13/cluster-health.html#cluster-health-api-request

命令

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

返回举例:

{

? "cluster_name" : "xwliu07-application",
? "status" : "green",
? "timed_out" : false,
? "number_of_nodes" : 2,
? "number_of_data_nodes" : 2,
? "active_primary_shards" : 5,
? "active_shards" : 10,
? "relocating_shards" : 0,
? "initializing_shards" : 0,
? "unassigned_shards" : 0,
? "delayed_unassigned_shards" : 0,
? "number_of_pending_tasks" : 0,
? "number_of_in_flight_fetch" : 0,
? "task_max_waiting_in_queue_millis" : 0,
? "active_shards_percent_as_number" : 100.0
}

官网原文:

Response bodyedit
cluster_name
(string) The name of the cluster.
status
(string) Health status of the cluster, based on the state of its primary and replica shards. Statuses are:

green
All shards are assigned.
yellow
All primary shards are assigned, but one or more replica shards are unassigned. If a node in the cluster fails, some data could be unavailable until that node is repaired.
red
One or more primary shards are unassigned, so some data is unavailable. This can occur briefly during cluster startup as primary shards are assigned.
timed_out
(Boolean) If false the response returned within the period of time that is specified by the timeout parameter (30s by default).
number_of_nodes
(integer) The number of nodes within the cluster.
number_of_data_nodes
(integer) The number of nodes that are dedicated data nodes.
active_primary_shards
(integer) The number of active primary shards.
active_shards
(integer) The total number of active primary and replica shards.
relocating_shards
(integer) The number of shards that are under relocation.
initializing_shards
(integer) The number of shards that are under initialization.
unassigned_shards
(integer) The number of shards that are not allocated.
delayed_unassigned_shards
(integer) The number of shards whose allocation has been delayed by the timeout settings.
number_of_pending_tasks
(integer) The number of cluster-level changes that have not yet been executed.
number_of_in_flight_fetch
(integer) The number of unfinished fetches.
task_max_waiting_in_queue_millis
(integer) The time expressed in milliseconds since the earliest initiated task is waiting for being performed.
active_shards_percent_as_number
(float) The ratio of active shards in the cluster expressed as a percentage.

cluster_name:集群名称

status:集群状态,指示着当前集群在总体上是否工作正常。它的三种颜色含义如下:
green:所有的主分片和副本分片都正常运行。
yellow:所有的主分片都正常运行,但不是所有的副本分片都正常运行,此时集群可以正常服务所有请求,但是在硬件故障时有丢失数据的风险。
red:有主分片没能正常运行。

timed_out:是否超时

number_of_nodes:集群节点数量

number_of_data_nodes:数据节点数量

active_primary_shards:主分片数量

active_shards:所有分片数量包括主副分片

relocating_shards:大于 0 表示 Elasticsearch 正在集群内移动数据的分片 , 来提升负载均衡和故 障转移。这通常发生在添加新节点、重启失效的节点或者删除节点的时候

initializing_shards:正在初始化的分片数量,当用户刚刚创建一个新的索引或者重启一个节点的时候,这个数值会大于 0

unassigned_shards:未分配的副本分片数量,单节点集群中副本是未分配的,因为都在一个节点上

delayed_unassigned_shards:延迟未分配的副本数量

number_of_pending_tasks :代办的任务数量,pending task只能由主节点来进行处理,这些任务包括创建索引并将shards分配给节点,如果该指标数值一直未减小代表集群存在不稳定因素

number_of_in_flight_fetch : 未完成的提取次数?

task_max_waiting_in_queue_millis : 最早启动的任务等待执行到目前的时间,就是最大等待时长(以毫秒为单位)。

active_shards_percent_as_number:集群分片健康度,活跃分片数占总分片数比例,如果为 0 则表示不可用,上述案例是100说明很健康。

参考博客:

https://www.elastic.co/guide/en/elasticsearch/reference/7.13/cluster-health.html#cluster-health-api-request

https://blog.csdn.net/nandao158/article/details/109024164

https://www.jianshu.com/p/7540ebec4096

https://blog.csdn.net/u010824591/article/details/78614505

  大数据 最新文章
实现Kafka至少消费一次
亚马逊云科技:还在苦于ETL?Zero ETL的时代
初探MapReduce
【SpringBoot框架篇】32.基于注解+redis实现
Elasticsearch:如何减少 Elasticsearch 集
Go redis操作
Redis面试题
专题五 Redis高并发场景
基于GBase8s和Calcite的多数据源查询
Redis——底层数据结构原理
上一篇文章      下一篇文章      查看所有文章
加:2021-07-15 23:47:47  更:2021-07-15 23:48:49 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/7 16:50:42-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码