Let’s start with a basic health check, which we can use to see how our cluster is doing. We’ll be using curl to do this but you can use any tool that allows you to make HTTP/REST calls. Let’s assume that we are still on the same node where we started Elasticsearch on and open another command shell window.

让我们从基本运行状况检查开始,我们可以使用它来查看集群的运行情况。我们将使用curl来执行此操作,但您可以使用任何允许您进行HTTP / REST调用的工具。假设我们仍然在我们启动Elasticsearch的同一节点上打开另一个命令shell窗口。
 
To check the cluster health, we will be using the _cat API. You can run the command below in Kibana’s Console by clicking "VIEW IN CONSOLE" or with curl by clicking the "COPY AS CURL" link below and pasting it into a terminal.
要检查群集运行状况,我们将使用_cat API。您可以通过单击“查看控制台”或通过单击下面的“COPY AS CURL”链接并将其粘贴到终端中,在Kibana控制台中运行以下命令。
GET /_cat/health?v

And the response:

epoch      timestamp cluster       status     node.total node.data  shards pri   relo  init  unassign   pending_tasks   max_task_wait_time    active_shards_percent
:: elasticsearch green - 100.0%

We can see that our cluster named "elasticsearch" is up with a green status.

我们可以看到名为“elasticsearch”的群集处于绿色状态。

Whenever we ask for the cluster health, we either get green, yellow, or red.

每当我们要求群集健康时,我们要么获得绿色,黄色或红色。

1、Green - everything is good (cluster is fully functional)

绿色 - 一切都很好(集群功能齐全)
 
2、Yellow - all data is available but some replicas are not yet allocated (cluster is fully functional)
黄色 - 所有数据均可用,但尚未分配一些副本(群集功能齐全)
 
3、Red - some data is not available for whatever reason (cluster is partially functional)
红色 - 某些数据由于某种原因不可用(群集部分功能)
 
Note: When a cluster is red, it will continue to serve search requests from the available shards but you will likely need to fix it ASAP since there are unassigned shards.
注意:当群集为红色时,它将继续提供来自可用分片的搜索请求,但您可能需要尽快修复它,因为存在未分配的分片。
 
Also from the above response, we can see a total of 1 node and that we have 0 shards since we have no data in it yet. Note that since we are using the default cluster name (elasticsearch) and since Elasticsearch uses unicast network discovery by default to find other nodes on the same machine, it is possible that you could accidentally start up more than one node on your computer and have them all join a single cluster. In this scenario, you may see more than 1 node in the above response.
同样从上面的响应中,我们可以看到总共1个节点,并且我们有0个分片,因为我们还没有数据。请注意,由于我们使用的是默认群集名称(elasticsearch),并且由于Elasticsearch默认使用单播网络发现来查找同一台计算机上的其他节点,因此您可能会意外启动计算机上的多个节点并拥有它们所有人都加入一个集群。在这种情况下,您可能会在上面的响应中看到多个节点。
 
We can also get a list of nodes in our cluster as follows:
我们还可以获得群集中的节点列表,如下所示:
GET /_cat/nodes?v

And the response:

ip        heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
127.0.0.1 4.46 mdi * PB2SGZY

Here, we can see our one node named "PB2SGZY", which is the single node that is currently in our cluster.

在这里,我们可以看到一个名为“PB2SGZY”的节点,它是我们集群中当前的单个节点。
 

(五)Cluster Health的更多相关文章

  1. 转 Oracle Cluster Health Monitor(CHM)简介

    Cluster Health Monitor(以下简称CHM)是一个Oracle提供的工具,用来自动收集操作系统的资源(CPU.内存.SWAP.进程.I/O以及网络等)的使用情况.CHM会每秒收集一次 ...

  2. Elasticsearch cluster health: yellow unassigned shards

    查看ES各个分片的状态 $ curl -XGET http://127.0.0.1:9200/_cluster/health?pretty { "cluster_name" : & ...

  3. redis源码分析(五)--cluster(集群)结构

    Redis集群 Redis支持集群模式,集群中可以存在多个master,每个master又可以拥有多个slave.数据根据关键字映射到不同的slot,每一个master负责一部分的slots,数据被存 ...

  4. Elasticsearch-->Get Started-->Exploring Your Cluster

    Version 直接对localhost:9200发出一个get请求 { "name": "WqeJVip", "cluster_name" ...

  5. ES Docs-2:Exploring ES cluster

    The REST API Now that we have our node (and cluster) up and running, the next step is to understand ...

  6. Elasticsearch 入门 - Exploring Your Cluster

    The REST API Cluster Health ( http://localhost:9200/ ) curl -X GET "localhost:9200/_cat/health? ...

  7. Elasticsearch配置文件说明

    一.Cluster  setting Cluster indices.ttl.interval  允许设置多久过期的文件会被自动删除.默认值是60秒. indices.cache.filter.siz ...

  8. ElasticSearch入门系列(四)分布式初探

    序言:ElasticSearch致力于隐藏分布式系统的复杂性,以下的操作都是在底层自动完成的: 将你的文档分区到不同的容器或者分片(shards),他们可以存在于一个或多个节点中 将分片均匀的分配到各 ...

  9. Elasticsearch大规模时序索引如何治理和规划

    什么是时序索引? 其主要特点体现在两个方面, 一存,以时间为轴,数据只有增加,没有变更,并且必须包含timestamp(日期时间,名称随意)字段,其作用和意义要大于数据的id字段,常见的数据比如我们通 ...

随机推荐

  1. Chapter 4 Invitations——23

    The next morning, when I pulled into the parking lot, I deliberately parked as far as possible from ...

  2. 大众美团服务链监控CAT

    github链接:https://github.com/dianping/cat CAT 作为服务端项目基础组件,提供了 Java, C/C++, Node.js, Python, Go 等多语言客户 ...

  3. Camera测试之Color & Lens shading Test

    测试目的:测试摄像头成像的均匀性 测试主要设备:均匀光源(DNP灯箱),色温照度计 测试环境:将灯箱光源调至600±100lux 测试注意事项:保证均匀的光源 测试原理: 造成摄像头成像不均匀的原因有 ...

  4. Linux设备驱动之IIO子系统——IIO框架数据读取

    IIO DATA ACCESS IIO数据获取 只有两种方法可以使用IIO框架访问数据; 通过sysf通道进行一次性捕获,或通过IIO字符设备进行连续模式(触发缓冲). One-shot captur ...

  5. ARM与FPGA通过spi通信设计2.spi master的实现

    这里主要放两个代码第一个是正常的不使用状态机的SPI主机代码:第二个是状态机SPI代码 1.不使用状态机:特权同学<深入浅出玩转FPGA>中DIY数码相框部分代码: /////////// ...

  6. 万能pb_ds头文件—bits/extc++.h

    c++中自带了一些非常强大却鲜为人知的功能库—pd_ds库 里面含有红黑树(rb_tree),哈希表(gp_hash_table),可持久化平衡树(rope)等超强数据结构 但是有一件非常令人头痛的事 ...

  7. 免费开源ERP-成功案例分析(2)

    Odoo用户案例 Odoo用户概要 关于Odoo全球的用户,我们来看一些数据: Odoo目前全球有300万使用者 Odoo系统上每天新创建的数据库超过1000个 Odoo和Word.Excel.Pow ...

  8. nodejs+express+mongodb写api接口的简单尝试

    1:启动mongodb服务 我的mongoDB的安装目录:E:\mongoDB\bin,版本:3.4.9 打开cmd  -> e:(进入e盘) -> cd mongoDB/bin(进入mo ...

  9. 预置第三方apk到MTK项目相关问题总结

    目前5.0之后项目预置方式通用步骤为: 建立apk文件夹;  置目标apk到该文件夹下;   解压缩apk查看是否包含lib/文件夹(apk项目是否包含lib库文件);  在该文件夹下编写Androi ...

  10. linux(centos7) 常用命令和快捷键 持续验证更新中...

    1.文件和目录cd 进入目录示例:cd /home 进入home目录    cd..    返回上一级目录cd../..    返回上两级目录cd -    返回上次所在目录cd ~    返回根目录 ...