PL EN
WB-B0621B35TLP:CLEARWazuh 5

Wazuh 5 without frequency rules and integratord: Alerting monitors and Notifications channels

Wazuh 5 has no frequency rules, integratord or email_alerts. A bucket-level Alerting monitor counts findings per source.ip and a channel sends the webhook.

In Wazuh 5 a rule does not count repetitions, and the manager does not send notifications. Repeated events are counted by an Alerting monitor on the findings in the wazuh-findings-v5-* index, and sending is handled by a Notifications channel. I show this flow using a 4.x frequency rule as the example.

Wazuh 5.0 is a release candidate: this post covers tag v5.0.0-rc2. Tag v5.0.0-rc3 came out on 4 December 2026 and is not covered here, and there is no stable version yet, so names and settings may change after the GA release. The rc2 indexer is OpenSearch 3.6.0, so the OpenSearch 3.6 documentation applies to the Alerting and Notifications modules. The monitor, the channel and the default settings were tried on a lab running the 5.0.0-rc2 Docker image: the channel was created through the API and the monitor ran as a dry run (_execute?dryrun=true) against real findings. Delivery to an external recipient was not part of the lab. The values in the examples are synthetic: addresses from the 192.0.2.0/24 range, host example.com, 4.x rule IDs from 100000, and the rule UUID is made up.

What replaces frequency rules, if_sid and integratord

According to the migration guide, the new flow is made of four changes:

Wazuh 4.xWazuh 5.x
frequency rule and timeframe, e.g. 5712 for SSHan Alerting monitor that counts findings
if_sid, a chain of rulesno if_sid: an event produces a finding for every matching rule
<integration> block in ossec.confan Alerting monitor with a Notifications channel
<email_alerts> blockan Alerting monitor with an email channel in Notifications

Wazuh 5.x has no frequency rules: to alert on repeated events you need a monitor that counts findings. The 4.x mechanisms are described in the articles on event correlation and on the integrator and email. Where findings come from and how they differ from alerts is covered in the article on Sigma rules, and the data streams in the article on WCS and indices.

The 4.x frequency rule

The reference point is a pair of rules: the base rule detects a failed login, and the correlation rule waits for further matches from the same source address.

<group name="authentication,">
  <rule id="100009" level="3">
    <decoded_as>json</decoded_as>
    <field name="event">login_failed</field>
    <description>Example: failed login event</description>
    <options>no_log</options>
  </rule>

  <rule id="100010" level="10" frequency="8" timeframe="300">
    <if_matched_sid>100009</if_matched_sid>
    <same_srcip />
    <description>Example: repeated failed logins from one source</description>
  </rule>
</group>

Rule 100010 requires matches of rule 100009 within 300 seconds with the same srcip. In Wazuh 5 the equivalent is a monitor that counts the findings of one rule every minute in a five-minute window and groups them by source.ip.

Monitor types

The Alerting module has five kinds of monitors, each with its own triggers and data sources:

MonitorTriggerInputUse
query-levelQueryLevelTriggerSearchInputthe query result as a whole, one alert
bucket-levelBucketLevelTriggerSearchInput with aggregationsan alert for each bucket, e.g. an IP address
cluster metricsQueryLevelTriggerClusterMetricsInputindexer cluster state
document-levelDocumentLevelTriggerDocLevelMonitorInputsingle documents, creates findings
Active ResponseDocumentLevelTriggerDocLevelMonitorInputwrites requests to wazuh-active-responses

Bucket-level is the one to use for counting, because it groups findings by a field and evaluates each group separately. Findings are created by document-level monitors. An alert from a bucket-level monitor is therefore not a new finding in wazuh-findings-v5-*. The Alerting module findings (.opensearch-alerting-finding-history-*) differ from the Security Analytics findings that you read in this example.

An alert moves through the states Active, Acknowledged, Completed and Error. When the condition stops being met, the module marks the alert as Completed by itself. With the default plugins.alerting.alert_history_enabled: false, such an alert is deleted together with its comments, and no alert history index is created. If you want to see afterwards which addresses raised an alarm, turn that setting on before the monitor starts running.

According to the documentation, Wazuh creates no default monitors, and the health check only verifies that the default channels exist. On the rc2 lab, however, the monitor list was not empty: Security Analytics had created one workflow monitor per detector (23). They show up in _plugins/_alerting/monitors/_search, but detector monitors do not count toward plugins.alerting.monitor.max_monitors (10 by default). That is why, with 23 monitors present, the limit did not stop another one from being created through the API.

A monitor counting findings per source.ip

The official example, in the section on correlating findings in the detection workflow, combines three rules and looks for a successful login after a series of failed ones. The variant below is simpler: it counts the findings of one rule per source address in 5 minutes. Replace the rule UUID (0b6d5a1e-0000-4000-8000-000000000001) with the identifier from the Ruleset Management > Detection > Rules page.

In the dashboard: Explore > Alerting > Monitors > Create monitor, choose Per bucket monitor and Extraction query editor, a 1 minute schedule and the index wazuh-findings-v5-*. The query, trigger and action look as in the request below.

# Create the bucket-level monitor (assembled from the documented UI fields)
curl -sk -u "${INDEXER_USER}:${INDEXER_PASSWORD}" -X POST \
  "https://${INDEXER_HOST}:9200/_plugins/_alerting/monitors" \
  -H "Content-Type: application/json" -d @monitor.json

The -k option turns off verification of the indexer certificate and only belongs in a lab with self-signed certificates. On a host set up with the 5.0.0-rc2 installer, replace it with --cacert /etc/wazuh-indexer/ca/root-ca.pem, as long as the address in the URL is in the node certificate’s SAN; the file has mode 0640, so run the command as root (the rc2 installation assistant’s install_functions/indexer.sh sets that path and mode; that comes from reading the code, not from a test). The Wazuh documentation shows monitors only in the dashboard, while the Alerting API examples from the OpenSearch documentation worked unchanged on the rc2 lab. monitor.json follows the structure of the bucket-level example there:

{
  "type": "monitor",
  "monitor_type": "bucket_level_monitor",
  "name": "repeated-findings-per-source-ip",
  "enabled": true,
  "schedule": { "period": { "interval": 1, "unit": "MINUTES" } },
  "inputs": [
    {
      "search": {
        "indices": ["wazuh-findings-v5-*"],
        "query": {
          "size": 0,
          "query": {
            "bool": {
              "filter": [
                { "term": { "wazuh.rule.id": "0b6d5a1e-0000-4000-8000-000000000001" } },
                {
                  "range": {
                    "@timestamp": {
                      "from": "{{period_end}}||-5m",
                      "to": "{{period_end}}",
                      "include_lower": true,
                      "include_upper": true,
                      "format": "epoch_millis"
                    }
                  }
                }
              ]
            }
          },
          "aggregations": {
            "composite_agg": {
              "composite": {
                "sources": [{ "src": { "terms": { "field": "source.ip" } } }]
              }
            }
          }
        }
      }
    }
  ],
  "triggers": [
    {
      "bucket_level_trigger": {
        "name": "eight-or-more-findings",
        "severity": "2",
        "condition": {
          "buckets_path": { "count_var": "_count" },
          "parent_bucket_path": "composite_agg",
          "script": { "source": "params.count_var >= 8", "lang": "painless" },
          "gap_policy": "skip"
        },
        "actions": [
          {
            "name": "notify-example-webhook",
            "destination_id": "<CHANNEL_ID>",
            "subject_template": { "source": "{{ctx.trigger.name}}", "lang": "mustache" },
            "message_template": {
              "source": "{ \"text\": \"Monitor {{ctx.monitor.name}}, trigger {{ctx.trigger.name}} (severity {{ctx.trigger.severity}}). Source IP: {{#ctx.newAlerts}}{{bucket_keys}} {{/ctx.newAlerts}}. Period: {{ctx.periodStart}} - {{ctx.periodEnd}}\" }",
              "lang": "mustache"
            },
            "throttle_enabled": true,
            "throttle": { "value": 30, "unit": "MINUTES" },
            "action_execution_policy": {
              "action_execution_scope": {
                "per_alert": { "actionable_alerts": ["DEDUPED", "NEW"] }
              }
            }
          }
        ]
      }
    }
  ]
}

Elements of the request:

  • The range filter on @timestamp uses the {{period_end}} variable with format: epoch_millis and looks five minutes back. In the dry run, ctx.periodStart and ctx.periodEnd covered one minute, which is the schedule interval. A message body with these variables therefore shows the run minute, and the five-minute window is in the query.
  • The composite_agg aggregation groups by source.ip. A bucket-level trigger requires buckets_path, a parent_bucket_path pointing at a multi-bucket aggregation, and a script. _count feeds the count_var variable, and gap_policy: skip skips buckets without a value, as in the official example. On the lab wazuh.rule.id was mapped as keyword and source.ip as ip, and source.ip appeared in findings of the network-activity, system-activity and security categories. Findings of any other category carry it only if the decoder fills that field.
  • The condition params.count_var >= 8 is a sample threshold picked to match frequency="8" in the 4.x rule. The script runs for each bucket, so every address that exceeds it gets a separate alert. A composite aggregation without size returns a page of 10 buckets and that is what you see in the query result, but on the lab the trigger evaluated all 138 addresses from the window. If more than 50 addresses cross the threshold in one run, the per_alert action runs once for the whole run rather than once per address. That limit is plugins.alerting.max_actionable_alert_count, and -1 removes it.
  • The action_execution_policy block with per_alert and the actionable_alerts list (DEDUPED, NEW) comes from the same API example. Active Response monitors in Wazuh accept only the per_alert scope and give it to any action that has no action_execution_policy.

The official example is tested with six failed SSH logins for a nonexistent user from another host. With the threshold >= 8, send at least eight attempts within five minutes and wait for the next monitor run. The monitor page will show Triggered in the history and an active alert in the Alerts table.

A webhook channel in Notifications

Alerting hands the action to the Notifications module, which sends the message. You create the channel in Explore > Notifications > Channels or through /_plugins/_notifications/. The channel types are slack, chime, microsoft_teams, webhook, email and sns. The rc2 indexer’s opensearch.notifications.core.allowed_config_types setting also lists active_response, the type Active Response monitors use to write their requests. The list only controls what the dashboard offers; the REST API does not enforce it. On first start Wazuh creates four disabled channels: default_slack_channel, default_jira_channel, default_pagerduty_channel and default_shuffle_channel. Before use you have to enter real data and enable them.

The webhook channel body for POST /_plugins/_notifications/configs, with the fields described in the Notifications API documentation (config, config_type, a webhook object with url and header_params):

{
  "config": {
    "name": "example-webhook",
    "description": "Synthetic webhook for brute-force monitor",
    "config_type": "webhook",
    "is_enabled": true,
    "webhook": {
      "url": "https://hooks.example.com/wazuh/findings",
      "header_params": { "Content-Type": "application/json" }
    }
  }
}

POST /_plugins/_notifications/configs with this body returns a config_id, which you put into the destination_id field of the action. The setting opensearch.notifications.core.http.host_deny_list has a built-in list that blocks loopback, link-local, private (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), CGNAT, documentation, multicast and reserved addresses, IPv4 and IPv6. On the lab, a channel send test with an address from the 192.0.2.0/24 range used in the examples ended with code 400 and the message Host of url is denied, based on plugin setting [notification.core.http.host_deny_list]. The list covers the slack, chime, microsoft_teams and webhook channels; email and SNS deliveries are not checked. A webhook to a SOAR in a private network will not work until you change this list, and your own list replaces the built-in one entirely. Set it in opensearch.yml or through the cluster settings API. notifications-core.yml ships with host_deny_list: [], but the indexer does not read that key, so the entry unblocks nothing.

Mustache variables and throttling

The action message is a Mustache template. For a webhook the body must match the channel Content-Type header, so for JSON you write JSON. The variables used in the example and most often needed for bucket-level monitors:

VariableMeaning
ctx.monitor.name, ctx.trigger.name, ctx.trigger.severityname of the monitor, name of the trigger and its severity
ctx.periodStart, ctx.periodEndstart and end of the period in which the alert fired
ctx.newAlertsalerts newly created in this run
ctx.dedupedAlertsalerts that already exist and are not created again
ctx.completedAlertsalerts that completed or expired
bucket_keysbucket keys separated by commas, here the source.ip address
sample_documentsa sample of the bucket documents (_index, _id, _source)

Refer to the query result in the template as {{ctx.results.0}}; the notation {{ctx.results[0]}} will not work. Iterate over alerts with a section, like {{#ctx.newAlerts}}...{{/ctx.newAlerts}} in the example.

Throttling limits the number of notifications in a given time. With a monitor checked every minute and a throttle of 60 minutes you get at most one notification per hour, even though the condition is met many times. The lab did not cover how throttling behaves over time or how alerts move between states, because the monitor only ran as a dry run. In Wazuh the setting plugins.alerting.action_throttle_max_value (24h by default, confirmed by GET _cluster/settings?include_defaults=true on rc2) sets the largest interval you can configure. The monitor limits in Wazuh are 10 monitors by default (plugins.alerting.monitor.max_monitors) and 10 triggers per monitor (plugins.alerting.monitor.max_triggers, at most 50), and you change both through PUT _cluster/settings.

Correlation in Security Analytics

After a Sigma rule matches, the Security Analytics module runs the correlation engine and, according to the documentation, correlates related findings across detectors. The settings in opensearch.yml with the prefix plugins.security_analytics. include:

SettingDefaultMeaning
correlation_time_window5mwindow for grouping findings into correlations
auto_correlations_enabledfalseautomatic creation of correlation rules from new findings
correlation.max_in_flight_findings50number of parallel correlation pipelines

In the engine code a correlation rule can carry a trigger with a severity and actions. A matching correlation then creates an alert in .opensearch-sap-correlation-alerts and sends a notification through a Notifications channel (that comes from reading the code, not from a test). Wazuh 5.0.0 ships no correlation rules, though, and the standard detectors have no triggers: they write findings but raise no alerts and call no channels. Correlation links findings of different categories within one time window and does not count repetitions, so it cannot stand in for a frequency rule. A numeric threshold and sending are handled by an Alerting monitor.

Moving a frequency rule, step by step

The order below is a suggestion, not a vendor procedure:

  1. For the old rule, write down: the base rule, the threshold, the time window and the grouping field.
  2. In Ruleset Management, find the Sigma rules that produce findings for the same event and copy their UUIDs. 4.x and 5.x rules have different identifiers.
  3. Build the monitor in the dashboard, run the query with the Run button and check the buckets before adding the trigger. Through the API the same test is POST _plugins/_alerting/monitors/_execute?dryrun=true with the monitor body.
  4. Add the channel, throttling and a per_alert action, and only then enable the monitor.
  5. Save the monitor content with GET _plugins/_alerting/monitors/<ID> in a repository, because here the monitor replaces the 4.x rule file.

Sources

↑↓ select Enter open Esc close