Why your OpenSearch cluster shows red or yellow and what to check first
A yellow or red cluster status usually appears on a dashboard or health check right after a node restart, a disk filling up, or a deployment that changed indexes or node settings. The first step is to read the status correctly: yellow means every primary shard is allocated but one or more replica shards are not, and red means at least one primary shard is unassigned, so part of the data is unavailable and searches may return incomplete results. Run the cluster health API (GET _cluster/health) and note the status, unassigned_shards and active_shards_percent_as_number fields before changing anything. The cluster health API documentation defines these states and is the reference to check against your version.
This page is for the on-call engineer or platform owner who has seen one of these states and needs to decide whether the cluster is degraded, whether writes or reads are at risk, and which subsystem to inspect first. Treat the status as a symptom, not a root cause. Yellow is often expected on a single-node cluster, because replica shards have nowhere to go, and it is harmless there if that matches your design. Red is never a configuration preference: it signals that data is not currently served. The same status can come from a full disk that blocks shard allocation, a node that left the cluster, or index settings that ask for more replicas than the cluster has nodes to hold them.
Before you change replica counts, restart nodes or force allocation, confirm which of these causes applies. Check whether the affected indexes are primaries or replicas, which nodes are missing from the cluster, and whether the allocation explanation API reports a reason such as disk watermarks. Decide in advance who may run allocation changes in production, and record the output of each check so the root cause can be fixed rather than hidden by a temporary green status. Confirm with your OpenSearch version's documentation which allocation and health APIs and response fields it exposes, since output details can vary between releases.
What unassigned primaries and replicas mean for your data
Red and yellow health both come from shards that have no assigned copy on a node, but the impact on your data differs sharply. The four cases below separate data that is unavailable from data that is served with less redundancy, and they show which ones are expected by design. Confirm each case against your own index list before changing any setting.
Unassigned primary (red)
Red means at least one primary shard is unassigned. The data in that shard is unavailable, so searches may return incomplete results without an obvious error. Start by listing the red indices and their unassigned shards, then find out why the shard cannot be placed, such as a lost node, a full disk or an allocation rule. Treat this as the first priority, since no replica can stand in for a missing primary until a copy is restored.
Cluster health API docsUnassigned replicas (yellow)
Yellow means every primary shard is allocated, but one or more replica shards are not. Data is still served from the primaries, so searches work, but the cluster has lost some redundancy. A node failure now could make data unavailable. Check which replicas are unassigned, how many replicas each index is configured for, and whether the cluster has enough data nodes to hold the extra copies.
Single-node cluster by design
A single-node cluster reports yellow because its replica shards have no second node to be placed on. This is expected in development and test environments and does not indicate data loss. In production, it means no copy survives a node failure. If you set replicas to zero on a single-node cluster, confirm that the status change matches your intent and that a backup exists for the data.
Node loss without a copy
When a node leaves the cluster, shards it held become unassigned. Shards that still have a copy on another node recover as replicas are promoted, but any shard whose only copy was on the lost node stays unavailable. Compare the shards that were on the lost node with the replica settings of each index to find the gaps. Confirm the impact with your own index list and your snapshot inventory before deciding whether to restore, rebuild or accept the loss.
The allocation checks to run before changing any setting
This sequence moves from the cluster-wide status to the specific shard causing it, so each fix targets a confirmed cause rather than a guessed one. The record it produces is the evidence you need for a change request or a vendor escalation.
Read the cluster health status and reason
Call the cluster health API and note the status, the number of unassigned shards, and the count of active primary and replica shards. Yellow means every primary is allocated but some replicas are not, while red means at least one primary is unassigned and some data is unavailable, so searches may return incomplete results. A healthy result for this step is a clear status value and a shard count you can compare against the expected layout. Record the status, timestamp, cluster name, and unassigned shard count in the ticket before going further.
List unassigned shards and their reasons
Run the cat shards view filtered to unassigned shards, which shows each shard's index, type (primary or replica), and the reason it is unassigned. Group the output by reason, because a handful of causes such as node departure, index creation, or allocation filtering account for most cases. A useful result is a short list of affected indexes and one dominant reason; if the list is long and mixed, treat the cluster as a multi-cause incident. Save the full output as an artifact for escalation.
Confirm node count and node roles
Check the node list and confirm that the number of data nodes matches what the cluster was designed for, and that cluster manager nodes are present and reachable. A single-node cluster reports yellow because its replica shards cannot be placed on a second node, so a missing node and a single-node design look the same in the status field. Compare the roles column with your deployment plan, and check whether any node left recently. A healthy result is the expected node count with a stable elected cluster manager. Record the node names, roles, and any recent departures.
Check disk usage against watermarks
Review disk usage per node and compare it with the low, high, and flood stage watermarks. Shards are not allocated to a node that has crossed the low watermark, and a node above the flood stage can force indexes into a read-only block, which can leave shards unassigned even when nodes are healthy. Healthy means every data node sits clearly below the thresholds with headroom for growth. Record the percentage used on each node and whether any node is near a threshold, since this decides whether the fix is capacity or configuration.
Explain allocation for one unassigned shard
Pick one unassigned primary, or one replica if all primaries are assigned, and call the allocation explain API for that shard. The output names the decider that blocked allocation, such as disk threshold, same-shard, awareness, or filter rules, and explains why each node was rejected. Work through one shard at a time, because the explanation is specific to that shard and its current state. A healthy result is an explanation that names a single decider you can act on. Record the index, shard number, primary flag, and the decider name verbatim.
Fix the confirmed cause
Apply the change that matches the decider you recorded, such as adding a data node for replica placement, freeing disk or raising capacity for watermark blocks, correcting allocation filters, or restoring a missing primary from its source where data was lost. Make one change at a time and avoid altering shard counts or replica settings until the cause is confirmed, since a replica setting change on a single-node cluster can mask the real problem. Confirm the outcome by rerunning the health and unassigned shard checks. Record the change, the operator, and the before and after status.
Record the evidence and confirm green
Once the status returns to green, rerun the unassigned shard list to confirm it is empty and check that the index is searchable. If the status does not change, or red persists after a primary is restored, package the health output, unassigned shard list, node roles, watermark readings, and explain output into the escalation record and include the OpenSearch version. Ask your support provider or the OpenSearch community to confirm any recovery step that could cause data loss before running it. A healthy close is green status with an empty unassigned list and a documented root cause.
Fixes by cause: replicas, single-node settings, disk and node loss
A single-node cluster reports yellow because its replica shards have nowhere to go. A replica must sit on a different node from its primary, so on one node the replicas can never be assigned. This is expected behavior, not a fault. For a development or test cluster, the usual fix is to set the replica count to zero on the affected indexes, which turns the status green. That is a choice to confirm, not a default fix for production, because it removes the only extra copy of your data.
- Replica count change: Setting
number_of_replicasto0on an index is a settings update that takes effect immediately and is easy to reverse later. - Cluster-wide defaults: Index templates that set replicas to one will recreate the yellow state on each new index unless the template is also changed.
- Production trade-off: On a production cluster, zero replicas means a lost node or disk loses data that only a snapshot can recover.
- Second node instead: Adding a second data node lets replicas allocate and keeps the copy, which is usually the better route when the workload matters.
- Confirm the intent: Ask the owner whether the cluster is meant to hold data they cannot rebuild before changing any setting.
Before changing replica counts, check the cluster's intended role and the indexes it holds, and record the decision in your runbook.
On a multi-node cluster, replicas that stay unassigned after a rolling restart usually mean the allocator is waiting, blocked or unable to find a valid node. Common causes include nodes that have not rejoined, allocation settings that were disabled during maintenance, and shard allocation awareness rules that leave no eligible target. Fixing the cause keeps the copies you already have. Forcing allocation or deleting shards is rarely needed and can discard data.
- Allocation disabled: A cluster setting that restricts allocation to primaries left in place after maintenance blocks replica recovery until it is reset.
- Nodes not rejoined: Check that every expected node is in the cluster before assuming shard problems, since a missing node removes its copies from the picture.
- Awareness constraints: When allocation awareness requires replicas in separate zones, a zone with too few nodes keeps replicas unassigned.
- Recovery in progress: Some replicas are still recovering after a restart. Check recovery progress before intervening.
- Avoid forced actions: Manual reroute commands that accept empty or stale primaries can cause data loss, so use them only after a snapshot exists and the risk is understood.
After the cause is cleared, confirm the cluster returns to green on its own without any manual shard operations.
When a node passes the disk watermarks, OpenSearch stops allocating new shards to it, and at the flood stage it can block writes to affected indexes. Yellow or red status can follow because replicas or relocated shards cannot land on the full node. The fix is to free space or add capacity, not to raise the watermarks to hide the problem. Raising thresholds leaves less headroom for merges and recovery, and the disk can fill completely.
- Free space first: Remove old indexes through a retention policy, delete confirmed-unneeded snapshots or move data to a larger disk before touching settings.
- Adding capacity: A new data node or larger volume gives shards somewhere to go and usually fixes the block without changing thresholds.
- Temporary threshold changes: If a threshold must change for a short window, record the original value and restore it afterward.
- Read-only blocks: A write block set at the flood stage needs to be cleared only after space is recovered, otherwise it returns quickly.
- Measure headroom: Check per-node disk usage from the allocation and disk APIs so you see which node is the constraint.
After space is freed, confirm each node is below the watermarks and that allocation resumes.
When a data node is lost permanently, its primary shards are gone and any replicas on that node are gone with it. If surviving nodes hold replicas, the cluster promotes them and rebuilds copies. If the lost node held the only copy of a shard, the data must be restored from a snapshot or rebuilt from source systems. In that case, restoring from a snapshot is usually the safer path, because it returns data as of a known point instead of guessing at what was lost.
- Replicas first: If replicas survived, let the cluster recover them before taking further action, since recovery is non-destructive.
- Snapshot restore: Restoring an index from a snapshot brings back a known state. Plan for the data written after the snapshot time, which will need replay from source logs or pipelines.
- Rebuild from source: Some indexes can be reindexed from upstream systems, which takes time but avoids restoring stale state.
- Verify snapshot integrity: Confirm the repository is readable and the snapshot list covers the indexes you need before starting a restore.
- Ask for a rehearsal: Confirm that restores have been tested on a non-production cluster and time how long they take.
Before restoring, confirm which indexes are missing and whether a snapshot with the needed data exists.
Which fix fits which symptom
This table pairs each yellow or red symptom with its likely cause, the first check to run and the fix path to try. Read it by matching what the cluster health API reports to a row, then confirm the cause before changing any setting. The main takeaway is that a single-node yellow state and a red state after node loss call for very different responses.
| Symptom | Likely cause | First check | Fix path |
|---|---|---|---|
| Yellow on a single node | Replica shards have nowhere to be allocated because the cluster has only one data node | Confirm the node count and the number_of_replicas value on each index | Set replicas to 0 on development indexes, or add a data node and keep replicas for production indexes. Confirm the exact setting key for your version. |
| Yellow after a rolling restart | Replicas are waiting for a node to rejoin, or recovery is still running | Check the cluster health API and the recovery status for the shards in question | Wait for recovery to finish if progress is moving. If it stalls, check node logs and allocation explain output before forcing anything. |
| Red after losing a node | A primary shard was held only on the lost node and has no current replica to promote | Identify the unassigned primary indexes and whether the lost node's data directory still exists | Restore the node if possible. If the data is gone, restore affected indexes from a snapshot. Confirm the documented recovery path for your version before using any allocation command. |
| Allocation blocked by disk watermarks | Disk usage on one or more nodes crossed the low or high watermark, so new shards are not placed there | Check disk usage per node and the current watermark settings | Free space, add capacity or delete or move data according to retention. Adjust watermark values only as a temporary measure and confirm the keys for your version. |
| Shards that will not move between zones | Shard allocation awareness or forced awareness rules leave no valid target in the other zone | Check the awareness attributes on each node and the number of zones available | Correct node attributes so every zone has eligible nodes, or add capacity in the zone that lacks it. Confirm the awareness and forced awareness keys in the cluster settings docs. |
How the health status decision path runs
The path starts when an operator reads the cluster health API and gets a status of green, yellow or red. Yellow means every primary is allocated but some replicas are not, so the check moves to replica count and whether the cluster has enough nodes to host them. Red means a primary is unassigned, so the next checks are the allocation explain output and disk watermarks, since a full node can block allocation. If the cause is clear and fixable, such as a single-node replica setting or a node that has rejoined, the fix is applied and health is rechecked. If primary data is lost or allocation cannot recover it, the path ends at escalation and a snapshot restore.
Decision path from cluster health status to fix or snapshot restore.
How dedicated cluster manager nodes and allocation awareness prevent repeat yellow status
Most repeat yellow and red events trace back to a cluster that was sized as a single box or a few mixed nodes, so one node restart or one failed zone leaves replicas or primaries with nowhere to go. The OpenSearch cluster docs recommend dedicated cluster manager nodes, replicas placed on separate nodes, and shard allocation awareness for availability. Dedicated cluster manager nodes keep cluster state management away from data nodes that are busy with indexing and heavy queries, so a loaded data node is less likely to destabilize the cluster that decides where shards live. Replicas on separate nodes mean a single node loss leaves a copy of each primary elsewhere. Allocation awareness tells the cluster to spread copies across zones or racks you define, which matters when a whole failure domain goes down together.
These choices cost hardware. Dedicated cluster manager nodes are extra machines that hold no data, and a quorum-safe layout needs an odd number of them, so confirm the count with your platform team and your OpenSearch version's cluster docs. Spreading replicas across zones needs enough nodes in each zone to host the copies, and a three-zone layout with one data node per zone is a very different bill from two large nodes. Ask any partner to price the node count, storage per node and the network between zones as separate line items, and to state which of these recur monthly and which are one-time migration work.
Capacity headroom is the part teams most often underestimate. Disk watermarks stop allocation to a node before it runs out of space, so a cluster running close to its watermarks cannot re-create a lost replica even when the node count looks correct. Keep enough free disk on every data node that losing one node, and moving its shards onto the rest, does not push the survivors past the thresholds. Confirm the watermark values in your version's settings before you size storage, and test a node-loss scenario in a staging cluster rather than trusting the arithmetic alone. These controls reduce the chance of repeat yellow status, but they do not guarantee it, because misconfigured awareness attributes, under-sized zones and sudden growth can still leave shards unassigned.
Operational risks when changing allocation under pressure
During a red or yellow status, the fastest-looking fix often creates the next outage. The cards below cover the changes teams most often make under pressure, and each one connects to the access control and audit logging that should bound it.
Cutting replicas during an outage
Lowering number_of_replicas on an index can turn a yellow status green by removing the unassigned copies from the picture, but it also removes the redundancy that would protect data if a node fails next. Before changing replica counts, record the current values per index and confirm which node or disk loss you are guarding against. Restore the original values once the cluster recovers, and confirm the change in the audit log so the incident record shows who made it and when.
Clearing blocks without freeing space
Removing the read_only_allow_delete block while disk usage is still above the flood stage watermark makes the index writable again, and the next indexing burst can push the node back into the same block. Free space first by deleting or moving data, confirm usage is below the watermarks on every data node, and only then clear the block. Treat the block as a symptom, and check the disk trend that caused it.
- Flood stage watermark
- 95 percent
Restarting nodes without checking shard state
Restarting a data node while a primary shard is unassigned or a recovery is running can extend the red status and trigger more shard movement than the cluster can absorb. Before any restart, check the cluster health API and the shard allocation view to see which shards live only on that node. Restart one node at a time, and wait for the cluster to return to at least yellow before moving to the next node.
Using admin credentials broadly
Responders often share a single admin certificate or account during an incident, which makes it hard to tell which changes were deliberate and which were mistakes. The Security plugin supports role-based access control, so give responders a role limited to the cluster health, allocation explain and settings endpoints they need. Keep admin access behind a documented break-glass procedure, and review audit logs after the incident to confirm every privileged change had a named owner.
Security plugin docsQuestions buyers ask about fixing cluster health
How long does it take to fix a red or yellow OpenSearch cluster?
The duration depends on what is blocking allocation, not on the color itself. A single-node cluster that shows yellow because replicas have nowhere to go can often be corrected with a settings change, while a red cluster with unassigned primaries may need node recovery, disk cleanup or restoring data from a snapshot. The drivers to assess are the number of unassigned shards, the size of the shards that must recover, whether the failed node can return, disk headroom on the remaining nodes, and whether snapshots are current. Ask any partner to scope the fix after a read-only review of the allocation explain output, and to state in writing which steps need a change window.
Can our internal team fix cluster health without outside help?
Often yes, for the common causes. Teams that already run the cluster can check cluster health, list unassigned shards, read the allocation explain output and correct replica settings on a single-node or undersized cluster. Outside help is most useful when the cause is unclear, when primaries are unassigned on a cluster with no recent snapshot, or when the fix touches node roles, shard allocation awareness or disk layout. Confirm internally who has cluster admin access, who can approve a restart, and whether anyone has practiced recovery before an incident forces the question.
What access and information does a health fix need from us?
A fix needs read access to cluster health, node stats, shard allocation and the allocation explain API, plus an admin certificate or user with cluster-level privileges for any change. It also needs the cluster's deployment method, node roles, disk usage per node, index lifecycle and snapshot configuration, and the most recent snapshot status. Plan a change window for node restarts, shard movement and any setting that alters allocation. Ask the partner which accounts they will use, how changes are logged, and how access is removed when the work ends.
Can a red OpenSearch cluster be fixed without losing data?
It can often be fixed without loss when the missing primary shard's data still exists on a node that can rejoin, or when a current snapshot is available for restore. Data loss is most likely when a primary is unassigned, no node holds its copy, and no snapshot covers the index. Before any forced allocation or deletion, confirm which indices are affected, take a snapshot if the cluster still serves reads, and record the explain output. Forced allocation of an empty primary discards that shard's data, so it should be a last step with explicit sign-off.
When should we bring in a partner for a cluster health incident?
Bring in a partner when the cluster is red, the cause is not clear after a first pass of allocation checks, or the fix would be a forced allocation or a restore that changes live data. A partner is also useful when the incident exposes a gap in capacity, disk watermarks or backup coverage that the internal team cannot close during the outage. Agree the scope in writing before work starts, including who has access, what changes are permitted and what evidence is delivered. Fixed-scope engagements are the usual format for this work at DeployOpen, with ongoing support available as a retainer.
What does a cluster health review cover after the fix?
A health review checks the settings and conditions that caused the status change so it does not recur. Typical items are replica counts for each index, dedicated cluster manager nodes, shard allocation awareness across zones or racks, disk watermark headroom, snapshot repository and schedule health, and whether index lifecycle policies are creating shard counts the cluster cannot hold. The review should end with a written list of findings, the changes made, and the monitoring alerts that would warn of a repeat. Ask for the review to be run against the production cluster, not a copy, and for alert thresholds to be confirmed with your own operations team.
How DeployOpen scopes and supports cluster recovery work
DeployOpen plans, implements and hardens self-hosted OpenSearch inside your own cloud accounts, data centers or air-gapped networks, so the cluster that goes red or yellow is one your team can inspect, change and audit. For a recovery engagement, the useful outcome is not only a green status but a cluster whose node roles, replica counts, shard allocation awareness and disk thresholds are documented and can be reproduced. Recovery work is scoped against that baseline: which indexes are affected, which nodes and storage tiers are involved, and whether the cause is configuration, capacity or node loss.
Engagements are fixed-scope. Before any work starts, the scope, deliverables and timelines are agreed in writing, and that document states what is in and out, such as whether the work includes reviewing allocation settings, adjusting replica counts on single-node test clusters, correcting disk watermark configuration, or rebuilding a failed node. DeployOpen does not publish a price list, so the quote follows from that written scope. Ask for the scope to name the cluster version, the environments covered and the access your team will grant, since those drive the effort more than the color of the status.
Once the cluster is healthy, the handover includes runbooks written for your operators: the checks to run when status changes, who acts on which signal, and the change record for settings that were altered. Ongoing support, upgrades and continuous testing are available as retainers, which suit clusters where a yellow status recurs after capacity or policy changes. Confirm with DeployOpen which runbook formats and support hours are included in your written scope before you sign.

