wazuh.blog/ knowledge base/ wazuh-tuning
Wazuh tuning.
Wazuh tuning has two parts. Performance tuning is about throughput: analysisd queues, the agent buffer, disconnections, index retention and the cluster. Rule tuning is about noise: alert levels, suppression, correlation deduplication and filtering events on the agent.
Performance tuning: throughput and dropped events
- Where events go missing: analyzing losses in analysisd
When Wazuh loses events: how to read events_dropped and the queues in wazuh-analysisd.state, compute deltas between readings and relate them to CPU load. - Wazuh agent buffer: client_buffer, EPS and lost events
How the Wazuh agent buffer works, what the client_buffer limits and alerts 202-205 mean, and how to judge the risk of lost events before the manager. - Disconnected Wazuh agents: keepalive and agents_disconnection_time
When the Wazuh manager marks an agent as disconnected: keepalive, agents_disconnection_time and its alert, notify_time, the agent state file, API and wazuh-db. - OpenSearch retention: how a policy deletes vulnerability state
An ISM policy with a delete action on the wazuh-states-* pattern can empty vulnerability state indices. How to check the policy assignment and design retention. - Wazuh cluster: configuration, health checks and the limits of each test
Wazuh cluster: the cluster block with defaults, port 1516, cluster_control, the API, analysisd.state, filebeat test output and the limits of each check. - Zabbix 7.0 templates for Wazuh: manager, indexer, dashboard and agent
Five Zabbix 7.0 templates for Wazuh 4.14: data sources, read-only users in API and OpenSearch, agent access through ACLs and upgrading from the old template.
Rule and alert tuning
- Wazuh rule levels and alert thresholds: log_alert_level, email, overwrite
Wazuh rule levels 0-16, the log_alert_level and email_alert_level thresholds, the email limit, no_log and alert_by_email, and changing a level with overwrite. - Suppressing SSH alerts in Wazuh: level 0, if_sid and CDB lists
Wazuh sshd rules: level 0, if_sid, CDB lists and overwrite. How to cut noise without losing the 5712 and 5720 alerts, plus a wazuh-logtest regression set. - Alert fingerprint and time window: deduplicating correlation in Wazuh
Merge repeating alerts into one incident: frequency and ignore in rules, a fingerprint with a time bucket, an OpenSearch upsert write, and collapse for review. - How Wazuh loads rules: rule_dir, rule_exclude and file order
How Wazuh loads rules and decoders: the ruleset block, rule_dir with pattern, rule_exclude, alphabetical order, local_rules.xml, overwrite and manager restart.
Filtering events at the source
- EventChannel filtering in Wazuh: query, XPath and win.* fields in rules
EventChannel in Wazuh: localfile, query with XPath and QueryList, Windows Event Log syntax limits, and the win.system and win.eventdata fields used in rules. - Wazuh FIM: the syscheck options that change the outcome
Syscheck directories attributes with defaults, scan scheduling, whodata on Linux and Windows, syscheck.* alert fields and rules 550, 553 and 554. - FIM for WordPress: directories, alert fields and rule collisions
Syscheck configuration for a WordPress tree, FIM alert fields, rules 550, 553 and 554, and collisions with rule 86600 when JSON keys have generic names.