Skip to content

Designing OpenSearch Cluster Monitoring and Incident Response

Interactive Diagram

새 탭 ↗

Creating many monitors in OpenSearch Alerting does not make root causes quicker to find. A yellow cluster can mean missing replicas, while red can mean lost primary shards. Node disk utilization is not an immediate outage, but crossing allocation watermarks can block new shard placement and recovery. An Alert must narrow an operator’s next action, not merely copy a status.

This article connects the Cluster → Node → Index → Shard observation hierarchy to Alert lifecycle and incident response. Designing Integration Alerting and Metrics covers business Events and Interface Errors; this article covers availability and capacity of the search cluster itself.

PlantUML Diagram

A monitor must be a versioned object with input, condition, duration, severity, grouping key, and notification policy. Sending the same message every time a threshold is crossed lets transient spikes and planned rolling updates overwhelm on-call staff. Alert history must separately represent whether the signal persists, shares a root cause, or is already acknowledged.

_cluster/health is a quick starting point, but color alone must not determine incident severity.

StateGeneral meaningFirst checkDefault response
GreenAll primaries and replicas assignedBaseline metricObserve
YellowPrimaries assigned, some replicas unassignedReplica count, node count, planned maintenanceTime-bound warning or maintenance suppression
RedOne or more primaries unassignedAffected indexes, data availability, recent node lossImmediate page and allocation investigation

Even in yellow, another failure of the primary node without a replica can turn data availability red. Conversely, a brief yellow after a rolling upgrade can be automatic recovery. Do not page on status != green alone. Evaluate status, duration, affected primaries, maintenance window, and index criticality together.

{
"monitor": "cluster-health",
"input": { "path": "_cluster/health" },
"trigger": {
"warning": "status == 'yellow' for 10m outside maintenance",
"critical": "status == 'red' or unassigned_primary > 0"
},
"group_by": ["cluster", "status"],
"dedup_window": "15m"
}

This describes policy shape. Verify concrete monitor syntax and metric fields against the OpenSearch Alerting version in use. A production incident message needs only actionable context such as cluster name, status, first-observed time, affected-index count, and runbook link; it must not contain customer payloads or credentials.

Watch node pressure before allocation fails

Section titled “Watch node pressure before allocation fails”

_nodes/stats and _cat/allocation are baseline sources for CPU, JVM heap, filesystem, and shard-skew observation. Thresholds come from workload and node-class baselines, not universal product constants.

SignalWhy observe itAlert design
Disk used / watermarkAllocation, merge, and relocation headroomCheck growth rate and free bytes together
JVM heapEarly sign of GC pressure and query/indexing failureCombine sustained usage and GC time
CPUIngest/query saturationInterpret with queues and rejected requests
Thread-pool rejectionRequests are already rejectedGroup as an immediate impact signal
Shard count per nodeSkew and recovery blast radiusUse as capacity-planning signal

Making 75% disk usage universally critical treats a large-disk node and a small-disk node as the same risk. Use percentage, absolute free space, growth trend, and high/flood-stage watermarks together. If writes continue while disk is high, shard relocation itself can consume more disk and network and worsen the condition, so a runbook needs retention/rollover and ingest-throttling options.

For JVM heap, sustained duration, old-generation pressure, GC pause, and rejected requests matter more than one sample. Restarting blindly because heap is high can worsen an incident with shard recovery and cache warm-up. First distinguish query surges, aggregation cardinality, shard imbalance, and potential memory leaks.

The same metric means different things per node pool. Reading only a cluster average hides saturation on one side behind headroom on another.

Node poolResource that saturates firstWhat the signal actually means
Hot dataDisk write, merge I/O, heapIngest rate exceeded rollover and merge headroom
Cold dataDisk capacity, relocation networkRetention window or transition rate does not match tier capacity
Cluster-managerHeap, cluster-state update latencyShard/index count is high or pending tasks accumulated
Ingest/coordinatingCPU, thread-pool rejectionBulk intake or search fan-out exceeded tier capacity

The table is only usable if Alerts carry a node-pool label. A single disk > 80% message cannot distinguish a case needing ingest throttling from one needing more Cold-tier capacity.

Indexes and shards are data-availability boundaries

Section titled “Indexes and shards are data-availability boundaries”

_cat/indices, _cat/shards, and _cluster/allocation/explain narrow why an index cannot allocate. UNASSIGNED is a state, not one root cause.

OpenSearch cluster with two nodes where primary and replica shards of two indexes are placed on different nodes Source: OpenSearch docs, Intro to OpenSearch, OpenSearch contributors, Apache-2.0

SymptomPossible causeFirst diagnosis
Unassigned replicaToo few nodes, allocation filter, disk watermarkAllocation explanation, node tier
Unassigned primaryNode loss, corrupt shard, restore requiredAffected index, last snapshot, recovery log
Long-running relocating shardDisk/network pressure, throttling, large shardRelocation bytes, target disk, recovery rate
Red indexPrimary unavailableWrite/read impact and restore path
Write failure after rolloverTemplate/policy/allocation mismatchWrite index and ISM explain

A replica promotion does not mean recovery is complete. Fault tolerance remains lower until a new replica is built. An Alert must not stop at unassigned shard exists; include primary/replica distinction, index criticality, and allocation reason. Conversely, if hundreds of replicas are briefly unassigned by one node drain, group them into one incident rather than sending one notification per shard.

Separate Alert lifecycle from notification

Section titled “Separate Alert lifecycle from notification”

Do not put Alert creation and channel delivery in one transaction. Alert history can be stored while a webhook fails, and monitor evaluation must continue while delivery retries.

StateMeaningOperating action
OPENCondition newly metStart notification and triage
ACKNOWLEDGEDOwner confirmedSuppress duplicate page, continue investigation
SUPPRESSEDMaintenance or known issueKeep history, suppress page
RESOLVEDRecovery condition metSend recovery notification and retain evidence
ESCALATEDSLO or duration exceededCall a higher on-call tier

Choose a grouping key close to the root cause. (cluster, status) can fit a cluster-health Alert, while a node-disk Alert may need (cluster, node). Include a time window in a dedup key so the same condition does not create a new history row every evaluation. Do not hard-code internal service hosts, static tokens, or vendor endpoints in monitor configuration; use secret references and a separate notification adapter to isolate rotation, audit, and retry.

Separate read-only inspection from destructive changes in Dev Tools.

GET _cluster/health
GET _cat/allocation?v
GET _cat/shards?v&s=state
GET _nodes/stats/fs,jvm,process
GET _cluster/allocation/explain

These commands are the start of symptom inspection. Do not make DELETE _data_stream/..., system-index deletion, forced allocation, or policy-state changes the “first command” in a runbook without incident-commander approval and backup verification. Excess Alert history signals a need to examine retention, notification loops, and monitor conditions before deleting a history index.

  1. Confirm whether the Alert persists outside maintenance suppression and whether grouping identifies the same root cause.
  2. Inspect primary availability and affected-index scope through cluster health.
  3. Narrow the cause with node disk, heap, CPU, network, recent rollout, and allocation explanation.
  4. Choose the least-impacting action among write throttling, replica recovery, capacity extension, and snapshot restore.
  5. After recovery, inspect not only Green status but replica rebuild, ISM progress, ingest backlog, and search error rate.
  6. Record timeline, chosen action, data-loss status, and follow-up capacity or rule improvement in incident history.
  1. Intentionally unassign a replica in a test cluster and confirm expected warning/critical grouping.
  2. Inject synthetic disk growth and node pressure, then confirm duration, throttle, and escalation behavior.
  3. Run a planned rolling restart inside a maintenance window and confirm suppression keeps history while preventing a page.
  4. Temporarily stop the notification adapter and confirm Alert history and delivery retry are recorded independently.
  5. After a restore drill, verify cluster health, shard allocation, Data Stream writes, and query latency return to baseline.

OpenSearch monitoring is not sending green/yellow/red by email. Cluster health expresses availability, node pressure expresses capacity, indexes and shards express data placement, and Alert lifecycle expresses the boundary for human response. Designing these signals with duration, grouping, suppression, and runbooks separates planned-change noise from real primary loss and turns basic alarms into repeatable incident response.

This article connects the capacity signals in Designing OpenSearch Hot/Cold Storage and Index Lifecycles on Kubernetes, the identity boundaries in Configuring OpenSearch TLS and Least-Privilege RBAC on Kubernetes, and the application signals in Designing Integration Alerting and Metrics into one operating flow.