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. 剖析HBase负载均衡和性能指标

    1.概述 在分布式系统中,负载均衡是一个非常重要的功能,在HBase中通过Region的数量来实现负载均衡,HBase中可以通过hbase.master.loadbalancer.class来实现自定 ...

  2. Java开发知识之Java中的Map结构

    Java开发知识之Java中的Map结构 一丶Map接口 Map没有实现Collection接口,提供的是Key 到Value的映射. Map中.不能包含相同的Key,每个Key只能映射一个Value ...

  3. grafana使用详解--技术流ken

    grafana简介 Grafana是一个跨平台的开源的度量分析和可视化工具,可以通过将采集的数据查询然后可视化的展示,并及时通知.它主要有以下六大特点: 1.展示方式:快速灵活的客户端图表,面板插件有 ...

  4. 第32章 事件 - Identity Server 4 中文文档(v1.0.0)

    日志记录是更低级别的"printf"样式 - 事件代表有关IdentityServer中某些操作的更高级别信息.事件是结构化数据,包括事件ID,成功/失败信息,类别和详细信息.这使 ...

  5. 将excel按照某一列拆分成多个文件(方案整理)

    1解决方案:将excel按照某一列拆分成多个文件 https://blog.csdn.net/ntotl/article/details/79141314 2遇到的问题:解决vbe6ext.olb不能 ...

  6. git 常用命令,上传,下载,更新线上代码

    git 常用命令以及推荐git新建上传个人博客 $ git clone  //本地如果无远程代码,先做这步,不然就忽略 $ git status //查看本地自己修改了多少文件 $ git add . ...

  7. SAP MM 预留单据里的Base date和Requirement date

    SAP MM 预留单据里的Base date和Requirement date Base date可以在预留创建的初始界面指定, 这个日期可以作为预留各个行项目默认的requirement date. ...

  8. java 线程方法 ---- join()

    class MyThread2 implements Runnable{ @Override public void run() { for (int i = 0; i < 5; i++){ S ...

  9. Grafana 利用Grafana Variables变量配置快速切换不同主机的图表数据展示

    用Grafana Variables变量配置快速切换不同主机的图表数据展示   by:授客 QQ:1033553122 测试环境 需求描述 操作步骤 结果展示 测试环境 influxdb-1.5.2. ...

  10. (详细)华为畅享7 SLA-AL00的usb调试模式在哪里打开的流程

    就在我们使用Pc链上安卓手机的时候,如果手机没有开启usb开发者调试模式,Pc则不能够成功检测到我们的手机,有时我们使用的一些功能比较好的的应用软件如之前我们使用的一个应用软件引号精灵,老版本就需要打 ...