Home/ Blog/ Explainers/ Article
Blog · Explainers

How to Use Wazuh as a SIEM: Collect, Correlate, and Alert Across Hosts

How to use Wazuh as a SIEM: collect agent and syslog data, write a cross-host correlation rule with global_frequency, route alerts, and set retention.

Suriq cover card reading: Use Wazuh as a SIEM that sees across hosts

To use Wazuh as a SIEM, send every log source to one Wazuh server, let its built-in rules score each event, then add correlation rules that look across hosts, not just within one. Agents cover your servers, syslog covers firewalls and appliances, and the dashboard is where you search, investigate, and report on the result.

Think of a building with a guard at every door. Each guard notices a stranger rattling their own handle twice and shrugs: two tries is nothing. Only the security office, watching every door on one screen, sees the same stranger trying all twelve doors in ten minutes. A SIEM (security information and event management system) is that office. Wazuh gives you the screen out of the box, but the part that connects doors is something you have to switch on, and that is what this guide is mostly about.

What does using Wazuh as a SIEM actually mean?

It means using Wazuh for four jobs: collecting logs centrally, turning raw lines into scored alerts, connecting related events across machines, and keeping a searchable history. If you are new to the term, our plain-English explainer on what a SIEM is and how it differs from a SOC and EDR covers the background. Here is how each SIEM job maps onto a piece of Wazuh you configure.

SIEM jobWazuh piece that does itWhere you set it up
Collect logs centrallyAgents on hosts, plus the server's syslog listener for devicesAgent ossec.conf, server remote block
Turn lines into alertsDecoders and rules, each alert scored from level 0 to 15Built-in ruleset, plus local_rules.xml
Connect events across hostsFrequency rules with the global_frequency optionYour own rules in local_rules.xml
Notify peopleEmail alerts by level or rule IDServer ossec.conf
Search and keep historyThe Wazuh indexer and dashboardDashboard, Index Management
The five SIEM jobs and the Wazuh component behind each. Source: Wazuh documentation; layout is ours.

Step 1: get every source into one place

A SIEM is only as good as what it can see, so the first step is making sure your servers and your network devices all report to the same Wazuh server. Servers get a Wazuh agent, which reads their logs and ships them on TCP 1514; our guide to configuring and grouping the Wazuh agent walks through enrollment.

Firewalls, routers, and appliances cannot run an agent, so they send syslog straight to the server instead. Add a listener to the server's /var/ossec/etc/ossec.conf, limited to the network your devices live on:

/var/ossec/etc/ossec.conf · on the Wazuh server
<remote>
  <connection>syslog</connection>
  <port>514</port>
  <protocol>tcp</protocol>
  <allowed-ips>192.168.2.0/24</allowed-ips>
  <local_ip>192.168.2.10</local_ip>
</remote>

Set protocol to whatever your devices send (many default to UDP), allow port 514 from that subnet in the server's host firewall, then restart the manager with sudo systemctl restart wazuh-manager. The Wazuh syslog documentation lists the options. One detail matters later: syslog from devices arrives under the server itself (agent ID 000), not under a separate agent per device. For the device side, see how to forward syslog to a central server.

Step 2: know what the built-in rules already give you

Out of the box, Wazuh ships thousands of rules for common log formats, so you start with a working detection layer rather than an empty one. Every rule assigns a level from 0 to 15, and most carry two kinds of tags you will use constantly.

  • MITRE ATT&CK technique IDs. The SSH failed-password rule, 5760, is tagged T1110.001 (password guessing). That lets you group alerts by attacker behavior instead of by log source.

  • Compliance groups. The same rule carries tags such as pci_dss_10.2.4 and hipaa_164.312.b. These are what the dashboard's regulatory compliance views filter on, which is why auditors can be shown evidence without you building reports by hand.

The ruleset also contains correlation rules. Rule 5763 fires at level 10 when rule 5760 matches 8 times within 120 seconds from the same source IP. That is real brute-force detection, but it has a limit most people never notice, and Step 3 is about that limit.

Step 3: write a correlation rule that spans hosts

By default, a Wazuh frequency rule only counts events from the same agent. The Wazuh rules syntax reference is explicit about this in its entry for global_frequency: unless you add that option, the counter only grows with events from the agent that triggered it. So rule 5763 catches an attacker hammering one server, and misses one who tries a few passwords on each of many servers. That pattern is password spraying (MITRE ATT&CK T1110.003), and catching it is exactly the job a single host cannot do.

Add this rule to /var/ossec/etc/rules/local_rules.xml on the server. Custom rules use IDs from 100000 upward so they never collide with the shipped ruleset:

/var/ossec/etc/rules/local_rules.xml · on the Wazuh server
<group name="local,sshd,">
  <rule id="100200" level="12" frequency="10" timeframe="600" ignore="300">
    <if_matched_sid>5760</if_matched_sid>
    <same_srcip />
    <global_frequency />
    <description>sshd: one source IP failing logins across multiple servers (possible password spray)</description>
    <mitre>
      <id>T1110.003</id>
    </mitre>
    <group>authentication_failures,pci_dss_10.2.4,pci_dss_10.2.5,</group>
  </rule>
</group>

The rule fires once rule 5760 (a failed SSH password) has matched 10 times in 600 seconds, all from one source IP. global_frequency is the key line: it counts those failures across every agent on the manager instead of per host. ignore="300" silences the rule for five minutes after it fires, so one spray produces one alert, not a flood. Level 12 is deliberate, because it matches the default email threshold covered in Step 4.

Restart the manager to load it with sudo systemctl restart wazuh-manager. If the restart fails, the manager log at /var/ossec/logs/ossec.log names the line with the XML error.

Why a per-host rule misses a password spray198.51.100.23one source IPweb-01: 3 failuresweb-02: 3 failuresweb-03: 3 failuresweb-04: 3 failuresRule 5763, per hostneeds 8 on one host: silentRule 100200, global12 of 10 across hosts: fires
Three failures per server never reach the built-in per-host threshold of 8, so rule 5763 stays silent. Counted across all agents, the same 12 failures pass the threshold of 10 and rule 100200 fires. Thresholds from the Wazuh sshd ruleset; scenario is illustrative.

Worked example: a password spray no single server notices

Here is the scenario from the diagram, traced end to end. Between 10:02 and 10:08, the address 198.51.100.23 tries three passwords against the deploy account on each of four web servers. Each server logs lines like this one in its auth log:

/var/log/auth.log · on web-02
Nov 19 10:04:37 web-02 sshd[18822]: Failed password for deploy from 198.51.100.23 port 51122 ssh2

First, confirm the base rule matches. Paste that line into wazuh-logtest on the server; phase 3 should report rule 5760. (Our wazuh-logtest guide explains all three phases.)

output · wazuh-logtest, trimmed
$ sudo /var/ossec/bin/wazuh-logtest
Nov 19 10:04:37 web-02 sshd[18822]: Failed password for deploy from 198.51.100.23 port 51122 ssh2
**Phase 2: Completed decoding.
        name: 'sshd'
        parent: 'sshd'
        dstuser: 'deploy'
        srcip: '198.51.100.23'
        srcport: '51122'
**Phase 3: Completed filtering (rules).
        id: '5760'
        level: '5'
        description: 'sshd: authentication failed.'

Note what logtest cannot show: it replays lines in one session from one location, so it will not prove the cross-agent counting. For that, look at the real alerts. Each web server sees 3 failures, well under the 8 that rule 5763 needs, so no host-level brute-force alert appears. On the tenth failure across the fleet, rule 100200 fires. Pull it out of the alert log on the server:

terminal · on the Wazuh server
$ sudo jq -c 'select(.rule.id=="100200") | {time: .timestamp, agent: .agent.name, srcip: .data.srcip, desc: .rule.description}' /var/ossec/logs/alerts/alerts.json
{"time":"2026-11-19T10:07:12.448+0000","agent":"web-04","srcip":"198.51.100.23","desc":"sshd: one source IP failing logins across multiple servers (possible password spray)"}

The agent named in the alert is whichever host saw the tenth failure, here web-04. That is why the next move is a search, not a fix on one box. In the dashboard, filter on data.srcip: 198.51.100.23 and you see all twelve failures across the four servers on one timeline. Then check the one question that matters: is there a successful login (rule 5715) from that IP anywhere? If not, block the address at the edge and confirm the deploy account uses keys rather than passwords. If yes, treat that server as compromised and start your incident response plan.

Step 4: route the alerts that matter to a person

An alert nobody sees is a log line, so decide which levels reach a human. Wazuh can email alerts directly; per the Wazuh alert management documentation, the default email threshold is level 12. The server's ossec.conf already contains global and alerts blocks with email_notification set to no, so edit those existing blocks to match this rather than pasting a second copy:

/var/ossec/etc/ossec.conf · on the Wazuh server
<global>
  <email_notification>yes</email_notification>
  <smtp_server>localhost</smtp_server>
  <email_from>[email protected]</email_from>
  <email_to>[email protected]</email_to>
</global>
<alerts>
  <email_alert_level>12</email_alert_level>
</alerts>

The smtp_server points at localhost on purpose: Wazuh does not handle SMTP authentication, so if your mail provider requires a login, you run a local relay such as Postfix and let it authenticate. Because rule 100200 sits at level 12, a spray now lands in an inbox, while the routine level 5 failures stay in the dashboard.

Step 5: search, investigate, and keep the history

The dashboard is your investigation tool: every alert is stored in the Wazuh indexer under the wazuh-alerts-* indices and is searchable by any field, such as rule.id, agent.name, data.srcip, or a MITRE technique. Save the searches you run often.

Then decide how long to keep data, because Wazuh does not decide for you. The Wazuh index lifecycle documentation has you create a retention policy under Indexer management, Index Management, State management policies, with an age such as 90 days after which old alert indices are deleted. Set it to match your compliance needs and your disk, not a guess.

Where Wazuh as a SIEM breaks

  • Correlation needs decoded fields. Rule 100200 works because the sshd decoder extracts srcip. A custom app whose logs nobody wrote a decoder for can be collected but not correlated.

  • Nonexistent usernames take a different rule. A spray against usernames that do not exist matches rule 5710 (invalid user), not 5760. Copy rule 100200 with a new ID and if_matched_sid set to 5710 to cover both.

  • "Global" means one manager. The documentation is explicit that global_frequency works at manager level, not cluster level. In a multi-node cluster, events from agents on different nodes are not counted together.

  • Device syslog is one bucket. Since device logs arrive as agent 000, per-agent rules treat all your firewalls as one host. Write correlation with that in mind.

  • Retention and disk are your job. No retention policy means indices grow until the disk fills, and a full indexer stops storing alerts.

  • Tuning never ends. The default ruleset is broad. Expect to spend the first weeks lowering noisy rules and raising the few that matter to you.

Where Suriq fits

Everything above is open-source Wazuh you can run yourself. If you would rather not operate the server, indexer, and rule tuning, Suriq runs Wazuh for you as a managed service, and our SIEM replacement overview explains how that compares with a commercial SIEM. For the endpoint side of the same stack, see how to use Wazuh as an EDR.

Topics

Frequently asked questions

Can Wazuh be used as a SIEM?

Yes. Wazuh collects logs centrally from agents and syslog devices, scores each event with its rules, correlates related events, and stores alerts in a searchable indexer with a dashboard. To catch attacks spread across hosts, you add your own correlation rules with the global_frequency option.

Does Wazuh correlate events across different servers?

Not by default. A Wazuh frequency rule only counts events from the same agent. Adding the global_frequency option makes the rule count matching events from every agent on the manager, which is what catches a password spray across many servers. It works per manager, not across a cluster.

How do I get firewall logs into Wazuh without an agent?

Send them as syslog. Add a remote block with connection set to syslog to the server's ossec.conf, restrict it to your device network with allowed-ips, and restart wazuh-manager. These events arrive under the server itself, agent ID 000.

How long does Wazuh keep alerts?

Until you set a retention policy. Wazuh does not delete old alert indices on its own. You create a policy under Indexer management, Index Management, State management policies, for example deleting wazuh-alerts indices older than 90 days, sized to your compliance needs and disk.

Can Wazuh send email alerts?

Yes. Enable email_notification in the server's ossec.conf; by default it emails alerts of level 12 and above. Wazuh does not handle SMTP authentication, so if your mail provider requires a login, run a local relay such as Postfix and point smtp_server at it.

See what Suriq finds on your own servers.

Agentless checks for uptime and your cloud, a lightweight agent for detection on each server, and one console that ranks and explains what it finds.