What Is Cluster Health (Green / Yellow / Red) in Elasticsearch?

What Is Cluster Health (Green / Yellow / Red) in Elasticsearch?

A complete, beginner-friendly guide to Elasticsearch's simple traffic-light system for cluster status — explained from the ground up with real-world analogies.

Imagine walking into a hospital and glancing at a large status board showing every patient’s condition as a single color: green for stable, yellow for needing attention, red for critical. You don’t need to read a detailed chart to understand, at a glance, whether things are generally fine or whether something urgent needs your focus. Elasticsearch gives cluster administrators exactly this kind of at-a-glance summary through cluster health — a single, simple status of green, yellow, or red that instantly communicates whether the entire cluster’s data is fully safe and available, partially at risk, or actively missing something important.

1Core Concepts — What Does “Cluster Health” Actually Measure?

Before the three colors make sense individually, it helps to understand exactly what cluster health is measuring underneath.

Health is fundamentally about shard allocation

At its core, cluster health reflects whether every shard — both primary and replica — that the cluster expects to exist is actually allocated to a node and functioning correctly. Recall that an index’s data lives across a set of primary shards, often backed up by replica shards on different nodes. Cluster health essentially answers the question: “are all of these shards where they’re supposed to be, and healthy?”

The three status values, at a glance

Elasticsearch summarizes the answer to that question using exactly three possible values, each with a very specific, well-defined meaning:

Status

Green

All primary shards and all replica shards are allocated and healthy.

Status

Yellow

All primary shards are allocated, but at least one replica shard is not.

Status

Red

At least one primary shard is not allocated, meaning some data is currently unavailable.

Simple Analogy

Think of a delivery company with a main warehouse and a backup warehouse for each region. Green means both the main and backup warehouses are fully stocked and operating normally. Yellow means the main warehouse is fine and every order can still be fulfilled, but a backup warehouse is temporarily offline — meaning the company is one bad day away from real trouble, but nothing is actually broken yet. Red means a main warehouse itself is down, and there’s genuinely no way to fulfill certain orders right now.

i
Key Idea

Cluster health is a summary of the worst condition found anywhere in the cluster. A cluster with a thousand perfectly healthy indexes and just one problematic shard in a single index will still report the status matching that one problem — health doesn’t average things out; it reflects the most severe issue present.

2Architecture — How Health Is Calculated Across the Cluster

Understanding where cluster health comes from requires connecting it back to the cluster state and the master node’s bookkeeping.

Health is derived from the cluster state

Recall that the master node maintains the cluster state — a complete record of which indexes exist, how many shards each has, and where each shard currently lives. Cluster health isn’t a separately tracked value; it’s continuously calculated by examining this cluster state and checking, for every expected shard, whether it has actually been successfully assigned to a node.

Health exists at multiple levels: index and cluster

While the overall cluster reports a single combined health status, each individual index also has its own health status, calculated the same way but scoped to just that index’s shards. The overall cluster health is essentially the worst status found among all of its individual indexes — if even one index is red, the whole cluster reports red, regardless of how healthy everything else is.

flowchart TD
    A["Cluster State"] --> B["Index: products (all shards allocated)"]
    A --> C["Index: logs-2026 (missing 1 replica)"]
    A --> D["Index: orders (missing 1 primary)"]
    B --> E["Index Health: Green"]
    C --> F["Index Health: Yellow"]
    D --> G["Index Health: Red"]
    E --> H["Overall Cluster Health: Red\n(worst status wins)"]
    F --> H
    G --> H
        
FIG 1 — Overall cluster health reflects the single worst-off index, even if most indexes are perfectly healthy.
Component

Cluster State

The authoritative record of expected shards and where they should live.

Component

Index-Level Health

A health status calculated for each individual index, scoped just to its own shards.

Component

Cluster-Level Health

The overall status, equal to the worst health found among all indexes.

3Internal Working — What Actually Triggers Each Status Change

Let’s look more closely at the specific events that push a cluster from one health status into another.

From green to yellow: losing a replica

The most common trigger for a shift from green to yellow is a node going offline — whether from a crash, a restart, or planned maintenance — that was hosting one or more replica shards. Since primary shards remain fully allocated in this scenario, all data stays available and searchable; the cluster simply signals, through the yellow status, that its safety margin has been reduced.

From yellow to red: losing a primary too

A cluster typically moves to red when a node failure takes down a primary shard that has no currently available, promotable replica to take over — for instance, if both the primary and its only replica happened to be affected by the same underlying issue, or if no replicas were configured for that shard at all. In this case, that shard’s data genuinely cannot be searched or retrieved until it’s recovered.

1

A Node Goes Offline

Whether from failure or maintenance, a node stops responding to the cluster.

2

Master Reassesses Shard Allocation

The master checks whether the missing shards were primaries, replicas, or both.

3

Health Status Updates Immediately

The cluster reports yellow (replica-only impact) or red (primary impact) right away.

4

Automatic Recovery Begins

Replicas are promoted where possible, and new replicas are built to restore full health.

Recovering back to green

Once every missing shard has either recovered on its original node, been reassigned to a healthy node, or been rebuilt as a fresh replica elsewhere, the cluster’s health automatically returns to green — there’s no manual “clear the alert” step required; it’s a live, continuously recalculated reflection of the cluster’s actual current shard allocation.

i
Key Idea

Cluster health isn’t a historical log or an alert you dismiss — it’s a real-time snapshot. If you check it again a moment after an issue resolves, it will already reflect the improved status automatically.

4Data Flow & Lifecycle — Health Through a Typical Incident

Walking through a realistic scenario end to end shows how health status evolves naturally as the cluster responds to a problem.

Stage one: everything is fine

Under normal operation, with every node healthy and every shard properly allocated, the cluster sits comfortably at green — the steady, expected state for a well-functioning deployment.

Stage two: a node fails unexpectedly

A data node crashes due to a hardware issue. Immediately, some shards that lived on that node — a mix of primaries and replicas, depending on what happened to be hosted there — become unavailable. If any lost shard was a primary with no healthy replica to promote, the cluster jumps straight to red for that portion of the data; otherwise, it settles at yellow.

Stage three: automatic recovery kicks in

The master promotes any available replicas to primaries where needed and begins building fresh replicas on other healthy nodes to restore full redundancy. During this window, health may transition through yellow as replicas catch up, even after an initial red state has been resolved by promotion.

Stage four: full recovery

Once every shard is once again properly allocated — primaries all present, and every configured replica successfully rebuilt — the cluster returns fully to green.

Normal
Green — steady, fully healthy state
Incident
Yellow or red — depending on what was lost
Recovery
Automatic reallocation restores green

5Advantages, Disadvantages & Trade-offs

The simplicity of a three-color status is both its greatest strength and its most important limitation.

Advantages

  • Extremely easy to understand at a glance, even for people unfamiliar with Elasticsearch’s internals.
  • Provides an immediate, unambiguous signal of whether data is currently at risk or actively unavailable.
  • Updates in real time as the cluster automatically recovers, with no manual intervention needed to “clear” it.
  • Works consistently across clusters of any size, from a single node to hundreds.
  • Forms a solid foundation for simple, reliable alerting rules.

Disadvantages / Trade-offs

  • A single yellow or red status doesn’t reveal which specific index or shard is affected without further investigation.
  • The worst-status-wins rule means one minor, low-priority index’s issue can make the entire cluster appear unhealthy.
  • Yellow status is common and expected in small clusters with only one node, which can cause unnecessary alarm if not understood.
  • Doesn’t capture performance-related problems, like slow queries or high resource usage, that don’t involve shard allocation.
  • Green status doesn’t guarantee good performance — it only confirms all expected shards are properly allocated.
“Cluster health tells you whether every piece of your data is where it’s supposed to be — not whether the cluster is fast, well-tuned, or free of every other kind of problem.”

6Security Considerations Around Cluster Health Visibility

Cluster health may seem like a purely operational detail, but who can view and act on it deserves some thought.

Restricting who can view cluster health

Cluster health information, while not sensitive in the way customer data might be, still reveals operational details about a cluster’s stability and current state. Limiting visibility of this information to legitimate operators and monitoring systems, rather than exposing it broadly, follows the general security principle of not revealing more about your infrastructure than necessary.

Preventing unauthorized actions in response to health alerts

Automated systems that react to cluster health changes — for example, triggering a shard reallocation or a node restart — should be carefully scoped and secured, since a malicious actor able to manipulate or trigger such automated responses could potentially cause unnecessary disruption to a healthy cluster.

!
Common Mistake

Exposing cluster health (or broader cluster monitoring endpoints) without any authentication on a network reachable by more than trusted operators. Even seemingly harmless operational metadata can help an attacker understand a system’s weaknesses or current vulnerabilities.

Practice

Authenticate Monitoring Access

Require proper authentication for any endpoint or dashboard exposing cluster health details.

Practice

Scope Automated Remediation Carefully

Secure any automated system that reacts to health changes, so it can’t be triggered or abused maliciously.

Practice

Limit External Exposure

Keep detailed cluster health and monitoring information off of public-facing networks.

Practice

Audit Access to Health Endpoints

Log who is querying cluster health information, particularly in sensitive or regulated environments.

7Monitoring Cluster Health Effectively

Cluster health is one of the very first things any monitoring setup should track, but it works best alongside a few complementary details.

Alerting on health transitions, not just the current status

Rather than only checking the current color occasionally, effective monitoring alerts specifically on transitions — moving from green to yellow, or yellow to red — since these transitions are the moments that actually require human attention, whereas a cluster that’s been stably yellow due to a known, accepted configuration (like a deliberately single-node setup) may not need repeated alerts.

Pairing health status with unassigned shard details

When health drops below green, immediately checking which specific shards are unassigned — and why — turns a vague “something’s wrong” signal into an actionable diagnosis. Elasticsearch provides tools specifically for explaining why a given shard hasn’t been allocated, which is often the fastest path to resolving a health issue.

Health Status History

Tracking how often and how long a cluster spends outside of green helps identify recurring stability issues worth addressing at a deeper level.

Unassigned Shard Explanations

Investigating exactly why a shard is unassigned (insufficient disk space, no eligible node, and so on) turns a status color into a concrete next step.

Time-to-Recovery

Measuring how long it takes for the cluster to return to green after an incident helps evaluate whether current hardware and replica settings provide adequate resilience.

8Design Patterns & Anti-patterns

A few consistent habits separate teams who use cluster health as a genuinely useful signal from teams who either over-react or under-react to it.

Tiered Alerting by Status (a proven pattern)

Many teams configure lighter, informational alerts for a transition to yellow, reserving urgent, immediate-response alerts specifically for red — reflecting the genuinely different severity of “reduced redundancy” versus “data currently unavailable.”

Understanding Expected Yellow States

Deliberately single-node development or testing clusters will permanently show yellow, since there’s no second node available to host any replicas at all — a well-understood and accepted condition in that specific context, rather than a genuine problem to chase.

ANTI-PATTERN-01 Avoid
Problem

Treating a persistent yellow status on a production cluster as low priority because “the data is still available.”

Why It’s Harmful

A sustained yellow status means the cluster’s safety margin is reduced — a second failure while already in this state could easily push the cluster into red, resulting in genuine data unavailability.

Correct Approach

Investigate and resolve the underlying cause of a sustained yellow status promptly, restoring full replica coverage rather than allowing it to persist indefinitely.

ANTI-PATTERN-02 Avoid
Problem

Assuming a green cluster status means every performance and operational concern is fully addressed.

Why It’s Harmful

Cluster health only reflects shard allocation — a green cluster can still suffer from slow queries, high memory pressure, or disk space concerns that health status alone will never surface.

Correct Approach

Pair cluster health monitoring with broader performance metrics (heap usage, query latency, disk space) rather than relying on health status as a complete picture of cluster wellbeing.

9Best Practices & Common Mistakes

A handful of habits help teams respond appropriately to cluster health signals without either overreacting or missing real problems.

Best Practice

Alert on Transitions, Not Just Snapshots

Focus alerting on status changes, especially any move toward red, rather than only periodic checks.

Best Practice

Investigate Sustained Yellow Promptly

Don’t let a reduced-redundancy state linger without understanding and addressing its cause.

Best Practice

Combine Health With Deeper Diagnostics

Pair the simple color status with unassigned shard explanations for actionable detail.

Best Practice

Understand Context-Appropriate Yellow

Recognize when yellow is an expected condition (like a single-node dev cluster) rather than a real issue.

Best Practice

Track Time-to-Recovery

Measure how quickly the cluster returns to green after incidents to evaluate overall resilience.

Best Practice

Never Treat Green as “Nothing to Monitor”

Continue tracking performance metrics even when health status is fully green.

!
Common Mistake

Ignoring cluster health alerts because “it always goes back to green eventually.” While automatic recovery is a genuine strength of Elasticsearch, repeated or prolonged excursions into yellow or red usually point to an underlying issue — insufficient nodes, inadequate disk space, or unreliable hardware — that deserves a real fix rather than being tolerated indefinitely.

10Real-World & Industry Examples

Cluster health is one of the most universally relied-upon signals across every kind of Elasticsearch deployment.

Operations Dashboards

Organizations running critical Elasticsearch clusters typically display cluster health prominently on shared operational dashboards, giving on-call engineers an instant, unambiguous picture of overall cluster status at any moment.

Automated Alerting Pipelines

Teams commonly wire cluster health transitions directly into their incident-alerting systems, ensuring a shift toward red immediately notifies the right people, often alongside automatic ticket creation.

Managed Elasticsearch Service Providers

Companies offering hosted Elasticsearch services rely heavily on cluster health as a core signal for their own internal monitoring, often combining it with proprietary tooling to automatically detect and remediate common causes of yellow or red status.

Deployment and Upgrade Validation

During planned maintenance, such as a rolling upgrade across nodes, teams commonly watch cluster health throughout the process to confirm the cluster returns cleanly to green after each node is taken down and brought back up.

ContextHow Cluster Health Is Used
Operations dashboardsAt-a-glance status visible to on-call teams
Automated alertingTriggers notifications on transitions toward yellow/red
Managed service providersCore signal feeding automated remediation systems
Rolling upgrades / maintenanceConfirms safe recovery to green after each step

11Frequently Asked Questions

Q1Is a yellow cluster status always something to worry about?

Not necessarily. In small or single-node clusters, especially in development or testing environments, yellow can be an entirely expected, permanent state simply because there aren’t enough nodes to host replicas.

Q2Can I lose data while the cluster is yellow?

No, not from the yellow condition itself — all primary shards are still fully available. Yellow simply signals reduced redundancy, meaning the cluster has less protection against an additional failure than it normally would.

Q3What does red mean for my application?

Red means at least one primary shard is currently unavailable, so any data living in that shard cannot be searched or retrieved until the cluster recovers — this generally requires prompt investigation and action.

Q4Does the cluster fix itself automatically?

In many cases, yes — Elasticsearch automatically promotes replicas and reallocates shards to healthy nodes. However, some root causes (like a permanently failed node, or insufficient disk space cluster-wide) require manual intervention before full recovery can occur.

Q5Can one bad index affect the reported health of the whole cluster?

Yes. Overall cluster health reflects the worst status found among all indexes, so a single problematic index can cause the entire cluster to report yellow or red, even if every other index is perfectly healthy.

Q6Is green status a guarantee of good performance?

No. Green only confirms that all expected shards are properly allocated — it says nothing about query speed, resource usage, or other performance factors, which need to be monitored separately.

12Summary and Key Takeaways

Cluster health is Elasticsearch’s elegantly simple way of answering one of the most important operational questions: is all of my data properly allocated and safe right now? By reducing the complex reality of shard allocation across an entire cluster down to a single, clear color — green, yellow, or red — it gives administrators an immediate, unambiguous signal without requiring deep technical investigation for routine checks. Understanding what drives each status change, how automatic recovery works, and where the color’s limitations lie (it reflects allocation, not performance) equips anyone running Elasticsearch to respond appropriately, without either panicking over benign yellow states or ignoring genuinely urgent red ones.

Key Takeaways

  • Cluster health summarizes shard allocation status as one of three simple values: green, yellow, or red.
  • Green means every primary and replica shard is allocated and healthy, the normal, expected state.
  • Yellow means primaries are fine but a replica is missing — data is safe, but redundancy is temporarily reduced.
  • Red means a primary shard itself is unavailable, meaning some data genuinely cannot be accessed right now.
  • Overall cluster health reflects the single worst index, not an average across all indexes.
  • Recovery to green is largely automatic, as the cluster reallocates and rebuilds shards on healthy nodes.
  • Green doesn’t guarantee good performance — health tracks allocation, not speed or resource usage.