wazuh.blog/ knowledge base/ wazuh-tips-and-tricks
Wazuh tips, tricks and tools.
Wazuh tools and tips from working with rules, decoders and alerts. Every article shows a specific configuration or command from vendor documentation.
Wazuh tools
- Testing rules and decoders with wazuh-logtest
wazuh-logtest in practice: CLI options (-v, -U, -l), phases 1-3 and firedtimes, the PUT /logtest API with session closing, and rule_test defaults. - Wazuh rules from a repository: deployment through the API and cluster sync
Deploy rules, decoders and CDB lists from a git repository to a Wazuh 4.14 manager or cluster: PUT /rules/files, logtest, validation, restart, RBAC, rollback. - CDB lists in Wazuh: lookup attributes, built-in lists, API and an example
Wazuh 4.14 CDB list attributes in rules, shipped lists, file management through the API and a full example: list file, ossec.conf, rule and logtest. - Wazuh Integrator and email: alerts outside the manager
Configuring wazuh-integratord and email in Wazuh: level, rule_id and group filters, custom- scripts, the email_maxperhour limit and email_alerts blocks. - Custom SCA policies in Wazuh: YAML structure, rules, schedule and results
How to write a custom Wazuh SCA policy: YAML sections, the all, any, none conditions, rule types, deployment via agent.conf, scan schedule and reading results.
Tips: rules and decoders
- Detection engineering in Wazuh: from a raw log to a tested rule
From raw log to Wazuh rule: decoder, local_rules.xml with IDs 100000-120000, three wazuh-logtest phases and overwrite for rule 5710 without editing the ruleset. - Custom Wazuh decoders: syntax, regex, sibling and dynamic fields
Wazuh decoders in practice: tag table, OS_Regex and pcre2 syntax, sibling decoders, dynamic fields, and an example with the expected Phase 2 output in logtest. - Event correlation in Wazuh rules: frequency, timeframe and same_*
Correlation in Wazuh rules: frequency and timeframe, if_matched_sid, same_* and different_* grouping, ignore, and testing event series in wazuh-logtest. - Multi-line logs in Wazuh: multi-line and multiline_regex
Localfile setup for multi-line logs in Wazuh: multi-line with a fixed line count, multiline_regex with match, replace and timeout, plus ignore and restrict. - Testing Wazuh rules for WordPress traffic
How to test Wazuh web rules for WordPress: wazuh-logtest phases, the -U option, the PUT /logtest API, positive and negative fixtures, and rules 31100 to 31151.
Tips: alert analysis
- Wazuh alert triage: read the fields and recover context
How to read a Wazuh JSON alert: rule.level, groups, MITRE, decoder, location and firedtimes, and when to reach for the archives. With a triage checklist. - Archives vs alerts in Wazuh: what goes where
archives.log, archives.json and alerts.json: the logall, logall_json and log_alert_level options, Filebeat archives, wazuh-archives-* and file rotation. - Vulnerability priorities from Wazuh: EPSS and CISA KEV next to CVSS
How to rank CVEs from the wazuh-states-vulnerabilities index: indexer export, EPSS from the FIRST API, CISA KEV, a curl and jq script, and metric limits. - Wazuh agent OS inventory: Syscollector OS versions and end of support
Collect OS versions from Wazuh 4.14 agents via Syscollector, the API and the indexer, and compare them with Ubuntu, Debian and Windows end of support dates.