elasticsearchhealth-monitoringelasticsearch-indices

What does it mean when an Elasticsearch index has yellow health?


I'm working on an application that creates N indices and N aliases, and there's a one-to-one correspondence between these indices and aliases.

But once in a while, I instead get N indices and N-1 aliases, and one of the indices has a name that should've been used by an alias. For some reason when this happens, the bogus index-that-should-have-been-an-alias-name has a yellow status, while the other indices are all green.

What might cause an index to be the only one that is yellow? I'm hoping understanding this might help me narrow down which part of the code I need to scrutinize to fix the bug.

My elasticsearch.yml has just:

cluster.name: "docker-cluster"
network.host: 0.0.0.0
discovery.zen.ping.unicast.hosts: ["127.0.0.1", "[::1]"]

In production we may have more ES nodes, but this is just a test system, so just one ES node.


Solution

  • The status "yellow" indicates that replica shards of that certain index could not get allocated to other nodes.

    This can happen for various reasons. For example, you have specified more replicas than you have nodes. It depends on your cluster setup and whether you configured shard allocation by your own or not.