This article is a mirror article of machine translation, please click here to jump to the original article.

View: 9334|Reply: 0

Elasticsearch(ES) cluster health: yellow (6 of 7) status

[Copy link]
Posted on 1/28/2021 2:27:14 PM | | | |
Connecting to Elasticsearch(ES) using the elasticsearch-head panel, version: 7.10.2, I found the following issues:

{
  "name" : "DESKTOP-C76AMDM",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "g5yrfnSXS6CVusCV5XUXMA",
  "version" : {
    "number" : "7.10.2",
    "build_flavor" : "default",
    "build_type" : "zip",
    "build_hash" : "747e1cc71def077253878a59143c1f785afa92b9",
    "build_date" : "2021-01-13T00:42:12.435326Z",
    "build_snapshot" : false,
    "lucene_version" : "8.7.0",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}





Viewudp-test-2021.01.27Index Settings:

The hyperlink login is visible.

You can also view it through Kibana, as shown below:

【Practical Action】Kibana installation tutorial for Elasticsearch
https://www.itsvse.com/thread-6400-1-1.html

【Practical Combat】Kibana 6.5.2 Chinese Chinese Tutorial
https://www.itsvse.com/thread-6948-1-1.html





{
  "udp-test-2021.01.27" : {
    "settings" : {
      "index" : {
        "routing" : {
          "allocation" : {
            "include" : {
              "_tier_preference" : "data_content"
            }
          }
        },
        "number_of_shards" : "1",
        "provided_name" : "udp-test-2021.01.27",
        "creation_date" : "1611732606460",
        "number_of_replicas" : "1",
        "uuid" : "Ss4YOET8Rym1czi7CeyHgg",
        "version" : {
          "created" : "7100299"
        }
      }
    }
  }
}
Cluster Health: yellow (6 of 7) Status Reason:Elasticsearch uses the default configuration (5 shards, 1 replica), but only single-node clusters are deployed. Since there is only one node, the cluster cannot place replicas and is in a yellow state

number_of_shards refers to the number of shards to be made by the index, which can only be specified when the index is created, and cannot be modified later.
number_of_replicas refers to how many copies each shard has, which can be dynamically modified later

primary shard: The primary shard, each document is stored in a shard, when you store a document, the system will first store it in the main shard, and then it will be copied to a different copy. By default, an index has 5 primary shards. You can set the number of shards in advance, and once the shard is created, the number of shards cannot be modified.

Replica shard: Replica shard, each shard has zero or more replicas. Replicas are primarily replicated of the primary shard, which can increase high availability and improve performance.
By default, a master assignment has one replica, but the number of replicas can be dynamically increased later in the configuration.
The replica must be deployed on a different node, not on the same node as the primary shard.


solution

Use Kibana to send a PUT request to modify the index settings, as shown in the following image:



Or send the request using the curl command, which is as follows:



After modification, the ES status is normal, as shown in the following figure:



(End)




Previous:Elasticsearch(ES) cluster health: red Failure analysis
Next:Elasticsearch (ES) replicates the clone index
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com