微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

【Elasticsearch 权威指南学习笔记】集群内的原理-集群健康

Elasticseach及集群监控信息中包含了很多的统计数据,其中最为重要的一项就是集群健康,它在

status字段中展示为:green、yellow或red。

  • green,所有的主分片和副分片都正常运行。
  • yellow,所有主分片都正常运行,但不是所有的副分片都正常运行
  • red,有主分片没能正常运行

1.请求方式:Get

2.请求URL: 

http://127.0.0.1:9200/_cluster/health

3.响应信息:

{
    "cluster_name": "elasticsearch",
    "status": "yellow",
    "timed_out": false,
    "number_of_nodes": 1,
    "number_of_data_nodes": 1,
    "active_primary_shards": 22,
    "active_shards": 22,
    "relocating_shards": 0,
    "initializing_shards": 0,
    "unassigned_shards": 9,
    "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": 70.96774193548387
}

 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐