Ruleset Management settings
The Ruleset Management plugin is configured through settings in opensearch.yml. All node-scope settings use the plugins.security_analytics prefix. Almost every setting is dynamic and can be changed at runtime via the Cluster Settings API.
plugins.security_analytics.alert_finding_enabled(Boolean, defaultfalse) — enable rollover for the finding history indices, and keep the current write index out of the retention sweep while it is on. Retention deletion itself runs either way. It does not make raw findings be stored; that is the Alerting plugin’splugins.alerting.alert_finding_enabled.plugins.security_analytics.alert_finding_max_docs(Long, default1000, minimum0) — Deprecated. Maximum document count for a finding history index before rollover.plugins.security_analytics.alert_finding_rollover_period(Time, default12h) — how often the finding history rollover job runs.plugins.security_analytics.alert_history_enabled(Boolean, defaultfalse) — enable rollover for the alert history indices, and keep the current write index out of the retention sweep while it is on. Retention deletion itself runs either way.plugins.security_analytics.alert_history_max_age(Time, default30d) — maximum age of an alert history index before rollover.plugins.security_analytics.alert_history_max_docs(Long, default1000, minimum0) — maximum document count for an alert history index before rollover.plugins.security_analytics.alert_history_retention_period(Time, default60d) — retention period after which alert history indices are deleted.plugins.security_analytics.alert_history_rollover_period(Time, default12h) — how often the alert history rollover job runs.plugins.security_analytics.auto_correlations_enabled(Boolean, defaultfalse) — automatically generate correlation rules from new findings.plugins.security_analytics.correlation.detector_cache_ttl(Time, default5m) — TTL for the in-memory monitor-id to detector cache. Set to0sto disable the cache.plugins.security_analytics.correlation.events_backpressure.enabled(Boolean, defaulttrue) — write-block the events indices when the correlation backlog fills, so ingestion pauses and the backlog drains instead of the node running out of memory.plugins.security_analytics.correlation.events_backpressure.high_watermark_percent(Integer, default100, range 1–100) — backlog level, as a percent ofcorrelation.max_pending_findings, at or above which the events indices are write-blocked.plugins.security_analytics.correlation.events_backpressure.low_watermark_percent(Integer, default60, range 0–99) — backlog level, as a percent ofcorrelation.max_pending_findings, at or below which the events-index write block is lifted.plugins.security_analytics.correlation.max_in_flight_findings(Integer, default50, range 1–1000) — maximum number of correlation pipelines running concurrently.plugins.security_analytics.correlation.max_pending_findings(Integer, default10000, range 1–1000000) — maximum findings waiting for a free correlation slot. When the backlog is full, new findings skip correlation so the node does not run out of memory under overload. They are still enriched and written towazuh-findings-v5-*.plugins.security_analytics.correlation.metadata_cache_ttl(Time, default5m) — TTL for the in-memory caches of log-type list and correlation rules by detector type. Set to0sto disable both caches.plugins.security_analytics.correlation_history_max_age(Time, default30d) — maximum age of a correlation history index before rollover.plugins.security_analytics.correlation_history_max_docs(Long, default1000, minimum0) — maximum document count for a correlation history index before rollover.plugins.security_analytics.correlation_history_retention_period(Time, default60d) — retention period after which correlation history indices are deleted.plugins.security_analytics.correlation_history_rollover_period(Time, default12h) — how often the correlation history rollover job runs.plugins.security_analytics.correlation_time_window(Time, default5m) — time window used to group findings into correlations.plugins.security_analytics.enable_detectors_with_dedicated_query_indices(Boolean, defaulttrue) — create dedicated query indices for new detectors.plugins.security_analytics.enable_workflow_usage(Boolean, defaulttrue) — use Alerting composite workflows when running detectors.plugins.security_analytics.enriched_findings_bulk_size(Integer, default100, range 10–1000) — number of enriched findings accumulated before a bulk index request is fired.plugins.security_analytics.enriched_findings_enrich_batch_size(Integer, default100, range 1–1000) — maximum number of findings drained from the queue per in-flight permit, fetched via a single combined MultiGet.plugins.security_analytics.enriched_findings_flush_interval(Integer, default5, range 1–60) — interval in seconds at which pending enriched findings are flushed regardless of batch size.plugins.security_analytics.enriched_findings_index_enabled(Boolean, defaulttrue) — toggle the enriched findings pipeline.plugins.security_analytics.enriched_findings_max_in_flight(Integer, default5, range 1–10) — maximum number of concurrent async enrichment chains.plugins.security_analytics.enriched_findings_max_pending(Integer, default100000, range 1–1000000) — maximum findings waiting for enrichment. Past it, new findings are refused: each one is a finding missing fromwazuh-findings-v5-*. The next periodic flush (enriched_findings_flush_interval) logs oneERRORwith the number refused since the previous report and the running total. The default absorbs whole detector runs; the limit only protects the heap when findings keep arriving faster than they are enriched.plugins.security_analytics.enriched_findings_max_pending_retries(Integer, default10000, range 0–1000000) — maximum enriched findings waiting for a retry after a failed write. Past it, failed writes are dropped and counted instead of queued.plugins.security_analytics.enriched_findings_max_retries(Integer, default5, range 0–20) — maximum number of times an enriched finding whose write failed for a transient reason (rejection, unavailable shard, retryable cluster block) is resent. Retries are sent on the periodic flush, so a write is given up on after about this many flush intervals.0disables retries.plugins.security_analytics.enriched_findings_rule_cache_max_size(Integer, default10000, minimum0, static — requires a node restart to change) — maximum number of rule-metadata entries cached in memory. Least-recently-used entries are evicted past this size.plugins.security_analytics.filter_by_backend_roles(Boolean, defaultfalse) — restrict access to detectors, rules, and findings based on the requester’s backend roles.plugins.security_analytics.finding_history_max_age(Time, default30d) — maximum age of a finding history index before rollover.plugins.security_analytics.finding_history_retention_period(Time, default60d) — retention period after which finding history indices are deleted.plugins.security_analytics.index_timeout(Time, default60s) — timeout for Ruleset Management index operations.plugins.security_analytics.max_case_management_bulk_size(Integer, default10, range 0–100, dynamic) — maximum number of findings that can be updated in a single request to the update findings endpoint (PUT /_plugins/_security_analytics/findings/_update). Setting it to0disables the endpoint entirely.plugins.security_analytics.max_detectors(Integer, default10, minimum0, no upper bound, dynamic) — maximum number of user-created detectors (Content Manager detectors do not count).plugins.security_analytics.max_rules_per_detector(Integer, default50, minimum0, no upper bound, dynamic) — maximum number of rules (custom or pre-packaged) allowed in a single input of a user-created detector (Content Manager detectors are not limited). Requests that would exceed this limit are rejected with HTTP 400.plugins.security_analytics.mappings.default_schema(String, defaultecs) — default field-mapping schema used to resolve a Sigma rule’s raw field names to Wazuh Common Schema fields when a log type does not declare its own schema.
History indices
Each history group (alerts, findings, correlations) is managed by an independent rollover job with the same five knobs: an enable toggle, a rollover period, a max age, a max document count, and a retention period after which old indices are deleted.
To tune retention for the alert history indices:
# opensearch.yml
plugins.security_analytics.alert_history_enabled: true
plugins.security_analytics.alert_history_rollover_period: 12h
plugins.security_analytics.alert_history_max_age: 30d
plugins.security_analytics.alert_history_max_docs: 1000
plugins.security_analytics.alert_history_retention_period: 60d
The same pattern applies to finding history (plugins.security_analytics.alert_finding_*, plugins.security_analytics.finding_history_*), and correlation history (plugins.security_analytics.correlation_history_*). Finding history indices only exist when the Alerting plugin stores raw findings (plugins.alerting.alert_finding_enabled: true, default false). Setting plugins.security_analytics.alert_finding_enabled does not make raw findings be stored: it enables rollover of the finding history indices and, while enabled, keeps the current write index out of the retention sweep. Retention deletion runs either way.
plugins.security_analytics.alert_finding_max_docsis deprecated. Configure finding history rollover through the otherfinding_history_*settings.
Correlation tuning
The correlation engine runs after every matched finding and consults two in-memory caches plus a concurrency limiter:
# opensearch.yml
plugins.security_analytics.correlation_time_window: 5m
plugins.security_analytics.auto_correlations_enabled: false
plugins.security_analytics.correlation.detector_cache_ttl: 5m
plugins.security_analytics.correlation.metadata_cache_ttl: 5m
plugins.security_analytics.correlation.max_in_flight_findings: 50
Both detector_cache_ttl and metadata_cache_ttl accept 0s to disable the cache entirely, which forces a lookup against the corresponding system index on every finding. Lower correlation.max_in_flight_findings on resource-constrained nodes to bound peak demand on the search thread pool.
Detector behavior
# opensearch.yml
plugins.security_analytics.enable_detectors_with_dedicated_query_indices: true
plugins.security_analytics.enriched_findings_index_enabled: true
plugins.security_analytics.enable_workflow_usage: true
plugins.security_analytics.filter_by_backend_roles: false
Setting enriched_findings_index_enabled to false disables the Wazuh enriched findings pipeline described in Architecture: no wazuh-findings-v5-{category}* documents are produced. Raw findings are unaffected — they are written to .opensearch-sap-{integration}-findings-* only when the Alerting plugin’s plugins.alerting.alert_finding_enabled is true (default false), so with that setting at its default, disabling enrichment leaves no finding stored at all.
Resource creation limits
# opensearch.yml
plugins.security_analytics.max_detectors: 10
plugins.security_analytics.max_rules_per_detector: 50
plugins.security_analytics.max_case_management_bulk_size: 10
max_detectors— caps the number of user-created detectors; Content Manager–created detectors are exempt.max_rules_per_detector— caps the number of rules (custom or pre-packaged) a single input of a user-created detector can reference; Content Manager–created detectors are exempt.max_case_management_bulk_size— caps the number of findings that can be updated in one call to the update findings endpoint. Set it to0to disable the endpoint entirely.
All three settings are dynamic.
Compiled query size limits
When a detector is created or updated, each Sigma rule is compiled into a query_string query and indexed into the detector’s query index. The compiled queries are subject to OpenSearch core limits — these are not Ruleset Management settings, but they are what keeps an overly broad rule from running:
search.query.max_query_string_length(Integer, default32000, dynamic) — maximum length, in characters, of a single query string. A rule whose compiled query is longer is still accepted, but its query cannot be indexed into the detector’s query index, so it never raises a finding. No API response reports it: the indexer logs aDocLevelMonitorQueriesERRORcontainingQuery string length exceeds max allowed length 32000 (search.query.max_query_string_length); actual length: <n>, and logs it again on every run of the detector’s monitor.search.query.max_query_string_length_monitor_only(Boolean, defaultfalse, dynamic) — whentrue, an oversized query string is logged as aWARNand parsed anyway, instead of being rejected. The clause limit below still applies.indices.query.bool.max_clause_count(Integer, default1024, dynamic) — maximum number of clauses in a boolean query, for every query in the cluster, not only compiled rules. A detection OR-ing thousands of values exceeds it, so raising the length limit or enabling the monitor-only mode is not enough on its own: both this limit and the length limit must be raised.
All three can be changed through the Cluster Settings API (see Updating a setting at runtime), and a raised limit applies from the next run of the detector’s monitor. Fix the rule instead of raising the limits: a detection that enumerates thousands of literal values (file hashes, for example) compiles into one query of thousands of wildcard clauses, which takes seconds to evaluate each time the monitor checks new events, even a single one.
Enrichment tuning
The enriched findings service batches index requests and limits concurrency to avoid overloading the transport layer. The settings below can be tuned independently:
# opensearch.yml
plugins.security_analytics.enriched_findings_bulk_size: 100
plugins.security_analytics.enriched_findings_max_in_flight: 5
plugins.security_analytics.enriched_findings_flush_interval: 5
plugins.security_analytics.enriched_findings_enrich_batch_size: 100
plugins.security_analytics.enriched_findings_rule_cache_max_size: 10000
bulk_size— findings are buffered until this count is reached, then flushed as a single bulk request. Lower it on low-throughput nodes to reduce latency; raise it on high-throughput nodes to improve indexing efficiency.max_in_flight— caps the number of concurrent enrichment chains (MultiGet + build + index). Lower it on resource-constrained nodes to reduce peak demand on the transport layer.flush_interval— interval in seconds at which any remaining buffered findings are flushed, regardless ofbulk_size. Prevents findings from sitting in the buffer indefinitely during low-activity periods.enrich_batch_size— maximum number of findings drained from the queue per in-flight permit; their triggering events are fetched in a single combined MultiGet instead of one per finding, reducing round-trips under load.rule_cache_max_size— bounds the in-memory rule-metadata cache. Each cached entry holds a full rule document (compliance and MITRE maps included); least-recently-used entries are evicted past this size and re-fetched on demand.
Overload protection and enrichment throughput
Under sustained load, doc-level monitors publish findings faster than correlation and enrichment can process them. These settings bound that work so the node sheds or pauses load instead of running out of memory, and tune how efficiently the enrichment pipeline writes wazuh-findings-v5-*.
# opensearch.yml
# Bound the correlation backlog
plugins.security_analytics.correlation.max_pending_findings: 10000
# Bound the findings waiting for enrichment
plugins.security_analytics.enriched_findings_max_pending: 100000
# Pause ingestion when the backlog fills, resume when it drains
plugins.security_analytics.correlation.events_backpressure.enabled: true
plugins.security_analytics.correlation.events_backpressure.high_watermark_percent: 100
plugins.security_analytics.correlation.events_backpressure.low_watermark_percent: 60
# Enrichment pipeline throughput
plugins.security_analytics.enriched_findings_bulk_size: 100
plugins.security_analytics.enriched_findings_enrich_batch_size: 100
plugins.security_analytics.enriched_findings_max_in_flight: 5
plugins.security_analytics.enriched_findings_flush_interval: 5
plugins.security_analytics.enriched_findings_rule_cache_max_size: 10000
Correlation and enrichment are bounded separately, because enrichment is what writes the finding to wazuh-findings-v5-*. A finding is handed to enrichment before it waits for a correlation slot:
correlation.max_pending_findingscaps how many findings may wait for a free correlation slot (the slots themselves are limited bycorrelation.max_in_flight_findings). A detector run publishes all its findings at once, so a large run can fill the backlog: the findings that do not fit skip correlation only, and the first of them and every 10000th are logged asCorrelation queue capacity reached.- With
events_backpressure.enabled, the plugin also write-blocks the events indices when the backlog reacheshigh_watermark_percent, so no new events are indexed and the backlog can drain; the block is lifted atlow_watermark_percent. The block cannot stop a detector run that is already publishing its findings. enriched_findings_max_pendingcaps how many findings may wait for enrichment. It is the only one of these limits that loses findings: past it, findings are refused and logged asEnrichment queue capacity reachedatERROR.
The enrichment throughput settings shape the load the pipeline puts on the cluster: enrich_batch_size findings are drained per in-flight permit and their source events are fetched in one combined MultiGet; enriched documents are buffered and written in bulks of bulk_size, flushed at least every flush_interval seconds; max_in_flight bounds the concurrent enrichment chains; and rule_cache_max_size bounds the in-memory rule-metadata cache.
Updating a setting at runtime
Almost every Ruleset Management setting is dynamic. To change one without restarting the node, use the Cluster Settings API:
curl -sk -u admin:$WAZUH_INDEXER_ADMIN_PASSWORD -X PUT "https://127.0.0.1:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
{
"persistent": {
"plugins.security_analytics.correlation.max_in_flight_findings": 100
}
}'
Notes
- Changes to
opensearch.ymlrequire a restart of the Wazuh Indexer to take effect. Dynamic settings can additionally be updated at runtime via the Cluster Settings API shown above. index.correlationis an index-scope setting and must be applied to individual indices (for example, via an index template or the_settingsAPI), not to the cluster as a whole.- Rollover jobs are enforced by the OpenSearch Job Scheduler. Actual rollover timing may vary slightly depending on cluster load.