Fixing Elasticsearch cluster health in Security Onion starts with reading the status
When analyst searches are slow or failing, or the grid reports a status other than green, start by reading the cluster status before changing anything. Security Onion checks Elasticsearch health with so-elasticsearch-query _cluster/health?pretty run on the manager, which returns the cluster status along with counts of active, relocating, initializing and unassigned shards. A Pending status usually means unassigned replica shards, and the usual fix is to set replicas to 0 on the affected indices. That fix trades redundancy for availability, so confirm which indices are affected and why their replicas cannot be placed before you apply it. A red status means primary shards are missing, which is a different and more serious problem, and a yellow status means replicas are unassigned while all primaries are available.
This page covers how to read those states and work through the common causes: shard counts and sizes, the field limit (default 5000) and the max_clause_count error that cites 3500, heap size, and disk watermarks that stop shard allocation or ingest. Each cause points to a different setting, so the status output tells you which check to run next. Plan to capture the health output, the node list and disk usage on each search node before you change any setting, so you can compare results afterward. Confirm the current Elasticsearch version and any setting names against the Security Onion Elasticsearch documentation for your release, since field and watermark behavior can differ between Security Onion versions.
This page does not cover backup and restore, setting up log retention with DLM or ILM, or removing and replacing a node. Those tasks have their own pages in this group, and a red status on a grid that also has a failing search node may point you there. If the cluster does not return to green after the checks here, open a support request with the health output and node details rather than deleting indices or forcing shard allocation, because data loss in a security log store is hard to reverse.
How the triage path moves from cluster status to root cause
The triage path starts with so-elasticsearch-query _cluster/health?pretty and branches on the reported status. Yellow usually points to unassigned replica shards, which the Security Onion docs address by setting replicas to 0 on affected indices. Red means primary shards are unavailable, so the next checks are shard counts and sizes, field limit errors (default limit 5000, with max_clause_count raised for expansion errors citing 3500), heap pressure and disk watermarks. Treat this as a general triage path, not a guaranteed sequence: each branch ends in a fix followed by a fresh health check.
General triage path from cluster health status to likely cause and re-check.
Which checks separate the common causes of non-green status
A red or yellow status has several distinct causes, and each one points to a different fix. Run these checks in order and record what each returns before you change any index, replica or setting. The first check you can usually answer from one command, while the rest depend on what the first one shows.
Unassigned replica shards
A Pending status usually means replica shards cannot be assigned to a node. Run so-elasticsearch-query _cluster/health?pretty and note the count of unassigned shards, then list which indices they belong to. Confirm how many data nodes are online and whether a node was recently removed or rebooted, because a replica needs a second node to live on. Setting replicas to 0 on affected indices is the documented fix, but it removes redundancy, so decide that deliberately.
Field expansion and field limit errors
Errors that cite field expansion or a limit of 3500 often point to a query that touches more fields than the cluster allows. The Security Onion field limit defaults to 5000, so confirm the current value on your grid before adjusting anything. Identify which analyst query or dashboard produces the error, since a broad wildcard search is the usual trigger. Raising max_clause_count is the documented remedy for the 3500 message, and it should follow confirmation that the query itself is reasonable.
Shard count and shard size
Many small shards or a few oversized ones both slow cluster health and recovery. List shard counts per index and per node, and compare sizes against the data retained for your deployment type. A growing shard count often follows a change in retention or index rollover, so check that first. Confirm the sizing guidance in the Elasticsearch documentation for your version before consolidating or splitting indices.
Node roles docsHeap size pressure
Heap pressure shows up as slow responses, garbage collection pauses and nodes that drop out and rejoin, which can turn green into yellow for a while. Check heap usage per node and confirm the configured heap against the node's RAM, since the hardware minimums for search and manager nodes differ from sensors. Do not raise heap blindly on a host that also runs other services. Confirm the node's memory allocation with your Security Onion deployment type before editing any setting.
- Minimum search node RAM
- 16 GB
Disk watermarks that stop ingest
Elasticsearch applies disk watermarks that stop shards from being allocated and can halt ingest when a node runs low on space. Check disk usage on every data node before reviewing indices, because a single full node can leave replicas unassigned and make status look like a shard problem. Confirm which watermark is breached and whether retention or PCAP storage is consuming the space. Freeing space or changing retention should come before changing watermark thresholds.
Hardware docsWhich fix fits which symptom
This table pairs each common cluster health symptom with the fix that usually addresses it, when that fix fits, what it gives up and what to verify afterward. Read it from the symptom column, then confirm the diagnosis with so-elasticsearch-query _cluster/health before changing any setting, because several fixes trade redundancy or capacity for a quicker return to green or yellow.
| Symptom | Fix | What it trades away and what to verify |
|---|---|---|
| Pending or yellow status with unassigned replica shards | Set replicas to 0 on the affected indices | Removes copies of that data, so a node loss can mean data loss. Verify unassigned shard count falls and the affected indices show the intended replica count. |
| Field expansion errors citing a limit of 3500 | Raise max_clause_count as documented for Security Onion | Larger queries use more heap and CPU on search nodes, so slow analyst queries may appear. Verify the failing query runs and watch heap use during a typical search session. |
| Field limit errors with the default 5000 limit | Review index mappings and the number of fields before changing limits | Raising the field limit increases mapping size and cluster state. Verify the field count per index and confirm the change is needed for a specific index pattern. |
| Heap pressure, slow queries or frequent garbage collection | Adjust Elasticsearch heap size within the node's memory | Heap set too high leaves less memory for the operating system file cache, and too low slows queries. Verify heap use and query latency after a restart, one node at a time. |
| Writes blocked or shards not allocating near disk limits | Free disk space above the disk watermarks, or extend storage | Deleting or shrinking retained data reduces investigation history. Verify free disk is back above the watermark thresholds and that new indices allocate. |
| Too many small shards or high shard count per node | Reduce shard count through index design, rollover or consolidation | Reindexing or changing shard counts takes time and disk space and can disrupt ingest. Verify shard count per node and the health of rebuilt indices before removing old ones. |
| Red status with a primary shard missing | Restore the missing data from an Elasticsearch snapshot or the node that holds it | Setting replicas to 0 does not repair a red index. Verify which node holds the primary, confirm the snapshot is usable and check that the index returns to a healthy state. |
How to run the health check and apply a fix safely
This sequence turns a red or yellow Elasticsearch status into a documented, reversible change that is confirmed from the analyst side. Each step produces evidence you can attach to a change record before anything in the index settings is modified.
Capture the current cluster health output
Run so-elasticsearch-query _cluster/health?pretty on the manager or search node where the query tool is available, and save the full output to your change record with a timestamp. Record the status value (green, yellow, red or Pending), the number of nodes, and the counts of active, relocating, initializing and unassigned shards. This snapshot is your baseline, so you can show later what changed. Done when the output is saved and you can state the status in one sentence.
Identify unassigned shards and affected indices
List the shards that are not assigned and map them to their indices, using the shard and index listing endpoints available through so-elasticsearch-query. Note whether the unassigned shards are primaries or replicas, because the two have different risks. A Pending status usually points to unassigned replicas, but confirm this from the listing rather than assuming it. Done when you have a written list of affected index names and the shard type for each.
Confirm node layout and recovery requirements
Check how many data nodes the grid has and which of them hold each affected index. Ask the owner of your recovery plan whether losing replicas is acceptable for these indices, and whether any data on them is needed for cases or evidence. Setting replicas to 0 removes redundancy, so this decision belongs in the change record, not only in the admin's head. Done when the owner has approved either setting replicas to 0 or a different fix, such as restoring a missing node, and the decision is recorded.
Apply the change to specific indices only
Apply the agreed setting to the named indices, not to all indices, using the settings update the Security Onion Elasticsearch documentation describes for replicas. Keep the command and its target list in the change record exactly as run. Avoid broad wildcard changes that touch indices you did not list, since some system indices may be managed separately. Done when the command returns an acknowledged response for each targeted index.
Re-check cluster health after the change
Run so-elasticsearch-query _cluster/health?pretty again and compare it with the baseline from step one. Confirm the unassigned shard count has dropped, and that the status has moved toward green or the expected yellow if you deliberately removed replicas. If the status is still red or unassigned shards remain, stop, do not repeat the change blindly, and look at the allocation explanation before going further. Done when the new output is saved beside the baseline.
Confirm analysts can query the data
Have an analyst run a known search in the Security Onion Console against a recent time window and one of the affected indices, and check that results return without errors. Also check that field expansion errors, such as those citing the 3500 clause limit, do not appear for normal queries. Record the search, the time window and the result count. Done when the analyst confirms the search returns expected results and the record is filed.
Record the outcome and schedule the root cause review
Write down the final health output, the change applied, the approver and any shards you knowingly left without replicas. Add a follow-up item to find the underlying cause, such as a node that dropped out, disk pressure, or a sizing problem, because a setting change only treats the symptom. Done when the change record links the baseline, the post-change output and the follow-up task.
Why setting replicas to 0 changes your recovery position
Setting replicas to 0 is the fastest way to turn a yellow status green, and it works by removing redundancy. A replica shard is a second copy of data held on another node. While it exists, a node failure leaves the data searchable and recoverable from the surviving copy. Once replicas are set to 0, each primary shard exists only once, so losing the node that holds it means losing that data until it is restored from a snapshot or rebuilt from the source. The status goes green because Elasticsearch no longer has any copies it expects to place, not because the data is safer. Before running the change, confirm with so-elasticsearch-query _cluster/health?pretty which indices are affected and whether any of them hold case data or evidence you cannot easily regenerate.
The change also interacts with the grid's dependency on the manager. The Security Onion architecture docs state that if the manager goes down, search nodes stop indexing because they cannot reach Redis. So a search node problem and a manager problem can both interrupt ingest, and a green cluster with no replicas can still lose data during the window when a node is down and the pipeline is stalled. Your recovery position depends on the whole grid, not on Elasticsearch alone. Check how often your snapshots run, how long a search node rebuild would take in your environment, and what happens to incoming logs and PCAP while a node is offline.
This is a decision for your architecture owner, not something to settle during an incident alone. During an outage, the pressure is to clear the status quickly, and that pressure favors the fastest option. Agree in advance who can approve setting replicas to 0, which indices may be changed, how long the reduced redundancy may last, and when replicas are restored once the missing nodes return. Record that decision alongside your backup and node replacement runbooks so the on-call engineer knows the trade-off before the alert fires.
Security and operational considerations while fixing the cluster
Changes to Elasticsearch health touch indices, nodes and the configuration that Security Onion manages, so they need controls before anyone runs a command. The four cards below cover who may make cluster-level changes, how to avoid losing data while editing indices, how manual fixes interact with Salt-managed configuration, and what the Elastic license terms allow your team to change or access.
Limit who changes cluster settings
Cluster-level commands such as replica changes, shard moves and field limit edits affect every analyst and every index on the grid. Decide in advance which administrators may run so-elasticsearch-query against write endpoints and who approves a change. Record each change with the time, the operator, the command and the reason, in a ticket your audit process can read. Check whether your Security Onion release and role model give you the separation you need, and confirm how Security Onion Pro's Console and API handle access before you grant it.
Protect data before editing indices
Setting replicas to 0 removes redundancy, so a node failure during that window can leave data unprotected. Take an Elasticsearch snapshot of affected indices before any index-level edit, and confirm the snapshot repository is reachable and has space. Avoid deleting indices to clear red status unless you have verified that the data is expendable or restorable. Keep the replica change temporary and restore replicas once the cluster is healthy, with a dated note in your change record.
Keep manual fixes out of Salt conflicts
Security Onion applies its configuration through Salt, so hand edits to Elasticsearch files or runtime settings may be overwritten on the next apply or conflict with a stored override. Record every manual change and decide whether it belongs in a supported local Salt override or should be reverted after the incident. Do not layer Puppet, Chef or other configuration tools over the same Elasticsearch files, because two managers will fight over the same settings. Review config audit history after each change to confirm what was applied.
Architecture docsCheck Elastic license terms first
Elasticsearch and Kibana are available under three licenses, and the default distribution is the Elastic License 2.0, which is source-available rather than OSI-approved. Security Onion itself is also under the Elastic License 2.0. Confirm with your legal team what your use permits, especially if you plan to modify source, redistribute or offer the stack to third parties. Also confirm which subscription tier, if any, provides the security features you rely on, because some are limited to paid tiers.
- Elastic license options
- 3
Which Elasticsearch licensing and support questions affect your fix
Before you change anything in the cluster, confirm which license terms apply to the stack you run. The Security Onion repository is licensed under the Elastic License 2.0 (ELv2), which is source-available rather than an OSI-approved open-source license. Elasticsearch's default distribution is under the same license. Elastic also offers its source under SSPL 1.0 and AGPLv3, and AGPLv3 is the option Elastic added to provide an OSI-approved choice. Your legal and procurement teams should record which terms they accept for the Elasticsearch packages in your grid, since that answer governs how you can modify, redistribute or host the software.
Licensing is separate from feature access. Elastic's subscription page places single sign-on, attribute-based access control, field- and document-level security, encryption at rest support and FIPS 140-3 mode among its security features, and states that anomaly-detection alerting is limited to its Platinum and Enterprise tiers. Basic-tier security features such as TLS, the file and native user realms and role-based access control have been free since 2019, but other items may not be. Before you rely on a feature while diagnosing or fixing cluster health, such as a role used by an analyst account or a certificate setting, confirm with Elastic's current subscription terms and with your own configuration that the feature is available on your tier. The Elastic subscriptions page is the place to start that check.
Support timing also affects the fix. Elastic publishes end-of-life dates for each major line, so confirm the Elasticsearch version your grid runs against the Elastic product end of life dates before you plan a change. A version that is nearing end of maintenance may need an upgrade, which changes the fix you choose. Confirm with your Security Onion release notes which Elasticsearch version your grid's release ships, and record the answer in your change ticket so the diagnosis, the fix and the next upgrade are planned from the same facts.
Questions teams ask before fixing Elasticsearch health
What does fixing Elasticsearch cluster health cost?
The cost is mostly the time of the people doing the triage, the change work and the verification, so it moves with what is wrong and how the grid is run. Ask for a quote built from a written scope that names the grid size, how many indices are affected, whether the cause is replica assignment, shard sizing, field limits, heap or disk watermarks, and whether a capacity change is needed. A quick fix such as setting replicas to 0 on a few indices is a small job. Raising hardware or redesigning shard layout is a larger one, and it recurs as the grid grows. DeployOpen does not publish a price list; a quote follows from the written scope.
What makes the effort go up or down?
Effort rises with the number of nodes in the grid, the number of indices in a red or yellow state, and whether the cause is a configuration problem or a real capacity limit. Change control adds time, because every edit to a live cluster needs a window, a rollback plan and an approver. Field expansion errors citing 3500 and the default field limit of 5000 are quick to diagnose, but raising max_clause_count is only the first step if the underlying index design is the problem. Heap and disk watermark issues often point to hardware or retention settings, which take longer to resolve than a replica change.
How long does a typical triage take?
No duration is fixed for this work, so ask for one in the written scope rather than relying on a general figure. Triage time depends on how quickly you can run so-elasticsearch-query _cluster/health?pretty and collect shard and index data, how many nodes must be checked, and whether the fix needs a change window. A Pending status usually points to unassigned replica shards, which is often the fastest path to a result. Causes that involve shard counts, sizes or retention take longer because each change must be verified against ingest and search load before the grid is signed off.
What do you need from our team to start?
The work needs read access to the Security Onion manager and the search nodes, a way to run the Elasticsearch query helper, and a copy of the current grid layout and settings. Change windows matter, because some fixes touch live indices, and a named owner on your side must approve changes and confirm the grid recovers. Ask your team to confirm the Security Onion version, the deployment type and any local Salt overrides before the work begins, so changes are not overwritten later. Backups should be confirmed before any index change, and the owner should know who receives the findings and the final health readings.
Can our own team fix Elasticsearch health without a partner?
Yes, many teams can handle a simple unassigned replica problem internally, provided they have shell access to the manager, a clear rollback plan and someone who understands Elasticsearch shard allocation. The harder cases are shard sprawl, heap pressure, disk watermarks and retention interactions, because a fix in one area can hide or worsen another. If your staff have not worked with Elasticsearch clusters before, or if red status recurs after a fix, a partner can help diagnose the root cause and document the change. Confirm internally whether the grid is production, since that changes how much risk your team can accept during repair.
When should we bring in an outside partner?
Bring in an outside partner when the cluster stays red or yellow after a basic fix, when the cause appears to be capacity rather than configuration, or when your team lacks time or Elasticsearch experience during an incident. A partner is also useful when change control requires an independent written record of findings and rollback steps. DeployOpen implements and supports self-hosted open-source platforms in your own infrastructure, and most engagements are fixed-scope, with scope and timelines agreed in writing before work starts. Ask for the deliverables in writing, including the health readings before and after.
What should change after the cluster is healthy again?
After a fix, the cluster should be monitored so the same problem does not return unnoticed. Review the retention settings for data streams, because growing indices and disk pressure often cause the next red status. Check whether the field limit and heap settings still match the data volume, and confirm that disk watermarks will stop ingest before the disk fills. Keep a written record of the change, the readings before and after, and who approved it. Ask whether your grid needs ongoing monitoring or a retainer for continuous review, since that work recurs rather than ending at the fix.
How DeployOpen scopes and supports Elasticsearch health work on Security Onion
DeployOpen approaches Elasticsearch health on Security Onion as a bounded piece of work inside your own infrastructure. We start from the cluster state you actually see, agree the scope in writing, and hand your team the diagnosis, fixes and runbook they need to keep the cluster green.
How we scope
- Review the current cluster status, shard layout, node roles and grid topology before proposing any change.
- Agree in writing which indices, nodes, heap settings and retention rules are in scope for the engagement.
- Confirm with your team which replica, field limit and disk watermark changes you will approve before work starts.
How we build
- Run the so-elasticsearch-query health checks and record unassigned shards, shard counts and sizes as a baseline.
- Apply agreed fixes such as replica adjustments, max_clause_count changes and heap sizing in a controlled sequence.
- Test analyst searches and dashboards after each change to confirm that queries and ingest work as expected.
How we hand over
- Deliver a written findings report that explains each cause, the change made and the evidence behind it.
- Document the health checks, thresholds and rollback steps so your operators can repeat them without us.
- Walk your platform and security teams through the runbook and confirm which items they will own going forward.
How we support
- Engagements are fixed-scope, and the scope, deliverables and timelines are agreed in writing before work starts.
- Ongoing support, upgrades and continuous testing are available as a retainer if your grid needs regular review.
- Ask any quote to itemize the scoping, build, handover and retainer components so you can compare them with your own team's effort.

