How to Design a Wazuh OpenSearch Shard Allocation Strategy

As Wazuh deployments grow from a few hundred monitored endpoints to thousands of servers, workstations, cloud workloads, containers, and network devices, OpenSearch quickly becomes one of the most critical components of the entire security platform. Every alert generated by Wazuh is ultimately indexed in OpenSearch, making its performance directly responsible for search speed, dashboard responsiveness, threat hunting efficiency, and long-term data retention.

One of the biggest factors influencing OpenSearch performance is shard allocation.

Poor shard allocation can leave some nodes overloaded while others remain underutilized, causing slow searches, excessive JVM memory consumption, long recovery times, and unstable cluster health.

A well-designed shard allocation strategy distributes data evenly across the cluster, improves resilience, and ensures that Wazuh continues performing efficiently as data volumes increase.

Organizations often discover that simply adding more hardware does not solve performance problems. Without an intentional shard strategy, additional nodes may provide little benefit because data distribution remains uneven.

Understanding how OpenSearch allocates primary and replica shards is therefore essential for building scalable Wazuh environments.

In this guide, you’ll learn:

  • How OpenSearch fits into the Wazuh architecture
  • How shards and replicas work internally
  • Which infrastructure components influence shard allocation
  • Best practices for designing shard layouts for small, medium, and enterprise deployments
  • Common shard allocation problems and how to avoid them
  • How to monitor, optimize, and rebalance shard allocation as your environment grows

Understanding these concepts will help you build a faster, more resilient Wazuh deployment capable of handling increasing volumes of security telemetry while maintaining consistent search performance.


Understanding Wazuh OpenSearch Architecture

Before designing an effective shard allocation strategy, it’s important to understand how OpenSearch functions within a Wazuh deployment.

Shards do not exist in isolation, they store the security data generated by Wazuh, and their allocation directly affects every stage of alert indexing and retrieval.

What Is OpenSearch in Wazuh?

OpenSearch serves as Wazuh’s search and analytics engine.

It stores every indexed security event, making alerts searchable through the Wazuh Dashboard and available for dashboards, visualizations, threat hunting, compliance reporting, and forensic investigations.

Rather than keeping alerts inside the Wazuh Manager, the manager forwards processed events to OpenSearch through Filebeat.

OpenSearch then indexes the data into one or more indices, which are divided into shards and distributed across cluster nodes.

This architecture separates security event processing from data storage, allowing each component to scale independently.

Related Guide: How to Build a Wazuh Indexer Cluster

OpenSearch’s Role in Storing Alerts

Every detection generated by Wazuh eventually becomes a searchable document inside OpenSearch.

Examples include:

  • Authentication failures
  • Malware detections
  • File Integrity Monitoring (FIM) events
  • Vulnerability scan results
  • Cloud audit logs
  • Windows Event Logs
  • Linux audit events
  • Network intrusion alerts
  • Compliance scan results

Instead of storing everything in one massive database, OpenSearch organizes these documents into indices, which are then divided into primary and replica shards.

This distributed architecture enables OpenSearch to index millions, or even billions, of security events while maintaining fast search performance.

Security Events and Indexed Data

Each indexed document contains structured fields that allow analysts to search efficiently.

Common indexed fields include:

  • Timestamp
  • Agent ID
  • Hostname
  • Rule ID
  • Rule level
  • Event category
  • Decoder
  • Source IP
  • Destination IP
  • Username
  • MITRE ATT&CK mappings
  • File paths
  • Process names
  • Hashes

Because every field becomes searchable, OpenSearch can quickly answer queries such as:

  • Show all failed SSH logins
  • Find malware alerts from the past 24 hours
  • Search for PowerShell execution
  • Display ransomware-related events
  • Identify vulnerable hosts

The efficiency of these searches depends heavily on how data is distributed across shards.

Relationship Between Wazuh Manager, Filebeat, and OpenSearch

The Wazuh ecosystem consists of several independent services that work together.

The Wazuh Manager receives logs from agents, decodes events, evaluates rules, generates alerts, and performs active responses.

Filebeat collects generated alerts from the manager and securely forwards them to OpenSearch.

OpenSearch indexes those alerts and stores them for querying.

Finally, the Wazuh Dashboard retrieves indexed data from OpenSearch to display dashboards, visualizations, alerts, and search results.

This separation allows organizations to independently scale managers, indexers, and dashboards as data volumes increase.

Related Guide: Wazuh Filebeat: A Step-by-Step Setup Guide

How Data Flows Through Wazuh

Understanding the complete data flow helps explain why shard allocation directly impacts dashboard responsiveness and indexing throughput.

Agent → Manager

Wazuh agents continuously collect security information from monitored endpoints.

Examples include:

  • Windows Event Logs
  • Linux audit logs
  • Syslog
  • Application logs
  • File integrity changes
  • Registry modifications
  • Vulnerability scan data

Agents securely transmit this information to the Wazuh Manager using encrypted communications.

Manager → Filebeat

After receiving events, the Wazuh Manager:

  • Decodes incoming logs
  • Matches detection rules
  • Generates alerts
  • Enriches event metadata
  • Writes alerts to local JSON files

Filebeat monitors these alert files and prepares them for indexing.

Filebeat → OpenSearch

Also, Filebeat sends alerts to OpenSearch using the Bulk API, which indexes multiple documents in a single request for improved performance.

Large environments may process thousands of alerts per second. OpenSearch distributes incoming documents across primary shards according to the index’s routing algorithm.

Efficient shard allocation ensures indexing workloads remain balanced across all data nodes.

Dashboard Queries

When analysts search for alerts in the Wazuh Dashboard:

  1. The dashboard sends a query to OpenSearch.
  2. OpenSearch identifies which shards contain matching documents.
  3. Multiple nodes execute the search simultaneously.
  4. Results are aggregated.
  5. The final response is returned to the dashboard.

Because queries execute in parallel across shards, balanced shard allocation significantly reduces response times.

Components That Affect Shard Allocation

Several OpenSearch components influence where shards are placed and how efficiently they operate.

Cluster Manager Nodes

Cluster Manager nodes (formerly called master nodes) manage the overall health and state of the OpenSearch cluster.

Responsibilities include:

  • Maintaining cluster metadata
  • Managing shard allocation
  • Electing cluster managers
  • Detecting failed nodes
  • Coordinating shard recovery
  • Monitoring cluster health

They do not normally store indexed data but make the decisions about where shards should reside.

Data Nodes

Data nodes are responsible for:

  • Storing shards
  • Indexing alerts
  • Executing search queries
  • Handling aggregations
  • Managing replica synchronization

These nodes perform most of the computational work in large Wazuh environments.

As clusters grow, the number of data nodes usually determines overall indexing capacity.

Coordinating Nodes

Coordinating nodes receive client requests and distribute searches to the appropriate data nodes.

They:

  • Route queries
  • Merge search results
  • Reduce client workload
  • Improve scalability in large deployments

Dedicated coordinating nodes become increasingly valuable in enterprise-scale Wazuh environments with many concurrent dashboard users.

Ingest Nodes

Ingest nodes execute preprocessing pipelines before documents are indexed.

These pipelines may:

  • Enrich documents
  • Transform fields
  • Normalize timestamps
  • Add metadata
  • Perform geolocation lookups

Offloading preprocessing from data nodes can improve indexing performance in high-volume environments.

Dashboards

Although the Wazuh Dashboard does not participate directly in shard allocation, it is often the first component where poor allocation becomes visible.

Symptoms include:

  • Slow searches
  • Delayed dashboards
  • Timeout errors
  • High query latency
  • Missing visualizations during node failures

Many dashboard performance issues actually originate from inefficient shard placement within the OpenSearch cluster.

Related Guide: The Complete Wazuh Cluster Architecture Guide


Understanding OpenSearch Shards

Shard allocation only makes sense once you understand what shards actually are.

OpenSearch was designed to distribute enormous datasets across multiple servers instead of relying on a single machine.

It accomplishes this by dividing every index into smaller pieces called shards, allowing indexing and searching to occur in parallel.

A well-designed shard strategy improves scalability, resilience, and query performance, while a poor strategy can create bottlenecks that affect the entire Wazuh deployment.

What Is a Primary Shard?

A primary shard is the original partition of an OpenSearch index.

When an index is created, OpenSearch divides it into one or more primary shards.

Each document is stored in exactly one primary shard based on OpenSearch’s routing algorithm.

For example, an index with five primary shards distributes incoming alerts across those five partitions instead of storing everything together.

Primary shards:

  • Store original indexed documents
  • Handle indexing operations
  • Process update requests
  • Accept delete operations
  • Serve search requests

The number of primary shards is fixed when an index is created and cannot be changed later without reindexing.

What Is a Replica Shard?

Replica shards are exact copies of primary shards.

If an index contains:

  • 5 primary shards
  • 1 replica

OpenSearch creates ten total shards.

Replicas provide:

  • High availability
  • Fault tolerance
  • Additional query capacity
  • Faster search performance under heavy load

Should a data node fail, OpenSearch automatically promotes an available replica to become the new primary shard, allowing the cluster to continue operating with minimal interruption.

How Shards Improve Performance

Instead of requiring a single server to process every indexing operation, OpenSearch distributes documents across multiple shards.

This enables:

  • Parallel indexing
  • Parallel searches
  • Better CPU utilization
  • Higher indexing throughput
  • Improved scalability

As additional data nodes are added to the cluster, shards can be distributed among them, allowing indexing capacity to grow horizontally rather than relying solely on larger hardware.

According to the OpenSearch documentation, distributing indices across multiple shards enables clusters to scale well beyond the storage and compute limits of a single server while maintaining efficient query performance.

How Replicas Improve Availability

Replica shards protect against hardware failures and improve cluster resilience.

If a node hosting a primary shard becomes unavailable:

  1. OpenSearch detects the failure.
  2. A replica is promoted to primary.
  3. Cluster operations continue.
  4. A new replica is created when capacity becomes available.

This automatic failover minimizes downtime and helps maintain search availability during infrastructure failures.

How Queries Are Distributed

When a user searches from the Wazuh Dashboard, OpenSearch does not search one database.

Instead:

  1. The query is sent to a coordinating node.
  2. The coordinating node identifies relevant shards.
  3. Each shard performs its portion of the search simultaneously.
  4. Partial results are merged.
  5. The final ranked results are returned.

Because searches execute in parallel, properly balanced shards often provide significantly faster response times than a single large database partition.

Shard Recovery Process

Shard recovery occurs whenever shards must be relocated or recreated.

Common recovery scenarios include:

  • Node failures
  • Cluster restarts
  • Adding new nodes
  • Removing nodes
  • Rebalancing data
  • Restoring snapshots

During recovery, OpenSearch copies shard data between nodes while keeping the cluster operational.

Recovery speed depends on several factors, including shard size, network bandwidth, disk performance, and available system resources.

Oversized shards can dramatically increase recovery times because more data must be transferred before the cluster returns to a healthy state. Conversely, excessively small shards create unnecessary overhead and can reduce overall cluster efficiency.

Designing an appropriate shard size is therefore a key part of an effective Wazuh OpenSearch strategy.

Related Guide: How to Build a Wazuh Indexer Cluster


Why Shard Allocation Matters in Wazuh

Shard allocation is much more than an OpenSearch configuration setting, it directly affects how efficiently Wazuh ingests alerts, executes searches, recovers from failures, and scales over time.

Every security event generated by your Wazuh deployment is written to a shard, meaning poor shard distribution can impact nearly every aspect of your security operations.

As organizations monitor more endpoints, cloud services, applications, and network devices, properly allocating shards becomes essential for maintaining a responsive and resilient OpenSearch cluster.

Large Alert Volumes

Modern Wazuh deployments generate enormous amounts of telemetry.

Sources may include:

  • Windows Event Logs
  • Linux audit logs
  • Authentication events
  • CloudTrail logs
  • Kubernetes logs
  • Firewall events
  • IDS/IPS alerts
  • File Integrity Monitoring (FIM)
  • Vulnerability scan results
  • Active Response events

A deployment monitoring 10,000 endpoints can easily produce millions of indexed documents every day.

Without an effective shard allocation strategy, incoming indexing requests may become concentrated on only a few data nodes, creating CPU bottlenecks, excessive disk I/O, and indexing delays.

By distributing primary shards evenly across the cluster, OpenSearch spreads indexing operations among multiple servers, significantly improving throughput during periods of high activity.

Related Guide: Step-by-Step Wazuh Manager Scaling Guide

Search Performance

Fast searches are critical during security investigations.

When analysts investigate suspicious activity, they expect queries to return results within seconds, not minutes.

Proper shard allocation improves search performance by:

  • Distributing searches across multiple nodes
  • Reducing hotspots
  • Increasing query parallelism
  • Balancing CPU utilization
  • Minimizing disk contention

However, having either too many or too few shards can negatively affect performance.

Too many shards increase coordination overhead because each search must contact additional shard copies.

Too few shards reduce parallelism and concentrate workload onto fewer servers.

An effective strategy balances both indexing efficiency and search performance.

According to OpenSearch documentation, search requests execute in parallel across shards before being merged into a final response, making balanced shard distribution a key factor in query performance.

Cluster Stability

Poor shard allocation often leads to unstable clusters.

Common symptoms include:

  • Yellow cluster status
  • Red cluster status
  • Uneven node utilization
  • Frequent shard relocations
  • JVM memory pressure
  • Long garbage collection pauses
  • Slow cluster state updates

Clusters experiencing continuous shard movement may spend significant resources relocating data instead of processing new alerts.

Designing shard allocation carefully from the beginning helps minimize unnecessary cluster rebalancing and reduces operational overhead.

Related Guide: How to Fix a Yellow Cluster Status in Wazuh Indexer

Hardware Utilization

One of the primary goals of shard allocation is maximizing the value of your infrastructure.

A poorly balanced cluster might look like this:

NodeCPUStorage
Node A90%85%
Node B18%32%
Node C24%28%

Although sufficient hardware exists, only one node is performing most of the work.

Balanced shard allocation distributes:

  • CPU usage
  • Disk I/O
  • Memory utilization
  • Search requests
  • Indexing operations
  • Network traffic

As a result, organizations can often improve performance without purchasing additional servers simply by optimizing shard placement.

High Availability

Security monitoring systems must remain available even during infrastructure failures.

Replica shards allow OpenSearch to continue serving queries when a node becomes unavailable.

If a server hosting a primary shard fails:

  1. OpenSearch detects the outage.
  2. A replica is promoted to primary.
  3. Searches continue.
  4. Indexing resumes.
  5. A replacement replica is created once resources become available.

Without replica shards, or with poor shard allocation, a single hardware failure may leave indices unavailable until recovery completes.

For production Wazuh deployments, distributing replica shards across different physical or virtual hosts is a fundamental high-availability practice.

Disaster Recovery

Shard allocation also influences disaster recovery capabilities.

When nodes fail, clusters restart, or infrastructure is replaced, OpenSearch must recover affected shards before the cluster returns to a healthy state.

Several factors determine recovery speed, including:

  • Shard size
  • Number of shards
  • Network bandwidth
  • Storage performance
  • Available CPU resources

Oversized shards can significantly delay recovery because large volumes of data must be copied before replicas become active.

Conversely, an excessive number of tiny shards increases metadata overhead and prolongs cluster coordination.

Designing appropriately sized shards therefore improves both day-to-day performance and recovery after failures.

Organizations should also incorporate regular snapshots into their disaster recovery strategy to protect against catastrophic failures.


Planning Your Shard Allocation Strategy

Effective shard allocation begins long before an OpenSearch cluster is deployed.

Rather than choosing an arbitrary number of shards, administrators should estimate expected workloads, storage requirements, retention policies, and future growth.

Proper capacity planning reduces the need for disruptive reindexing operations and helps ensure the cluster remains performant as the environment expands.

Estimate Daily Security Event Volume

The first step is understanding how much data your Wazuh deployment generates each day.

Factors that influence daily event volume include:

  • Number of monitored endpoints
  • Operating systems
  • Installed integrations
  • Active detection rules
  • File Integrity Monitoring frequency
  • Vulnerability scanning schedules
  • Cloud service integrations
  • Network device logging
  • Application logging verbosity

For example:

Deployment SizeEstimated Daily Alerts
250 endpointsHundreds of thousands
2,500 endpointsSeveral million
25,000 endpointsTens of millions

Measuring actual event volume before scaling helps avoid overestimating or underestimating storage needs.

Calculate Expected Index Size

Alert count alone isn’t enough.

You also need to estimate how much disk space those alerts consume once indexed.

Index size depends on:

  • Document size
  • Number of indexed fields
  • Replicas
  • Compression
  • Mapping configuration
  • Stored metadata

A useful planning formula is:

Daily indexed data × retention period × (1 + replica factor)

For example:

  • 150 GB/day
  • 90-day retention
  • One replica

Estimated storage:

150 × 90 × 2 = 27 TB

This calculation provides a baseline before accounting for operating system overhead, snapshots, or future expansion.

Determine Retention Period

Retention policies directly influence shard allocation.

Organizations commonly retain security data for:

  • 30 days
  • 90 days
  • 180 days
  • One year
  • Multiple years for regulatory compliance

Longer retention periods increase:

  • Total storage requirements
  • Number of indices
  • Total shard count
  • Snapshot sizes

Instead of placing all historical data into one massive index, most Wazuh deployments use daily or monthly indices combined with lifecycle management policies.

Related Guide: How to Configure Wazuh Log Retention

Estimate Future Growth

One of the most common planning mistakes is sizing the cluster only for today’s workload.

Consider future changes such as:

  • Additional endpoints
  • Cloud migrations
  • New business acquisitions
  • Expanded compliance requirements
  • Increased logging levels
  • Additional integrations
  • Security operations center growth

Planning for growth reduces the likelihood of costly reindexing projects as data volumes increase.

A common recommendation is to reserve additional storage and compute capacity beyond current requirements so clusters can absorb unexpected growth without immediate hardware upgrades.

Choose Appropriate Shard Sizes

Shard size has a significant impact on OpenSearch performance.

Very small shards increase metadata and cluster management overhead.

Very large shards take longer to relocate, recover, and rebalance after failures.

Many OpenSearch practitioners recommend targeting shard sizes in the 10 GB to 50 GB range for general-purpose workloads, though the optimal size depends on hardware, indexing rates, query patterns, and operational requirements.

The OpenSearch project recommends validating shard sizing with benchmarking rather than relying on fixed numbers, as every workload behaves differently.

Avoid Over-Sharding

Over-sharding occurs when an index contains far more shards than necessary.

Common consequences include:

  • Increased heap usage
  • Larger cluster state metadata
  • Slower searches
  • More shard relocations
  • Longer cluster startup times
  • Higher CPU consumption

Many small shards are generally less efficient than fewer appropriately sized shards.

Avoid Under-Sharding

Under-sharding creates the opposite problem.

Too few shards can result in:

  • Uneven workload distribution
  • Reduced indexing throughput
  • CPU bottlenecks
  • Larger recovery operations
  • Limited scalability

For example, a single primary shard cannot utilize multiple data nodes simultaneously for indexing, even if additional servers are available.

The goal is to create enough shards to distribute work efficiently without creating unnecessary management overhead.


Choosing the Right Number of Primary Shards

Selecting the number of primary shards is one of the most important design decisions in OpenSearch because it determines how data is partitioned across the cluster.

Since primary shard counts cannot be changed after index creation without reindexing, administrators should make this decision carefully.

The ideal number depends on expected data volume, node count, growth projections, and search workloads rather than following a universal formula.

Small Deployments

Small environments typically include:

  • Fewer than 500 endpoints
  • One to three OpenSearch data nodes
  • Relatively low daily alert volumes

For these deployments:

  • One to three primary shards per daily index are often sufficient.
  • One replica usually provides adequate fault tolerance.
  • Simpler shard layouts reduce management overhead and conserve JVM heap.

The focus should be on maintaining healthy shard sizes rather than maximizing parallelism.

Medium Deployments

Medium-sized organizations often monitor:

  • Hundreds to several thousand endpoints
  • Multiple Wazuh Managers
  • Dedicated OpenSearch clusters

These environments benefit from:

  • Enough primary shards to utilize all available data nodes.
  • Even shard distribution across the cluster.
  • Capacity for future growth without immediate reindexing.

Periodic reviews of shard utilization help ensure that the original design continues to match operational demands as logging volumes increase.

Large Enterprise Deployments

Large enterprise environments commonly process:

  • Tens of thousands of endpoints
  • Billions of indexed documents
  • Multiple terabytes of data per day
  • Continuous security monitoring across multiple regions

These deployments typically require:

  • Multiple dedicated data nodes
  • Dedicated cluster manager nodes
  • Coordinating nodes for search traffic
  • Ingest nodes for preprocessing
  • Tiered storage strategies for hot and warm data

Rather than relying on a single large index, organizations frequently distribute workloads across time-based indices and use Index State Management (ISM) policies to automate data lifecycle management.

Multi-Tenant Environments

Service providers and large enterprises often operate shared OpenSearch clusters that support multiple business units, customers, or environments.

In these scenarios, shard planning should account for:

  • Tenant isolation
  • Uneven ingestion rates
  • Separate retention requirements
  • Security boundaries
  • Resource contention

Administrators may choose dedicated indices, or even dedicated node tiers, for high-volume tenants to prevent one workload from negatively impacting others.

Scaling Considerations

Shard allocation is not a one-time task.

As your Wazuh deployment evolves, your strategy should evolve with it.

Regularly monitor metrics such as:

  • Shard size
  • Shard count per node
  • JVM heap utilization
  • CPU usage
  • Disk utilization
  • Search latency
  • Indexing throughput
  • Shard relocation frequency

Capacity planning should become part of routine cluster maintenance, allowing you to rebalance workloads or expand infrastructure before performance degrades.

Related Guides:


Configuring Replica Shards

While primary shards determine how your data is partitioned, replica shards determine how resilient and scalable your OpenSearch cluster is.

Every replica is an exact copy of a primary shard and can serve search requests while providing redundancy if a data node fails.

Choosing the right replica configuration requires balancing availability, storage costs, indexing performance, and search workloads.

Too few replicas increase the risk of downtime, while too many consume additional storage and increase indexing overhead because every write operation must also be replicated.

Replica Recommendations

The optimal number of replica shards depends on your deployment size and availability requirements.

General recommendations include:

DeploymentRecommended Replicas
Development or testing0
Small production cluster1
Enterprise production cluster1–2
Mission-critical deployments2 or more (depending on node count)

Keep in mind that every replica consumes approximately the same amount of storage as its corresponding primary shard.

For example:

  • 5 primary shards
  • 1 replica

Results in:

  • 10 total shards
  • Roughly double the storage requirements

Before increasing replica counts, ensure sufficient disk capacity exists across the cluster.

Single-Node Clusters

Replica shards provide no benefit in a single-node deployment.

Since replicas cannot be allocated to the same node as their primary shard, OpenSearch leaves replica shards unassigned when only one data node exists.

This results in a yellow cluster status, even though the system is functioning as expected.

For development, testing, and lab environments, configuring zero replicas avoids unnecessary warnings and conserves storage.

As soon as additional data nodes are introduced, replicas should be enabled to improve fault tolerance.

High Availability Clusters

Production Wazuh environments should always use replica shards.

When one data node fails:

  1. OpenSearch detects the failure.
  2. A replica shard is promoted to the new primary.
  3. Search requests continue.
  4. Indexing resumes.
  5. Replacement replicas are created when sufficient capacity becomes available.

This automatic failover minimizes service interruptions during hardware failures, maintenance windows, or unexpected outages.

To maximize resilience, replica shards should never reside on the same physical server, rack, or availability zone as their corresponding primary shards.

Read Performance Benefits

Replica shards do more than improve availability, they also increase search capacity.

OpenSearch distributes search requests across both primary and replica shards, allowing multiple nodes to process queries simultaneously.

Benefits include:

  • Faster dashboard loading
  • Lower search latency
  • Better support for concurrent users
  • Improved reporting performance
  • Reduced CPU pressure on individual data nodes

This becomes particularly valuable in Security Operations Centers (SOCs), where multiple analysts may perform complex threat-hunting queries at the same time.

However, replicas do not improve indexing speed because every new document must first be written to the primary shard before being replicated.

Replica Recovery

Whenever a node rejoins the cluster or new hardware is added, OpenSearch begins replica recovery.

During recovery, the cluster:

  • Identifies missing replicas
  • Copies shard data between nodes
  • Verifies shard consistency
  • Restores redundancy
  • Rebalances the cluster if necessary

Recovery speed depends on several factors, including:

  • Network bandwidth
  • Storage performance
  • Shard size
  • CPU availability
  • Number of recovering shards

Smaller, well-balanced shards generally recover much faster than oversized shards, reducing the time the cluster operates with reduced redundancy.

Administrators should monitor recovery operations after planned maintenance or unexpected outages to ensure all replicas return to an active state before considering the cluster fully healthy.


Understanding Allocation Awareness

By default, OpenSearch distributes shards across available data nodes to balance workload.

However, it has no inherent understanding of your physical infrastructure unless you explicitly provide that information.

Allocation awareness allows administrators to tell OpenSearch about the topology of the underlying environment, such as racks, hosts, or cloud availability zones, so that shard placement decisions improve resilience and reduce the risk of correlated failures.

Without allocation awareness, both a primary shard and its replica could unintentionally end up on infrastructure that shares the same failure domain.

Zone Awareness

Zone awareness distributes shards across multiple failure zones.

Examples include:

  • Different data centers
  • Different cloud regions
  • Different availability zones
  • Separate physical facilities

If an entire zone becomes unavailable because of a network outage, power failure, or maintenance event, replica shards located in another zone can continue serving requests.

Zone awareness is especially important for organizations operating geographically distributed Wazuh deployments.

Rack Awareness

Many on-premises environments organize servers into multiple racks.

Although servers occupy different machines, they may still share:

  • Power distribution units
  • Network switches
  • Cooling infrastructure
  • Top-of-rack networking

Rack awareness prevents OpenSearch from placing both primary and replica shards within the same rack whenever possible.

This reduces the impact of failures affecting shared rack infrastructure.

Host Awareness

Virtualized environments often run several OpenSearch nodes on the same physical host.

Without host awareness, OpenSearch may allocate:

  • Primary shard → Virtual Machine A
  • Replica shard → Virtual Machine B

Although these appear to be different nodes, both depend on the same physical server.

If that host fails, both copies of the shard become unavailable.

Host awareness ensures that shard copies are distributed across separate physical hosts, improving fault tolerance in VMware, Hyper-V, KVM, and similar virtualization platforms.

Availability Zones

Public cloud deployments commonly span multiple availability zones (AZs).

Cloud providers design availability zones with independent:

  • Power
  • Networking
  • Cooling
  • Physical facilities

Distributing primary and replica shards across multiple AZs protects the cluster from localized failures while maintaining low network latency between nodes.

For production cloud deployments, this architecture is generally considered a best practice.

Preventing Single Points of Failure

The primary objective of allocation awareness is eliminating single points of failure.

Without proper awareness, infrastructure failures can simultaneously affect both primary and replica shards.

Examples include:

  • Entire rack failures
  • Hypervisor failures
  • Availability zone outages
  • Storage array failures
  • Network switch failures

Proper allocation awareness ensures that redundant shard copies remain available even when an entire failure domain is lost.

Combined with regular snapshots and replica shards, allocation awareness forms one of the most important layers of a resilient Wazuh OpenSearch architecture.

Related Guides: The Complete Wazuh Cluster Architecture Guide


Node Roles in Wazuh OpenSearch

OpenSearch assigns specialized responsibilities to different nodes within a cluster.

While small environments often combine these roles on the same server, larger Wazuh deployments typically separate them to improve performance, scalability, and fault tolerance.

Understanding each node role helps administrators design clusters that efficiently handle indexing, searching, cluster management, and data ingestion as workloads grow.

Dedicated Cluster Manager Nodes

Cluster Manager nodes are responsible for maintaining the health and coordination of the cluster.

Their responsibilities include:

  • Maintaining cluster state
  • Managing shard allocation
  • Electing the active cluster manager
  • Detecting failed nodes
  • Coordinating shard recovery
  • Managing index metadata

Because these operations are essential for cluster stability, production deployments should avoid placing heavy indexing or search workloads on dedicated Cluster Manager nodes.

OpenSearch generally recommends deploying an odd number of dedicated Cluster Manager nodes, commonly three, to maintain quorum and support leader elections if one node becomes unavailable.

Dedicated Data Nodes

Data nodes perform the majority of the workload in a Wazuh deployment.

They are responsible for:

  • Storing primary shards
  • Storing replica shards
  • Indexing incoming alerts
  • Executing search queries
  • Running aggregations
  • Managing local storage

Most hardware resources in a production cluster are allocated to data nodes because they perform the CPU-, memory-, and disk-intensive operations required for indexing and searching security events.

As Wazuh environments grow, scaling usually involves adding additional data nodes rather than increasing the responsibilities of existing servers.

Coordinating Nodes

Coordinating nodes act as intelligent request routers.

They receive requests from clients, including the Wazuh Dashboard, and then:

  • Determine which shards must participate
  • Forward queries to the appropriate data nodes
  • Collect partial results
  • Merge responses
  • Return final search results

Dedicated coordinating nodes reduce the processing burden on data nodes and improve responsiveness during periods of heavy search activity.

They become particularly valuable in environments supporting numerous simultaneous dashboard users or automated reporting workloads.

Ingest Nodes

Ingest nodes preprocess documents before indexing.

Common ingest pipeline tasks include:

  • Field transformations
  • Metadata enrichment
  • Timestamp normalization
  • IP geolocation
  • Data formatting
  • Pipeline execution

Separating ingest processing from data nodes allows indexing operations to remain efficient, particularly when complex ingest pipelines are used.

Although many Wazuh deployments perform most processing before events reach OpenSearch, ingest nodes can still provide value for organizations implementing additional enrichment within OpenSearch.

Mixed-Role Nodes

Small and medium-sized deployments often combine several node roles on the same server.

For example, a single node may function as:

  • Cluster Manager
  • Data node
  • Ingest node
  • Coordinating node

This approach reduces hardware requirements and simplifies administration.

However, mixed-role nodes compete for the same CPU, memory, and storage resources.

As indexing rates and query volumes increase, this shared workload can become a limiting factor.

Mixed-role configurations are well suited to development environments, proof-of-concept deployments, and smaller production clusters with modest workloads.

When to Separate Node Roles

As a Wazuh deployment grows, separating node roles becomes increasingly beneficial.

Consider dedicated roles when you experience:

  • High CPU utilization on data nodes
  • Slow dashboard queries
  • Long indexing delays
  • Frequent garbage collection pauses
  • Large cluster state updates
  • Heavy concurrent search traffic
  • Increasing shard counts
  • Growing numbers of monitored endpoints

A typical progression is:

  1. Start with mixed-role nodes for smaller environments.
  2. Introduce dedicated Cluster Manager nodes as the cluster expands.
  3. Scale horizontally by adding dedicated data nodes.
  4. Add coordinating and ingest nodes when indexing and query workloads justify the additional infrastructure.

This layered architecture improves performance, simplifies scaling, and reduces the likelihood that one type of workload will negatively affect another.

Related Guides:


Hot-Warm-Cold Architecture

As Wazuh deployments retain increasing amounts of security data, storing every index on high-performance hardware becomes both expensive and unnecessary.

Most organizations access recent alerts frequently, while older security events are rarely queried except during audits or incident investigations.

A Hot-Warm-Cold architecture addresses this challenge by placing data on different storage tiers based on its age and usage.

Recent indices remain on fast hardware for maximum performance, while older indices are automatically moved to less expensive storage without sacrificing accessibility.

This tiered approach reduces infrastructure costs while maintaining excellent search performance for the data analysts use most often.

Hot Nodes

Hot nodes store the most recently indexed security events.

These nodes handle:

  • Continuous indexing
  • Active search requests
  • Dashboard queries
  • Alert generation
  • Threat hunting
  • High write throughput

Because they process the majority of indexing operations, hot nodes typically use:

  • High-performance SSD or NVMe storage
  • Fast CPUs
  • Large memory allocations
  • High-speed networking

Typical data stored on hot nodes includes:

  • Today’s alerts
  • Recent incident investigations
  • Active compliance monitoring
  • Frequently accessed indices

Since hot nodes experience the highest workload, they should be monitored closely for CPU utilization, JVM heap usage, and disk I/O.

Warm Nodes

Warm nodes store data that is no longer actively written but is still searched regularly.

Examples include:

  • Alerts from the previous month
  • Compliance reports
  • Historical investigations
  • Security trend analysis

Warm nodes generally require:

  • Moderate CPU resources
  • Larger storage capacity
  • Less expensive disks than hot nodes
  • Lower indexing performance

Because indices stored on warm nodes are read-only, they generate significantly less write activity while remaining available for searches.

Moving older indices to warm nodes helps keep hot storage focused on current security operations.

Cold Nodes

Cold nodes store historical data that is rarely accessed.

Typical examples include:

  • Archived security logs
  • Regulatory retention data
  • Long-term forensic evidence
  • Older audit records

Cold storage prioritizes capacity and cost efficiency over search performance.

Organizations often use:

  • Large-capacity HDDs
  • Slower cloud storage
  • Lower-cost storage tiers

Although searches on cold data are generally slower, the savings in storage costs can be substantial for environments retaining data for multiple years.

Frozen Storage (Optional)

Some organizations extend the architecture further by using frozen or archive storage for infrequently accessed data.

Frozen storage is appropriate for:

  • Regulatory compliance
  • Legal discovery
  • Long-term audit requirements
  • Historical investigations

Characteristics include:

  • Lowest storage costs
  • Long retrieval times
  • Minimal infrastructure requirements
  • Rare search activity

Not every Wazuh deployment requires this tier, but organizations with strict retention requirements may benefit from archiving older indices outside the primary OpenSearch cluster while maintaining recoverability through snapshots and external storage.

Index Lifecycle Management (ISM)

Manually moving hundreds or thousands of indices between storage tiers quickly becomes impractical.

OpenSearch provides Index State Management (ISM) to automate the lifecycle of indices.

Typical ISM workflows include:

  1. Create a new index.
  2. Store it on hot nodes.
  3. Move it to warm nodes after 30 days.
  4. Move it to cold storage after 90 days.
  5. Delete or archive it after the retention period expires.

Policies can also automate:

  • Force merges
  • Replica changes
  • Read-only transitions
  • Snapshot creation
  • Index deletion

Automating these tasks reduces administrative effort while ensuring storage resources are used efficiently.

When Tiered Storage Makes Sense

Not every Wazuh deployment requires multiple storage tiers.

Tiered storage is generally beneficial when organizations:

  • Retain security data for several months or years.
  • Process hundreds of gigabytes or terabytes of data daily.
  • Need to reduce infrastructure costs.
  • Must satisfy regulatory retention requirements.
  • Operate large Security Operations Centers (SOCs).
  • Require rapid searches for recent data while preserving historical records.

Smaller deployments with short retention periods may achieve excellent performance using only hot storage.

As data volumes grow, introducing warm and cold tiers provides a cost-effective path to scaling without sacrificing operational efficiency.

Related Guide: How to Configure Wazuh Log Retention


Index Templates and Shard Configuration

Creating indices manually is both inefficient and error-prone.

OpenSearch solves this problem through index templates, which automatically apply predefined settings whenever new indices are created.

For Wazuh deployments that generate new time-based indices daily, templates ensure consistent shard counts, replica settings, mappings, compression, and other configuration options across the cluster.

Without templates, inconsistent index configurations can lead to uneven shard allocation, unpredictable performance, and increased administrative overhead.

Creating Index Templates

Index templates define the settings and mappings that new indices inherit during creation.

A template can specify:

  • Number of primary shards
  • Number of replica shards
  • Index mappings
  • Compression options
  • Refresh intervals
  • Index aliases
  • Index State Management (ISM) policies

Rather than configuring each index individually, administrators create one template that automatically applies to all matching Wazuh indices.

This simplifies cluster management and helps enforce consistent operational standards.

Default Shard Settings

One of the most important template settings is the default number of primary shards.

Administrators should select shard counts based on:

  • Daily data volume
  • Expected shard size
  • Number of data nodes
  • Future growth projections
  • Search workload

Avoid selecting shard counts based solely on hardware availability today, as future expansion may require different allocation strategies.

Since changing the number of primary shards requires reindexing, careful planning at the template level can prevent disruptive maintenance later.

Replica Settings

Templates also define how many replica shards each index should maintain.

Different environments may use different defaults:

EnvironmentTypical Replica Count
Development0
Testing0–1
Production1
Mission-critical production2 or more

Administrators should periodically review replica settings as clusters expand or availability requirements change.

Increasing replica counts improves fault tolerance and search scalability but also increases storage consumption and replication traffic.

Compression Settings

Compression reduces the amount of disk space required to store indexed documents.

Benefits include:

  • Lower storage costs
  • Improved disk utilization
  • Better cache efficiency
  • Reduced backup sizes

The trade-off is additional CPU usage during compression and decompression.

For most Wazuh deployments, storage savings significantly outweigh the relatively small CPU overhead, especially when retaining large volumes of security data.

Administrators should benchmark compression performance against their specific workload before deploying changes broadly.

Refresh Interval

The refresh interval determines how quickly newly indexed documents become searchable.

Short refresh intervals provide:

  • Near real-time visibility
  • Faster alert searches
  • More responsive dashboards

Longer refresh intervals can improve indexing throughput because OpenSearch performs refresh operations less frequently.

The ideal setting depends on operational priorities.

Organizations requiring immediate visibility into security events often prefer shorter intervals, while high-ingestion environments may increase the interval to maximize indexing performance during peak activity.

Index Naming Strategies

Consistent naming conventions simplify administration, automation, and lifecycle management.

Common approaches include:

  • Daily indices
  • Weekly indices
  • Monthly indices
  • Environment-specific prefixes
  • Business-unit prefixes

Examples:

  • wazuh-alerts-2026.07.24
  • wazuh-alerts-prod-2026.07
  • wazuh-cloud-2026.07.24

Effective naming conventions make it easier to:

  • Apply ISM policies
  • Perform backups
  • Restore snapshots
  • Manage retention
  • Monitor cluster health

Organizations operating multiple environments should establish naming standards early to avoid future administrative complexity.

Related Guide: How to Backup Wazuh Manager Configuration


Balancing Shards Across Nodes

Even with an appropriate number of shards and replicas, poor distribution can leave some nodes overloaded while others remain underutilized.

Shard balancing is the process of distributing primary and replica shards evenly throughout the cluster so that storage, CPU, memory, and search workloads are shared as uniformly as possible.

A well-balanced cluster improves performance, increases resilience, and simplifies future scaling.

Automatic Allocation

OpenSearch automatically allocates shards whenever:

  • A new index is created.
  • A node joins the cluster.
  • A node fails.
  • Hardware is added.
  • Indices are restored.
  • Cluster topology changes.

The allocation engine considers factors such as:

  • Available disk space
  • Existing shard distribution
  • Node availability
  • Allocation awareness settings
  • Replica placement rules

Automatic allocation is sufficient for most deployments and significantly reduces day-to-day administrative effort.

Manual Allocation

Although automatic allocation works well in most situations, administrators may occasionally need manual control.

Examples include:

  • Isolating high-volume indices
  • Testing new hardware
  • Troubleshooting allocation issues
  • Preparing infrastructure migrations
  • Recovering from abnormal cluster conditions

Manual allocation should be used carefully because overriding OpenSearch’s allocation logic may create unintended workload imbalances.

In general, manual intervention is best reserved for exceptional operational scenarios rather than routine cluster management.

Cluster Rebalancing

As workloads change, OpenSearch continuously evaluates whether shards should be relocated to improve balance.

Rebalancing may occur after:

  • Adding data nodes
  • Removing servers
  • Restoring snapshots
  • Hardware failures
  • Storage utilization changes
  • Allocation rule updates

During rebalancing, shards are copied between nodes while the cluster remains operational.

Although this process is generally automatic, large shard movements consume network bandwidth, CPU resources, and disk I/O.

Scheduling infrastructure changes during periods of lower activity can reduce the impact of large-scale shard relocations.

Allocation Filters

Allocation filters allow administrators to control where specific indices or shards may reside.

Filters can use attributes such as:

  • Node name
  • Storage tier
  • Hardware class
  • Rack identifier
  • Availability zone
  • Custom node attributes

Common use cases include:

  • Restricting hot indices to SSD-backed nodes
  • Moving archived data to high-capacity storage
  • Isolating workloads by environment
  • Separating production and testing indices
  • Supporting tiered storage architectures

Allocation filters provide fine-grained control while still allowing OpenSearch to automate balancing within the defined constraints.

Excluding Nodes During Maintenance

Planned maintenance often requires temporarily removing nodes from service without disrupting the cluster.

Before shutting down a node, administrators can configure allocation settings that instruct OpenSearch to relocate shards elsewhere.

Typical maintenance activities include:

  • Operating system upgrades
  • Hardware replacement
  • Storage expansion
  • Kernel updates
  • Security patching

Excluding nodes before maintenance helps prevent unnecessary downtime and ensures that primary and replica shards remain available throughout the maintenance window.

After maintenance is complete, the node can be returned to the cluster, allowing OpenSearch to rebalance shards automatically.

Related Guides:


Optimizing Performance

A well-designed shard allocation strategy provides the foundation for a scalable Wazuh OpenSearch deployment, but ongoing performance tuning is required to maintain efficiency as alert volumes grow.

OpenSearch performance depends on several interconnected factors, including indexing throughput, query speed, JVM memory management, storage performance, and shard configuration.

Optimizing these areas ensures that security analysts can quickly search events while the cluster continues ingesting large volumes of telemetry.

Refresh Interval Optimization

The refresh interval controls how frequently OpenSearch makes newly indexed documents available for searching.

By default, OpenSearch refreshes indices frequently to provide near real-time search results.

While this improves visibility, refresh operations consume system resources because OpenSearch must create new search segments and update internal structures.

For high-volume Wazuh deployments, increasing the refresh interval can improve indexing performance by reducing refresh overhead.

Example scenarios:

  • Security operations requiring immediate alerts:
    • Short refresh interval
    • Faster search availability
    • Higher resource consumption
  • Large-scale archival ingestion:
    • Longer refresh interval
    • Higher indexing throughput
    • Lower refresh overhead

Organizations should balance detection requirements against ingestion performance.

For environments receiving thousands of alerts per second, even small refresh optimizations can significantly reduce indexing pressure.

Merge Policies

OpenSearch stores indexed data in segments. As documents are indexed, updated, and deleted, many smaller segments are created.

Background merge operations combine smaller segments into larger ones to improve search efficiency.

However, merging consumes:

  • CPU resources
  • Disk I/O
  • Temporary storage
  • Memory

Poorly tuned merge behavior can cause performance issues during periods of heavy indexing.

Common optimization approaches include:

  • Adjusting merge thresholds
  • Increasing refresh intervals
  • Using force merges on read-only indices
  • Moving older indices to warm storage

For Wazuh environments, force merging is often useful after indices become read-only because historical data no longer receives frequent writes.

Indexing Throughput

Indexing throughput determines how quickly Wazuh alerts can be written into OpenSearch.

Factors affecting indexing speed include:

  • Number of primary shards
  • Data node CPU capacity
  • Disk performance
  • Network bandwidth
  • Refresh frequency
  • Replica count
  • JVM heap availability

Increasing primary shards can improve indexing parallelism by distributing incoming documents across multiple nodes.

However, additional shards also increase cluster overhead, so shard counts should be based on measured workloads rather than simply increasing them whenever indexing slows.

Other techniques for improving indexing throughput include:

  • Using bulk ingestion
  • Increasing refresh intervals
  • Adding additional data nodes
  • Optimizing mappings
  • Reducing unnecessary indexed fields

Related Guide: Step-by-Step Wazuh Manager Scaling Guide

Search Performance

Search performance directly affects analyst productivity.

Slow searches can occur because of:

  • Excessive shard counts
  • Large shard sizes
  • Poor shard distribution
  • High query complexity
  • Insufficient memory
  • Slow storage

OpenSearch improves search performance by executing queries across multiple shards simultaneously, but this only works effectively when shards are distributed efficiently.

Optimization strategies include:

  • Keeping shard sizes manageable
  • Using appropriate replica counts
  • Separating heavy search workloads from indexing workloads
  • Monitoring query latency
  • Optimizing dashboards and visualizations

Large security investigations often involve complex filters, aggregations, and time-based searches, making query performance especially important in SOC environments.

JVM Heap Considerations

OpenSearch relies heavily on the Java Virtual Machine (JVM), and incorrect heap sizing can create serious performance problems.

The JVM heap manages:

  • Query caches
  • Segment memory
  • Cluster metadata
  • Shard operations
  • Indexing buffers

Common heap-related problems include:

  • Long garbage collection pauses
  • Out-of-memory errors
  • Circuit breaker exceptions
  • Slow searches
  • Failed shard allocations

OpenSearch commonly recommends assigning approximately half of available system memory to the JVM heap while leaving the remaining memory available for the operating system and filesystem cache.

For Wazuh deployments, the filesystem cache is especially important because OpenSearch relies heavily on cached index data for fast searches.

Related Guide: How to Tune OpenSearch Heap Size to Stop Wazuh High Memory Crashes

Storage Performance

Storage performance has a major impact on OpenSearch because indexing and searching generate significant disk activity.

Important storage characteristics include:

  • Read latency
  • Write latency
  • Random I/O performance
  • Throughput
  • Queue depth
  • Available capacity

Slow storage can cause:

  • Delayed indexing
  • Slow searches
  • Extended shard recovery
  • Increased merge times
  • Cluster instability

Enterprise Wazuh deployments should prioritize storage performance for hot data where frequent indexing and searching occur.

SSD vs HDD

The choice between SSD and HDD storage significantly affects OpenSearch behavior.

SSD Advantages

SSDs provide:

  • Lower latency
  • Faster random reads
  • Faster segment merges
  • Faster shard recovery
  • Better indexing performance

SSD storage is strongly recommended for hot nodes.

HDD Advantages

HDDs provide:

  • Lower cost per terabyte
  • Higher storage capacity
  • Suitable long-term retention

HDDs are better suited for:

  • Warm nodes
  • Cold storage
  • Historical archives

A common enterprise design is:

  • NVMe SSD → Hot data
  • SSD/SAS → Warm data
  • HDD/Object storage → Cold archives

This approach provides high performance where needed while reducing long-term storage costs.


Monitoring Shard Health

Continuous monitoring is essential for maintaining a healthy Wazuh OpenSearch cluster.

Shard problems often appear before complete failures occur.

Monitoring shard allocation, cluster balance, and node resource usage allows administrators to identify issues before they impact security operations.

Cluster Health API

The Cluster Health API provides an overview of OpenSearch cluster status.

It reports:

  • Cluster state
  • Number of nodes
  • Active shards
  • Relocating shards
  • Initializing shards
  • Unassigned shards

Common cluster health states include:

Green

All primary and replica shards are assigned.

The cluster is operating normally.

Yellow

All primary shards are available, but some replicas are unassigned.

Common causes:

  • Single-node clusters
  • Insufficient data nodes
  • Allocation restrictions

Red

One or more primary shards are unavailable.

This indicates possible data availability issues requiring immediate investigation.

Cat Shards API

The Cat Shards API provides detailed information about individual shards.

Administrators can view:

  • Index names
  • Shard IDs
  • Primary/replica status
  • Shard sizes
  • Node placement
  • Allocation state

This helps identify:

  • Oversized shards
  • Uneven distribution
  • Missing replicas
  • Storage hotspots

Example troubleshooting questions:

  • Which node contains the largest shards?
  • Are replicas evenly distributed?
  • Are some indices consuming excessive storage?

Allocation Explain API

The Allocation Explain API explains why a shard is not allocated.

It is especially useful when troubleshooting:

  • Unassigned replicas
  • Disk allocation blocks
  • Node exclusions
  • Awareness conflicts
  • Resource limitations

The API can reveal messages such as:

  • Insufficient disk space
  • Allocation filters preventing placement
  • Replica already exists on the target node
  • Node attributes not matching requirements

This makes it one of the most valuable tools for diagnosing shard allocation failures.

OpenSearch Dashboards

OpenSearch Dashboards provides visual monitoring capabilities for cluster administrators.

Useful monitoring areas include:

  • Cluster health
  • Node metrics
  • Index statistics
  • JVM usage
  • Disk utilization
  • Search latency
  • Indexing throughput

For Wazuh users, the Wazuh Dashboard also exposes important operational information related to index availability and security event ingestion.

Related Guide: Wazuh Dashboard Not Loading? Complete Troubleshooting Guide

Monitoring Cluster Balance

A balanced cluster should distribute resources evenly across nodes.

Important metrics include:

  • Shards per node
  • Disk usage percentage
  • CPU utilization
  • JVM heap usage
  • Query latency
  • Indexing rate

Warning signs of imbalance include:

  • One node storing significantly more shards
  • One node handling most searches
  • Large differences in disk usage
  • Frequent shard movement

Regular monitoring allows administrators to rebalance workloads before performance degradation occurs.

Detecting Hot Nodes

A hot node is a server experiencing significantly higher workload than other cluster members.

Common symptoms include:

  • High CPU usage
  • High disk I/O
  • JVM pressure
  • Slow response times
  • Increased garbage collection

Causes include:

  • Uneven shard allocation
  • High-volume indices
  • Poor allocation awareness
  • Missing data nodes
  • Excessive search traffic

Resolving hot nodes may require:

  • Moving shards
  • Adding data nodes
  • Adjusting shard counts
  • Separating node roles
  • Revising allocation rules

Common Shard Allocation Problems

Shard allocation problems are among the most common causes of OpenSearch performance degradation and cluster instability in Wazuh environments.

Understanding these failures helps administrators quickly diagnose issues and restore normal operation.

Unassigned Shards

Unassigned shards occur when OpenSearch cannot place a shard on any available node.

Common causes include:

  • Insufficient data nodes
  • Allocation restrictions
  • Failed nodes
  • Missing replicas
  • Disk capacity limits
  • Allocation awareness conflicts

Symptoms include:

  • Yellow cluster status
  • Red cluster status
  • Missing data
  • Reduced availability

The Allocation Explain API should be the first troubleshooting tool used when investigating unassigned shards.

Oversized Shards

Oversized shards occur when individual shards grow beyond recommended sizes.

Problems caused by oversized shards include:

  • Slow searches
  • Longer recovery times
  • Difficult migrations
  • Increased memory usage
  • Slow backups

Oversized shards are often caused by:

  • Too few primary shards
  • Excessive retention periods
  • High-volume indices
  • Poor index rollover strategy

Solutions include:

  • Adjusting shard counts
  • Implementing rollover policies
  • Reducing retention periods
  • Creating better index strategies

Too Many Small Shards

Having too many small shards creates unnecessary overhead.

Each shard requires:

  • JVM memory
  • File handles
  • Cluster metadata
  • Background management

Symptoms include:

  • Increased heap usage
  • Slow cluster operations
  • Longer startup times
  • Excessive metadata overhead

The solution is usually reducing shard counts and creating appropriately sized indices.

Uneven Distribution

Uneven shard distribution occurs when some nodes contain significantly more workload than others.

Causes include:

  • Poor allocation settings
  • Missing awareness rules
  • New nodes added without rebalancing
  • Large indices concentrated on specific nodes

Symptoms include:

  • Hot nodes
  • Unequal disk usage
  • Slow searches
  • Reduced cluster capacity

Correcting allocation rules and allowing OpenSearch to rebalance usually resolves these issues.

Disk Watermark Allocation Blocks

OpenSearch uses disk watermarks to prevent nodes from running out of storage.

Common thresholds include:

  • Low watermark
  • High watermark
  • Flood-stage watermark

When disk usage exceeds limits, OpenSearch may:

  • Stop allocating new shards
  • Relocate existing shards
  • Mark indices as read-only

Symptoms include:

  • Failed indexing
  • Allocation errors
  • Read-only indices

Solutions include:

  • Freeing disk space
  • Expanding storage
  • Adding data nodes
  • Adjusting watermark settings carefully

Replica Allocation Failures

Replica shards may fail to allocate because:

  • There are not enough data nodes
  • Allocation rules prevent placement
  • Disk space is insufficient
  • Awareness settings cannot be satisfied

Common example:

A cluster has one data node with one replica configured.

The replica cannot be placed because OpenSearch will not place a replica on the same node as its primary.

Adding additional data nodes usually resolves the issue.

Node Failures

When an OpenSearch node fails, shard allocation changes immediately.

The cluster must:

  • Detect the failed node
  • Promote replicas
  • Restore missing replicas
  • Rebalance shards

Large clusters recover faster because workloads can be redistributed across more available resources.

Smaller clusters may experience longer recovery periods because fewer nodes share the workload.

Related Guide: How to Fix a Yellow Cluster Status in Wazuh Indexer

Split-Brain Prevention

Split-brain occurs when multiple nodes incorrectly believe they are the active cluster manager.

This can cause:

  • Conflicting cluster states
  • Incorrect shard allocation
  • Data inconsistencies
  • Cluster instability

Modern OpenSearch versions prevent split-brain through quorum-based cluster manager elections.

Best practices include:

  • Using dedicated cluster manager nodes
  • Deploying an odd number of cluster managers
  • Avoiding network partitions
  • Maintaining reliable node communication

For production Wazuh deployments, a three-node cluster manager configuration is commonly recommended because it allows the cluster to maintain quorum even if one manager becomes unavailable.

Related Guide: How to Set Up a Multi-Node Wazuh Cluster


Troubleshooting Shard Allocation Issues

Shard allocation problems can prevent OpenSearch from distributing data correctly across the cluster and may result in degraded performance, unhealthy cluster states, or unavailable security data.

When troubleshooting Wazuh OpenSearch shard issues, administrators should avoid making random configuration changes.

Instead, they should follow a structured troubleshooting process that identifies why OpenSearch cannot allocate or balance shards.

The most effective approach is to first determine the allocation decision made by OpenSearch, then investigate resource limitations, configuration restrictions, and infrastructure problems preventing normal shard placement.

Using Allocation Explain

The Allocation Explain API is the first tool administrators should use when investigating shard allocation failures.

It provides detailed information about:

  • Which shard is affected
  • Whether the shard is primary or replica
  • Why allocation failed
  • Which nodes were considered
  • Which allocation rules prevented placement

Common allocation explanations include:

  • Insufficient disk space
  • Allocation filters blocking placement
  • Replica cannot be assigned to the same node as primary
  • Node attributes do not match requirements
  • Shard recovery failures

A typical troubleshooting workflow:

  1. Identify the affected index.
  2. Determine the unassigned shard.
  3. Run the Allocation Explain API.
  4. Review the allocation decision.
  5. Correct the underlying issue.
  6. Verify shard recovery.

This approach prevents unnecessary changes and provides visibility into OpenSearch’s internal decision-making.

Checking Cluster Settings

Incorrect cluster settings are a common cause of shard allocation failures.

Administrators should review settings related to:

  • Shard allocation
  • Replica assignment
  • Allocation awareness
  • Node exclusions
  • Disk thresholds
  • Rebalancing behavior

Important areas to check include:

  • Disabled shard allocation
  • Incorrect node attributes
  • Allocation filters restricting placement
  • Excessive recovery limits
  • Maintenance exclusions that were never removed

Temporary settings applied during maintenance can also accidentally remain active and prevent normal shard allocation.

Regularly reviewing cluster settings helps identify configuration drift before it impacts production operations.

Disk Space Issues

Disk usage is one of the most common causes of shard allocation failures.

OpenSearch uses disk watermarks to protect nodes from running out of storage.

When nodes approach capacity limits, OpenSearch may:

  • Stop allocating new shards
  • Move shards away from affected nodes
  • Block writes to indices
  • Mark indices as read-only

Common symptoms include:

  • Unassigned shards
  • Failed indexing operations
  • Flood-stage watermark errors
  • Yellow or red cluster status

Solutions include:

  • Removing unnecessary indices
  • Increasing storage capacity
  • Adding additional data nodes
  • Reducing retention periods
  • Moving older data to warm or cold storage

For large Wazuh deployments, storage planning should account for alert growth, replicas, snapshots, and future expansion.

Related Guide: How to Configure Wazuh Log Retention

Recovery Delays

Shard recovery can take significant time, especially in large Wazuh environments with large indices.

Recovery speed depends on:

  • Shard size
  • Network bandwidth
  • Disk throughput
  • Number of recovering shards
  • Available CPU resources

Common causes of slow recovery include:

  • Oversized shards
  • Slow storage systems
  • Too many simultaneous recoveries
  • Network congestion
  • Resource contention

During recovery, administrators should monitor:

  • Recovery progress
  • Node resource usage
  • Network utilization
  • Disk activity

Avoid restarting nodes repeatedly during recovery because interruptions can extend recovery times and increase cluster instability.

Network Problems

OpenSearch nodes rely heavily on reliable communication between cluster members.

Network problems can cause:

  • Failed shard synchronization
  • Node disconnects
  • Slow recovery
  • Cluster manager election issues
  • Allocation failures

Common network-related causes include:

  • Firewall restrictions
  • Incorrect DNS resolution
  • High latency between nodes
  • Packet loss
  • Insufficient bandwidth
  • Misconfigured security groups

For production Wazuh deployments, OpenSearch nodes should communicate over stable, low-latency networks with properly configured TLS communication.

Related Guide: Fixing Wazuh Certificate Errors

JVM Memory Problems

JVM memory pressure can prevent OpenSearch from allocating shards correctly.

Common symptoms include:

  • Circuit breaker exceptions
  • Frequent garbage collection pauses
  • Slow searches
  • Node instability
  • Failed shard operations

Causes include:

  • Too many shards
  • Oversized indices
  • Incorrect heap allocation
  • Heavy query workloads
  • Insufficient system memory

Troubleshooting steps include:

  • Reviewing JVM heap utilization
  • Reducing unnecessary shards
  • Optimizing queries
  • Increasing node resources
  • Adjusting heap settings appropriately

The goal is not simply increasing heap size.

Excessive heap allocation can reduce filesystem cache performance and negatively impact search operations.

Related Guide: How to Tune OpenSearch Heap Size to Stop Wazuh High Memory Crashes

Cluster Manager Issues

Cluster Manager nodes control shard allocation decisions.

Problems affecting these nodes can prevent normal cluster operations.

Common issues include:

  • Loss of quorum
  • High CPU usage
  • Network communication failures
  • Incorrect cluster configuration
  • Excessive cluster state updates

Symptoms include:

  • Delayed shard allocation
  • Failed elections
  • Stale cluster state
  • Unresponsive cluster operations

Best practices include:

  • Deploying dedicated Cluster Manager nodes
  • Using an odd number of managers
  • Avoiding heavy workloads on manager nodes
  • Monitoring manager node health

A stable cluster manager layer is essential for reliable shard allocation.

Related Guide: How to Set Up a Multi-Node Wazuh Cluster


Security Best Practices

OpenSearch stores some of the most sensitive information in a Wazuh deployment, including authentication events, vulnerability data, malware detections, and security investigations.

A secure shard allocation strategy must therefore include strong access controls, encryption, monitoring, and operational security practices.

Enable TLS Between Nodes

Node-to-node communication should always be encrypted in production environments.

TLS protects:

  • Cluster communication
  • Shard replication traffic
  • Authentication exchanges
  • Internal API requests

Without encryption, attackers with network access could potentially intercept sensitive security telemetry.

Best practices include:

  • Using trusted certificates
  • Rotating certificates before expiration
  • Validating certificate chains
  • Restricting insecure communication

Related Guide: How to Fix Wazuh Certificate Errors

Use Role-Based Access Control

Role-Based Access Control (RBAC) ensures users only receive the permissions required for their responsibilities.

Examples:

Security analysts may need:

  • Search access
  • Dashboard access
  • Alert investigation permissions

Administrators may require:

  • Index management
  • Cluster configuration access
  • User management permissions

Restricting privileges reduces the risk of accidental or unauthorized changes to shard allocation, indices, and cluster settings.

Related Guide: Troubleshooting Wazuh RBAC

Limit Administrative Access

OpenSearch administrative permissions should be limited to authorized personnel.

Recommended practices include:

  • Using individual administrator accounts
  • Avoiding shared credentials
  • Enabling strong authentication
  • Logging administrative actions
  • Reviewing permissions regularly

Administrative access should be especially restricted because changes to shard allocation, templates, and cluster settings can impact the availability of the entire security platform.

Encrypt Data at Rest

Encryption at rest protects stored security telemetry if storage systems or backups are compromised.

Protected data may include:

  • Security alerts
  • Host information
  • User activity
  • Vulnerability findings
  • Incident investigation data

Encryption options include:

  • Storage-level encryption
  • Cloud provider encryption services
  • Encrypted volumes
  • Encrypted snapshot repositories

Organizations handling regulated security data should include encryption requirements in their OpenSearch deployment standards.

Monitor Cluster Health Continuously

Continuous monitoring helps identify shard problems before they affect analysts.

Important metrics include:

  • Cluster health status
  • Unassigned shards
  • JVM memory usage
  • Disk utilization
  • Indexing latency
  • Search latency
  • Node availability

Monitoring tools can alert administrators when:

  • Nodes become unavailable
  • Disk watermarks are exceeded
  • Shards fail allocation
  • Performance degrades

Early detection reduces recovery time and prevents larger outages.

Related Guide: Wazuh Dashboard Not Loading? Complete Troubleshooting Guide

Regularly Review Allocation Policies

Allocation rules should evolve as infrastructure changes.

Review policies after:

  • Adding new nodes
  • Changing storage tiers
  • Expanding retention periods
  • Moving to new cloud regions
  • Modifying availability zones

Outdated allocation rules can unintentionally prevent shards from being distributed effectively.

Regular reviews help ensure shard placement continues matching operational requirements.

Keep OpenSearch Updated

Keeping OpenSearch updated provides access to:

  • Security fixes
  • Performance improvements
  • Stability enhancements
  • Bug fixes
  • Improved cluster management features

Before upgrading production Wazuh environments:

  • Review compatibility requirements
  • Test upgrades in staging
  • Create backups
  • Verify rollback procedures

A properly maintained OpenSearch cluster reduces operational risk and improves long-term reliability.


Real-World Example

 

Scenario

A managed security service provider (MSSP) operates a centralized Wazuh deployment that ingests security telemetry from more than 60,000 endpoints across multiple customer environments.

The platform collects:

  • Windows security events
  • Linux authentication logs
  • Cloud audit events
  • Firewall telemetry
  • Endpoint security alerts
  • Vulnerability information

Initially, the MSSP deployed a small OpenSearch cluster using mixed-role nodes.

As customer environments expanded, the cluster began experiencing performance issues.

Security analysts noticed:

  • Slower dashboard searches
  • Increased indexing latency
  • Delayed alert visibility
  • Uneven disk utilization
  • Several OpenSearch nodes approaching disk watermark limits

Investigation revealed that:

  • Data nodes were performing too many responsibilities.
  • Shard sizes had grown significantly.
  • Replica distribution was uneven.
  • Older security data consumed expensive hot storage.
  • Allocation rules did not account for infrastructure topology.

Redesigning the OpenSearch Architecture

The engineering team redesigned the cluster using a more scalable architecture.

The improvements included:

Dedicated Cluster Manager and Data Nodes

The MSSP separated cluster management responsibilities from data processing workloads.

Dedicated Cluster Manager nodes handled:

  • Cluster state management
  • Shard allocation decisions
  • Node coordination

Dedicated data nodes handled:

  • Alert indexing
  • Search execution
  • Shard storage

This reduced resource contention and improved cluster stability.

Implementing Hot-Warm Architecture

The team introduced tiered storage:

Hot nodes:

  • Stored recent customer alerts
  • Used high-performance SSD storage
  • Handled active investigations

Warm nodes:

  • Stored older security events
  • Used larger-capacity storage
  • Supported compliance searches

This reduced pressure on expensive hot storage while maintaining access to historical data.

Optimizing Index Templates

The engineering team created index templates with optimized:

  • Primary shard counts
  • Replica settings
  • Refresh intervals
  • Index lifecycle policies

The new configuration produced more balanced shard sizes and prevented future oversized indices.

Enabling Allocation Awareness

Because the MSSP operated across multiple availability zones, allocation awareness was enabled to ensure shard copies were distributed across separate failure domains.

This prevented scenarios where:

  • Primary shards and replicas shared the same zone
  • Infrastructure failures affected redundant copies
  • Maintenance events caused unnecessary downtime

Automating Data Lifecycle Management

Index State Management policies were implemented to automatically:

  • Move older indices from hot to warm storage
  • Reduce storage costs
  • Maintain retention requirements
  • Delete expired data according to policy

This eliminated manual index management and improved operational consistency.

Results After the Redesign

After implementing the new shard allocation strategy, the MSSP achieved significant improvements:

  • Balanced shard distribution across OpenSearch nodes
  • Faster dashboard searches
  • Improved indexing throughput
  • Reduced disk pressure on hot nodes
  • Faster recovery after node failures
  • Better utilization of existing hardware
  • Improved long-term scalability

The redesigned architecture allowed the MSSP to continue expanding its Wazuh deployment without constantly adding infrastructure or manually relocating shards.

This example demonstrates why shard allocation planning is essential for large-scale Wazuh environments.

A properly designed OpenSearch architecture does not only improve performance, it provides the reliability and scalability required for continuous security monitoring.


Best Practices

Designing an effective Wazuh OpenSearch shard allocation strategy requires ongoing planning, monitoring, and optimization.

A shard configuration that works for a small deployment may become inefficient as endpoint counts, alert volumes, and retention requirements increase.

Following proven operational practices helps maintain balanced workloads, reduce downtime, improve search performance, and ensure that the OpenSearch cluster can scale alongside the organization’s security requirements.

Keep Shard Sizes Consistent

Consistent shard sizing is one of the most important factors in maintaining a healthy OpenSearch cluster.

Large variations between shard sizes can create uneven resource utilization, where some nodes handle significantly more storage and workload than others.

Best practices include:

  • Monitoring shard sizes regularly
  • Reviewing index growth patterns
  • Adjusting primary shard counts when designing new indices
  • Using rollover policies for rapidly growing indices

Consistent shard sizes improve:

  • Search performance
  • Recovery speed
  • Data balancing
  • Predictable capacity planning

Avoid allowing individual shards to grow excessively large, as oversized shards increase recovery time and make cluster maintenance more difficult.

Monitor Cluster Health Daily

OpenSearch cluster health should be monitored as part of normal Wazuh operations.

Important metrics include:

  • Cluster status
  • Unassigned shards
  • Active shard count
  • Node availability
  • JVM heap usage
  • Disk utilization
  • Search latency
  • Indexing performance

Daily monitoring helps identify early warning signs such as:

  • Increasing shard imbalance
  • Disk pressure
  • Slow indexing
  • Failed replicas
  • Resource exhaustion

Detecting these issues early prevents small allocation problems from becoming major security monitoring outages.

Related Guide: Wazuh Dashboard Not Loading? Complete Troubleshooting Guide

Avoid Excessive Shard Counts

More shards do not always mean better performance.

Every shard consumes cluster resources, including:

  • JVM heap memory
  • File handles
  • Cluster metadata
  • Background maintenance resources

Too many shards can result in:

  • Slower searches
  • Higher memory usage
  • Longer cluster startup times
  • Increased recovery complexity

Administrators should create enough shards to distribute workloads effectively while avoiding unnecessary fragmentation.

A carefully planned shard strategy is generally more efficient than creating large numbers of small shards.

Use Dedicated Cluster Manager Nodes

Production Wazuh OpenSearch environments should use dedicated Cluster Manager nodes whenever possible.

Dedicated managers improve:

  • Cluster stability
  • Shard allocation decisions
  • Node election reliability
  • Metadata management

Cluster Manager nodes should not compete with heavy indexing or search workloads because resource exhaustion on these nodes can impact the entire cluster.

A common enterprise design uses three dedicated Cluster Manager nodes to maintain quorum and provide fault tolerance.

Related Guide: How to Set Up a Multi-Node Wazuh Cluster

Plan for Future Growth

Shard allocation decisions should consider future requirements, not only current workloads.

Growth factors include:

  • Increasing endpoint counts
  • Additional cloud integrations
  • Higher logging volumes
  • Longer retention requirements
  • New compliance obligations
  • Additional SOC users

Before expanding a deployment, review:

  • Storage capacity
  • Data ingestion rates
  • Shard distribution
  • Node resource utilization
  • Query performance

Proactive planning avoids emergency scaling projects and reduces the need for disruptive reconfiguration.

Related Guide: Step-by-Step Wazuh Manager Scaling Guide

Implement Hot-Warm Storage

Tiered storage helps organizations balance performance and cost.

A typical enterprise Wazuh deployment uses:

Hot storage:

  • Recent alerts
  • Active investigations
  • High-performance SSD storage

Warm storage:

  • Older security events
  • Compliance data
  • Lower-cost storage

This approach ensures analysts receive fast access to the data they use most frequently while reducing the cost of storing historical security information.

Related Guide: How to Configure Wazuh Log Retention

Test Allocation Policies Before Production

Allocation policies directly affect where security data is stored.

Before applying changes to production clusters, test:

  • Allocation awareness rules
  • Node attributes
  • Tier migration policies
  • Replica placement
  • Maintenance procedures

Testing helps identify issues such as:

  • Unassigned shards
  • Incorrect node filtering
  • Failed migrations
  • Unexpected resource usage

A staging environment that mirrors production hardware and workloads provides the most reliable validation.

Automate Index Lifecycle Management

Manual index management does not scale in large Wazuh environments.

Automation through Index State Management (ISM) allows organizations to automatically:

  • Move indices between storage tiers
  • Apply retention policies
  • Delete expired data
  • Manage rollover operations
  • Optimize older indices

Automation reduces administrative effort and prevents inconsistent configurations across thousands of indices.

Monitor Disk Watermarks

Disk watermarks protect OpenSearch clusters from running out of storage.

Administrators should monitor:

  • Disk utilization percentage
  • Available storage capacity
  • Index growth trends
  • Snapshot storage usage

When nodes exceed watermark thresholds, OpenSearch may:

  • Stop assigning shards
  • Move data automatically
  • Block writes
  • Mark indices as read-only

Capacity planning should maintain sufficient free space for:

  • New alerts
  • Replica creation
  • Recovery operations
  • Temporary merge files

Document Cluster Architecture

A documented OpenSearch architecture simplifies troubleshooting, maintenance, and future expansion.

Documentation should include:

  • Node roles
  • Hardware specifications
  • Network topology
  • Shard allocation strategy
  • Replica settings
  • Retention policies
  • Storage tiers
  • Backup procedures
  • Recovery processes

Clear documentation allows administrators to quickly understand the environment during incidents and reduces dependency on individual team members.


Frequently Asked Questions (FAQ)

Question: What is Wazuh OpenSearch?

Wazuh OpenSearch is the indexing and analytics layer used by Wazuh to store and search security events.

The Wazuh Manager processes security data, Filebeat forwards alerts, and OpenSearch indexes the information for visualization and analysis through the Wazuh Dashboard.

OpenSearch stores:

  • Security alerts
  • Authentication events
  • Vulnerability findings
  • File Integrity Monitoring events
  • Compliance results
  • Cloud and network telemetry

Related Guide: Wazuh Filebeat: A Step-by-Step Setup Guide

Question: How many primary shards should a Wazuh index have?

The correct number of primary shards depends on:

  • Daily alert volume
  • Index size
  • Number of data nodes
  • Search workload
  • Future growth expectations

Small deployments may only require one or a few primary shards, while large enterprise environments may require more.

Administrators should design shard counts around expected shard size rather than selecting a number based only on node count.

Question: What is the ideal shard size for OpenSearch?

There is no universal shard size that works for every environment, but many deployments aim for shard sizes between approximately 10 GB and 50 GB.

The optimal size depends on:

  • Hardware resources
  • Indexing rate
  • Search patterns
  • Retention requirements
  • Recovery objectives

The goal is to avoid both extremely large shards and excessive numbers of tiny shards.

Question: Should every Wazuh index have replica shards?

Production Wazuh environments should generally use replica shards.

Replicas provide:

  • High availability
  • Automatic failover
  • Additional search capacity

However, development and single-node environments may disable replicas because there is nowhere to place them.

A production cluster should typically maintain at least one replica for critical security data.

Question: What causes unassigned shards?

Common causes include:

  • Not enough available nodes
  • Disk watermark restrictions
  • Failed node recovery
  • Allocation filters
  • Awareness configuration issues
  • Disabled shard allocation
  • Insufficient resources

The Allocation Explain API is the recommended method for identifying the exact cause.

Question: How do I rebalance shards across nodes?

OpenSearch automatically balances shards based on cluster settings and available resources.

Administrators can improve distribution by:

  • Adding data nodes
  • Reviewing allocation policies
  • Removing restrictive filters
  • Adjusting shard configuration
  • Allowing automatic rebalancing

Manual shard movement should generally be reserved for troubleshooting or special maintenance scenarios.

Question: What are disk watermarks in OpenSearch?

Disk watermarks are storage thresholds that control shard allocation behavior.

They protect nodes from running out of disk space.

When thresholds are exceeded, OpenSearch may:

  • Stop allocating new shards
  • Relocate existing shards
  • Block writes to indices

Monitoring disk utilization prevents unexpected allocation failures.

Question: What is allocation awareness?

Allocation awareness allows OpenSearch to understand infrastructure topology and place shards intelligently.

It can distribute shard copies across:

  • Availability zones
  • Data centers
  • Racks
  • Physical hosts

This prevents primary and replica shards from being placed within the same failure domain.

Question: How does hot-warm architecture improve Wazuh performance?

Hot-warm architecture improves performance by placing frequently accessed data on high-performance infrastructure while moving older data to lower-cost storage.

Benefits include:

  • Faster searches on recent alerts
  • Reduced hot-node storage pressure
  • Lower infrastructure costs
  • Better long-term scalability

Recent security events remain quickly accessible while historical data remains available when needed.

Question: Can shard allocation be changed after an index is created?

Primary shard counts cannot be changed directly after index creation.

To change the number of primary shards, administrators must:

  1. Create a new index with the desired shard configuration.
  2. Reindex existing data.
  3. Replace the original index.

Replica counts, however, can be changed dynamically without recreating the index.

This is why shard planning should happen before deploying production indices.


Conclusion

A properly designed shard allocation strategy is one of the most important components of a scalable Wazuh OpenSearch deployment.

As security environments grow, inefficient shard allocation can lead to:

  • Slow dashboard searches
  • Delayed alert indexing
  • Unbalanced nodes
  • Storage exhaustion
  • Longer recovery times
  • Reduced incident response efficiency

By understanding how OpenSearch distributes data, administrators can design architectures that remain reliable even as event volumes increase.

Key considerations for building a scalable Wazuh OpenSearch environment include:

  • Choosing appropriate primary and replica shard counts
  • Maintaining consistent shard sizes
  • Monitoring cluster health continuously
  • Using allocation awareness for fault tolerance
  • Separating node roles when workloads increase
  • Implementing hot-warm storage strategies
  • Automating index lifecycle management
  • Planning capacity based on future growth

Shard allocation should not be treated as a one-time configuration task.

It requires ongoing monitoring, testing, and optimization as security requirements evolve.

Organizations that proactively manage their OpenSearch architecture can maintain faster investigations, stronger availability, and a Wazuh deployment capable of supporting large-scale security operations.

Related Wazuh and OpenSearch Optimization Guides:

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *