前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >ES集群

ES集群

作者头像
程裕强
发布2019-05-27 09:12:34
7930
发布2019-05-27 09:12:34
举报
文章被收录于专栏:大数据学习笔记

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。

代码语言:javascript
复制
GET /_cat/health?v

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

代码语言:javascript
复制
epoch      timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
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: 我们还可以获得群集中的节点列表,如下所示:

代码语言:javascript
复制
GET /_cat/nodes?v
代码语言:javascript
复制
ip           heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
10.11.13.104           48          23   0    0.00    0.01     0.05 mdi       -      elastic3
10.11.13.102           30          35   0    0.04    0.03     0.05 mdi       *      elastic1
10.11.13.103           49          23   0    0.00    0.01     0.05 mdi       -      elastic2

3、查看集群索引

代码语言:javascript
复制
GET /_cat/indices?v
代码语言:javascript
复制
health status index   uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   test    GHdZr5owTwexU_RJsasSJw   5   1         31            0      293kb        146.5kb
green  open   .kibana AV5KHChzRzubIwZQ3_SqKg   1   1          1            0        8kb            4kb
green  open   news    3kNoB5ORS2-XasQuf6pCdA   5   1          0            0      2.5kb          1.2kb
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2018年12月27日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1、集群健康
  • 2、节点
  • 3、查看集群索引
相关产品与服务
Elasticsearch Service
腾讯云 Elasticsearch Service(ES)是云端全托管海量数据检索分析服务,拥有高性能自研内核,集成X-Pack。ES 支持通过自治索引、存算分离、集群巡检等特性轻松管理集群,也支持免运维、自动弹性、按需使用的 Serverless 模式。使用 ES 您可以高效构建信息检索、日志分析、运维监控等服务,它独特的向量检索还可助您构建基于语义、图像的AI深度应用。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档