ES集群

迈不过友情╰ 2022-04-02 18:08 378阅读 0赞

官方网址:
https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-started-cluster-health.html

1、集群健康

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. 要检查群集运行状况,我们将使用_cat API。

  1. GET /_cat/health?v

在Kibana控制台中运行以下命令,执行结果如下:

  1. epoch timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
  2. 1545892680 14:38:00 es green 3 3 22 11 0 0 0 0 - 100.0%

Whenever we ask for the cluster health, we either get green, yellow, or red.
每当我们要求群集健康时,我们要么获得绿色,黄色或红色。

  • Green - everything is good (cluster is fully functional). 绿色 - 一切都很好(集群功能齐全)
  • Yellow - all data is available but some replicas are not yet allocated (cluster is fully functional). 黄色 - 所有数据都可用,但尚未分配一些副本(群集功能齐全)
  • Red - some data is not available for whatever reason (cluster is partially functional) . 红色 - 某些数据由于某种原因不可用(群集部分功能)

2、节点

We can also get a list of nodes in our cluster as follows:
我们还可以获得群集中的节点列表,如下所示:

  1. GET /_cat/nodes?v
  2. ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
  3. 10.11.13.104 48 23 0 0.00 0.01 0.05 mdi - elastic3
  4. 10.11.13.102 30 35 0 0.04 0.03 0.05 mdi * elastic1
  5. 10.11.13.103 49 23 0 0.00 0.01 0.05 mdi - elastic2

3、查看集群索引

  1. GET /_cat/indices?v
  2. health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
  3. green open test GHdZr5owTwexU_RJsasSJw 5 1 31 0 293kb 146.5kb
  4. green open .kibana AV5KHChzRzubIwZQ3_SqKg 1 1 1 0 8kb 4kb
  5. green open news 3kNoB5ORS2-XasQuf6pCdA 5 1 0 0 2.5kb 1.2kb

发表评论

表情:
评论列表 (有 0 条评论,378人围观)

还没有评论,来说两句吧...

相关阅读

    相关 ES管理

    转载自 [ES集群管理][ES] 8 集群管理 ES通常以集群方式工作,这样做不仅能够提高 ES的搜索能力还可以处理大数据搜索的能力,同时也增加了系统的容错能力及高可用

    相关 ES配置

    ES集群步骤: 1,需要几个ES节点,安装几个ES服务,同一台机器设置对外暴露的Http端口和ES交互的TCP端口需要不一致 2,每个ES服务如下增加ES配置,有中文说明,

    相关 ES同步原理

    (1)、ES基本概念名词     Cluster    代表一个集群,集群中有多个节点,其中有一个为主节点,这个主节点是可以通过选举产生的,主从节点是对于集群内部来说的。e

    相关 ES管理

    ES通常以集群方式工作,这样做不仅能够提高 ES的搜索能力还可以处理大数据搜索的能力,同时也增加了系统的 容错能力及高可用,ES可以实现PB级数据的搜索 集群的结构图如下