How to Map Complex Log Fields Using Wazuh Parent Child Rules

Modern security environments generate logs from a wide variety of sources, including operating systems, cloud platforms, firewalls, web servers, identity providers, and custom-built applications. While many standard log formats are already supported by Wazuh, organizations frequently encounter proprietary or highly customized logs that require more advanced parsing and detection logic. These logs often contain multiple event types, nested fields, or varying message structures that cannot be handled effectively with a single detection rule. This is where Wazuh parent child rules become invaluable.

Instead of writing dozens of standalone rules that repeat the same conditions, Wazuh allows you to create a hierarchical rule structure.

A parent rule identifies a broad category of events, while child rules inherit the parent’s matching conditions and focus on detecting specific scenarios.

This approach reduces redundancy, improves maintainability, and makes complex detection logic significantly easier to manage.

Parent-child rule relationships are especially useful when working with:

  • Custom enterprise applications that generate proprietary log formats
  • Nested or structured JSON logs
  • Authentication events with multiple possible outcomes (success, failure, MFA, lockouts)
  • Firewall and network appliance logs containing different event categories
  • Cloud service logs with shared metadata but different actions

Rather than duplicating identical matching logic across many rules, you define common conditions once in a parent rule and extend them through specialized child rules.

The result is a cleaner, more scalable ruleset that is easier to troubleshoot and expand as your environment evolves.

In this guide, you’ll learn how Wazuh parent child rules work, how they interact with decoders and alerts, when to use them, and how to design hierarchical detection logic for complex log formats.

You’ll also see practical examples, common mistakes to avoid, and best practices for building scalable custom detection rules.

Related Guide: How to Create Custom Detection Rules in Wazuh (With Examples)


What Are Wazuh Parent Child Rules?

Parent-child rules are a hierarchical detection mechanism within the Wazuh rules engine that allows multiple rules to share common matching logic.

Instead of treating every rule as an isolated entity, Wazuh enables child rules to inherit the context established by a parent rule and perform additional evaluation before generating alerts.

This design becomes particularly valuable when multiple security events originate from the same log source but represent different activities that require unique responses.

Parent Rules

A parent rule performs the initial evaluation of an event.

It typically matches broad characteristics such as:

  • A specific decoder
  • A log source
  • An application
  • A category of events
  • Common field values

The parent rule establishes a foundation for subsequent processing but often does not generate the final security alert itself.

Instead, it passes matching events to one or more child rules for further evaluation.

For example, a parent rule might identify all authentication logs produced by a custom application regardless of whether the login succeeded or failed.

Child Rules

Child rules inherit the conditions established by the parent rule using the <if_sid> directive.

They apply additional filtering based on more specific criteria, such as:

  • Failed logins
  • Successful logins
  • Administrator access
  • MFA failures
  • Password resets
  • Account lockouts

Each child rule can assign its own:

  • Severity level
  • Alert description
  • Compliance mappings
  • MITRE ATT&CK techniques
  • Active response actions

This allows a single parent rule to support dozens of specialized detections without duplicating the same matching logic.

How Rule Inheritance Works

Rule inheritance follows a simple processing flow:

  1. A decoder parses the incoming log.
  2. The parent rule evaluates broad matching conditions.
  3. If the parent rule matches, Wazuh evaluates any child rules referencing that parent.
  4. Child rules apply additional conditions.
  5. The matching child rule generates the final alert.

This layered approach keeps detection logic modular while avoiding repeated configuration across multiple rules.

Decoders vs. Rules

One of the most common areas of confusion is the distinction between decoders and rules.

A decoder extracts structured information from raw log messages.

It identifies fields such as usernames, source IP addresses, event types, process names, timestamps, or JSON attributes.

A rule evaluates those extracted fields and determines whether the event represents something noteworthy enough to generate an alert.

Think of the workflow like this:

  • Decoder: “What information exists in this log?”
  • Rule: “Does this information represent a security event?”

Without properly extracting fields through decoders, rules have little meaningful data to evaluate.

Related Guide: Wazuh Decoder Guide

Relationship Between Parent Rules, Child Rules, and Alerts

Parent rules are primarily responsible for categorizing events.

Child rules determine exactly what happened.

For example:

  • Parent rule detects “authentication event.”
  • Child rule A detects “successful login.”
  • Child rule B detects “failed login.”
  • Child rule C detects “administrator login.”
  • Child rule D detects “multiple failed attempts.”

Although all four child rules originate from the same parent, each generates a different alert with its own severity and response.

This separation greatly improves clarity because broad parsing logic remains centralized while individual detections remain focused.

Benefits of Hierarchical Rule Design

Hierarchical rule design offers several operational advantages for security teams.

Less duplicated configuration

Common matching conditions only need to be defined once.

Easier maintenance

Changes to shared logic are made in a single parent rule rather than across dozens of individual rules.

Greater scalability

New event types can be added simply by creating additional child rules.

More consistent detections

Shared logic reduces configuration drift and minimizes inconsistent rule behavior.

Improved troubleshooting

Since parsing and detection responsibilities are clearly separated, diagnosing rule issues becomes much simpler.

The official Wazuh documentation also recommends organizing custom rules into logical hierarchies whenever possible because doing so simplifies long-term maintenance and improves readability for large rulesets.


Why Use Parent Child Rules in Wazuh?

As Wazuh deployments grow, so do the number of log sources, detection rules, and alert conditions.

Writing separate standalone rules for every event quickly becomes difficult to manage, especially when many rules share identical matching criteria.

Parent-child rules solve this problem by separating shared logic from specialized detections.

Instead of copying the same conditions repeatedly, security teams define common behavior once and extend it through child rules that focus on individual event outcomes.

This design not only reduces administrative overhead but also produces cleaner, more scalable rulesets.

Reduce Duplicate Rule Logic

Many log sources generate multiple event types that share the same structure.

For example, authentication logs may include:

  • Login success
  • *Login failure
  • Password changes
  • MFA verification
  • Account lockouts

All of these events typically use the same decoder and many of the same fields.

Rather than creating five nearly identical rules, a parent rule performs the shared matching while child rules evaluate only the fields unique to each event.

This significantly reduces duplicated XML and makes the ruleset easier to understand.

Simplify Rule Maintenance

One of the biggest advantages of hierarchical rules is centralized maintenance.

Suppose your application changes its log format and a decoder name or common field changes.

With standalone rules, every affected rule must be updated individually.

With parent-child rules, only the parent usually requires modification, while all child rules continue working without additional changes.

This reduces both maintenance time and the risk of introducing inconsistencies.

Improve Detection Accuracy

Not every event should trigger the same alert.

A successful login generally represents normal activity, while repeated failed logins may indicate a brute-force attack.

Child rules allow you to create highly specialized detections for each outcome without duplicating shared conditions.

For example, one parent rule can support child rules that detect:

  • Failed authentication
  • Privileged account access
  • Impossible travel events
  • Service account usage
  • Excessive login attempts
  • Disabled account logins

Each child rule can assign its own severity level and response based on the risk of the specific activity.

Organize Large Rule Sets

Large enterprises often maintain hundreds or even thousands of custom detection rules.

Without a hierarchical structure, these rules become difficult to navigate and maintain.

Parent-child relationships naturally group related detections together, making the ruleset easier to:

  • Read
  • Review
  • Debug
  • Extend
  • Audit

This organization becomes especially valuable when multiple analysts collaborate on custom detection content over time.

Support Complex Log Structures

Many modern applications produce logs that contain multiple event categories within the same data source.

Examples include:

  • Nested JSON events
  • Cloud audit logs
  • Identity provider logs
  • Firewall events
  • API gateway logs
  • Container platform logs

A single decoder can extract the common fields from these logs, while parent-child rules classify and evaluate the different event types independently.

This layered design aligns with modern detection engineering practices.

Organizations such as MITRE emphasize building modular detection logic that separates data collection from analytical decision-making, making security content easier to maintain and improve over time.

Related Guides:


Understanding How Rule Inheritance Works

One of the biggest strengths of Wazuh parent child rules is the way the rules engine evaluates events through a hierarchy.

Rather than testing every rule independently, Wazuh processes events in stages, allowing parent rules to establish context before child rules perform more granular analysis.

Understanding this evaluation process makes it much easier to design efficient rulesets and troubleshoot why a particular alert was, or was not, generated.

Rule Evaluation Order

When a log enters Wazuh, it passes through several stages before an alert is created.

The evaluation process generally follows this order:

  1. The log is collected by the Wazuh agent or manager.
  2. A decoder parses the raw log.
  3. Extracted fields become available for rule evaluation.
  4. Parent rules are evaluated.
  5. Matching child rules are evaluated.
  6. The best matching child rule generates the alert.

This staged approach avoids unnecessary processing because child rules are only evaluated if their parent rule has already matched.

Incoming Log
      │
      ▼
 Decoder Parses Fields
      │
      ▼
 Parent Rule Matches
      │
      ▼
 Child Rule 1?
 Child Rule 2?
 Child Rule 3?
      │
      ▼
Matching Child Generates Alert

Parent Rule Matching Process

A parent rule normally performs broad event classification.

It may identify logs based on:

  • Decoder name
  • Program name
  • Event category
  • Log source
  • JSON field existence
  • Regular expression matches

For example, a parent rule might simply identify all authentication logs generated by a custom application without determining whether authentication succeeded or failed.

This broad categorization allows many specialized detections to reuse the same foundation.

Child Rule Evaluation

Once the parent rule matches, Wazuh evaluates every child rule referencing that parent through the <if_sid> directive.

Each child applies additional conditions such as:

  • Event outcome
  • Username
  • Source IP
  • Group membership
  • Authentication method
  • Event severity
  • Specific JSON field values

Only child rules whose conditions evaluate to true continue processing.

This layered filtering greatly reduces duplicated XML while improving readability.

Multiple Child Rules Under One Parent

One parent rule can support dozens of child rules.

For example, a custom authentication application could use the following hierarchy:

Parent RuleChild RulePurpose
Authentication EventLogin SuccessSuccessful authentication
Authentication EventLogin FailureFailed credentials
Authentication EventMFA FailureMulti-factor authentication failed
Authentication EventPassword ResetPassword change detected
Authentication EventAccount LockedUser locked after repeated failures
Authentication EventAdmin LoginPrivileged account login

Every child inherits the parent’s common matching logic while focusing only on its unique conditions.

This keeps the ruleset modular and significantly easier to maintain.

Nested Parent-Child Relationships

Wazuh also supports deeper inheritance chains.

Instead of a single parent and child, you can build multiple levels of rule inheritance.

For example:

Authentication Logs (Parent)
        │
        ├── Failed Login
        │        │
        │        ├── Repeated Failed Login
        │        └── Administrator Failed Login
        │
        └── Successful Login
                 │
                 ├── Administrator Login
                 └── Service Account Login

This allows increasingly specific detections while minimizing duplicated logic.

However, excessive nesting can make rules more difficult to understand, so most deployments benefit from keeping inheritance relatively shallow.

Alert Inheritance Behavior

Although child rules inherit the parent’s matching context, they do not automatically inherit every property.

A child rule typically defines its own:

  • Rule ID
  • Description
  • Severity level
  • Groups
  • Compliance mappings
  • MITRE ATT&CK techniques
  • Active responses

The parent simply establishes the event context.

Most production deployments use parent rules primarily for classification while allowing child rules to generate meaningful alerts.

Rule IDs and Dependencies

Every Wazuh rule must have a unique numeric ID.

Child rules reference their parent through the <if_sid> element.

For example:

<rule id="100100" level="0">
  <decoded_as>custom_app</decoded_as>
  <description>Custom authentication events</description>
</rule>

<rule id="100101" level="5">
  <if_sid>100100</if_sid>
  <field name="event">login_failed</field>
  <description>Authentication failure</description>
</rule>

In this example:

  • Rule 100100 classifies authentication events.
  • Rule 100101 only executes if 100100 has already matched.

Maintaining a logical rule ID range makes large custom rulesets much easier to manage over time.

Related Guide: How to Create Custom Detection Rules in Wazuh (With Examples)


Parent Rules vs Child Rules

Although parent and child rules work together, they serve very different purposes within the Wazuh detection engine.

The following comparison highlights their respective roles.

FeatureParent RulesChild Rules
PurposeIdentify broad categories of eventsDetect specific event conditions
Matching ConditionsGeneral conditions such as decoder, source, or event categoryAdditional filters like usernames, outcomes, field values, or regex matches
Alert GenerationOften used only for classification (commonly level="0")Usually generate the final security alert
ReusabilityShared by multiple child rulesBuilt for specific detection scenarios
MaintenanceUpdate one parent to affect many child rulesModify only individual detections when necessary
PerformancePrevents repeated evaluation of identical logicEvaluated only after parent matches, reducing unnecessary processing
Typical Use CasesAuthentication events, firewall logs, cloud logs, application logs, JSON parsingFailed logins, privilege escalation, blocked traffic, malware detections, policy violations

In general:

  • Parent rules answer “What type of event is this?”
  • Child rules answer “What exactly happened?”

This separation makes large detection libraries far easier to maintain and expand.


Building Your First Parent Child Rule

Now that you understand how inheritance works, let’s build a simple parent-child rule hierarchy.

This example assumes a custom authentication application generates logs similar to:

User=jdoe Event=login_failed IP=192.168.1.50

A custom decoder has already extracted the fields.

Related Guide: Wazuh Decoder Guide

Creating the Parent Rule

The parent rule should identify the general category of logs without determining the specific outcome.

Its purpose is to establish the common conditions shared by every authentication event.

Example:

<group name="custom_app">

  <rule id="100100" level="0">
    <decoded_as>custom_auth</decoded_as>
    <description>Custom authentication events</description>
  </rule>

</group>

Notice that:

  • The decoder identifies the log source.
  • The rule uses level=”0″ because it acts as a classifier.
  • No alert is generated yet.
  • Every authentication event now shares this common parent.

Shared Log Conditions

Parent rules typically contain conditions that remain true across multiple event types.

Examples include:

  • Decoder name
  • Program name
  • Log source
  • Vendor
  • JSON object type
  • Device category

These shared conditions should only appear once in the parent rule rather than being repeated throughout the ruleset.

Base Matching Criteria

Good parent rules are intentionally broad.

Examples include:

  • All VPN authentication events
  • All firewall traffic
  • All cloud audit logs
  • All endpoint security events
  • All web application requests

Specific detections belong in child rules rather than the parent.

This keeps the hierarchy flexible as new event types are added.

Creating Child Rules

After establishing the parent, create child rules for each specific event outcome.

Each child references the parent using <if_sid>.

Success Events

<rule id="100101" level="3">
  <if_sid>100100</if_sid>
  <field name="event">login_success</field>
  <description>User logged in successfully</description>
</rule>

This rule only evaluates after the parent has identified the log as an authentication event.

Failure Events

<rule id="100102" level="8">
  <if_sid>100100</if_sid>
  <field name="event">login_failed</field>
  <description>Authentication failure detected</description>
</rule>

Because failed logins typically indicate higher security relevance, this child uses a higher severity level.

Warning Events

Suppose the application records suspicious activity without an outright authentication failure.

<rule id="100103" level="5">
  <if_sid>100100</if_sid>
  <field name="event">password_expiring</field>
  <description>Password expiration warning</description>
</rule>

Additional child rules can be added later without modifying the parent.

This is one of the biggest advantages of hierarchical rule design.

Validating the Configuration

Before relying on new rules in production, verify that they load correctly and behave as expected.

Rule Syntax Checks

Carefully review:

  • XML formatting
  • Closing tags
  • Rule IDs
  • <if_sid> references
  • Field names
  • Decoder names

A single syntax error can prevent the ruleset from loading.

Loading the Rules

Save the custom rules file in the appropriate Wazuh rules directory and ensure it is referenced by your configuration.

Then verify that Wazuh successfully loads the new rules during startup.

Restarting the Wazuh Manager

After updating custom rules, restart the Wazuh manager so the new configuration is applied.

Once restarted, monitor the manager logs for any parsing or loading errors before proceeding with testing.

Applying Configuration Changes

Finally, validate your hierarchy using wazuh-logtest.

Feed sample log entries into the utility and verify that:

  • The decoder extracts the expected fields.
  • The parent rule matches first.
  • The appropriate child rule executes.
  • The expected alert level and description are generated.

Testing every branch of your parent-child hierarchy helps catch configuration issues early and ensures future rule additions don’t introduce unexpected behavior.

Related Guides:


Mapping Complex Log Fields with Parent Child Rules

Many enterprise applications produce logs that contain dozens of fields describing different aspects of an event.

Rather than creating one massive rule that attempts to evaluate every possible field, Wazuh parent child rules let you classify the event once and then create specialized child rules for different event types.

This modular approach makes rule development simpler, improves readability, and allows your detection logic to scale as new log formats are introduced.

Multi-Step Authentication Logs

Authentication systems often generate multiple events throughout a single login session.

These may include login attempts, MFA verification, password validation, account lockouts, and session termination.

A parent rule can identify all authentication events, while child rules evaluate individual fields to detect specific security scenarios.

Common fields include:

FieldExampleChild Rule Purpose
UsernamejdoeDetect privileged account usage
Source IP192.168.10.15Detect suspicious login locations
Authentication Resultsuccess, failure, lockedTrigger different alert severities
Session IDA94C2D8FCorrelate related authentication events

Example detection hierarchy:

Authentication Event
        │
        ├── Successful Login
        ├── Failed Login
        ├── Administrator Login
        ├── MFA Failure
        └── Account Lockout

This design allows every authentication event to share the same parent while keeping each security detection focused and maintainable.

Application Audit Logs

Business applications frequently record detailed audit information describing user activity.

Examples include:

  • User logins
  • Data modifications
  • Record creation
  • Permission updates
  • Administrative actions

Useful fields often include:

FieldExample
User ActionDelete Record
Object IDCustomer-18345
Permission ChangeAdministrator Granted

A parent rule can classify all audit events, while child rules distinguish between routine activity and high-risk administrative changes.

For example:

  • Child Rule 1 → Record created
  • Child Rule 2 → Record deleted
  • Child Rule 3 → Administrator permission granted
  • Child Rule 4 → Sensitive configuration modified

This structure avoids repeating the same application-matching logic throughout the ruleset.

Firewall Events

Firewall devices generate numerous event types while sharing many common fields.

Typical fields include:

FieldExample
Source10.1.10.25
Destination172.16.5.100
ProtocolTCP
ActionAllow / Deny

Instead of writing separate standalone rules for every action, a parent rule can classify firewall traffic while child rules evaluate specific behaviors.

Examples include:

  • Allowed traffic
  • Blocked connections
  • Denied administrator access
  • Port scanning attempts
  • Repeated connection failures

This hierarchy becomes especially valuable when monitoring multiple firewall vendors using similar detection logic.

Related Guide: How to Collect Firewall Logs in Wazuh

Cloud Service Logs

Cloud providers produce highly structured audit logs containing extensive metadata.

Frequently monitored fields include:

FieldExample
AccountProduction
Regionus-east-1
API ActionDeleteBucket
Resource IDarn:aws:s3:::company-backups

A parent rule can identify cloud audit events regardless of provider, while child rules detect actions such as:

  • Privileged API calls
  • Resource deletion
  • Identity policy changes
  • Failed authentication
  • New administrator creation

Because cloud environments evolve rapidly, hierarchical rules make it much easier to extend detections as new services are introduced.

Related Guide: How to Monitor AWS CloudTrail Logs Using Wazuh

Endpoint Security Logs

Endpoint protection platforms generate process execution events, malware detections, registry modifications, and file activity.

Useful fields include:

FieldExample
Processpowershell.exe
Parent Processwinword.exe
SHA-256 Hash1A3B…
File PathC:\Users\Public\script.ps1

A parent rule can classify process creation events while child rules detect behaviors such as:

  • Office spawning PowerShell
  • Unsigned executable launches
  • Suspicious parent-child process relationships
  • Known malware hashes
  • Execution from temporary directories

This layered approach produces cleaner rules than embedding every condition into a single XML rule.

Research from the MITRE ATT&CK framework consistently emphasizes correlating process ancestry, command-line activity, and parent-child process relationships when detecting adversary techniques such as command execution, credential access, and lateral movement.


Example Configuration

The following example demonstrates a complete parent-child rule hierarchy for a custom authentication application.

The parent rule classifies authentication events, while multiple child rules detect successful logins, failed logins, and administrator access.

Each child assigns its own severity, groups, and MITRE ATT&CK mappings.

<group name="custom_authentication">

  <!-- Parent Rule -->
  <rule id="100100" level="0">
    <decoded_as>custom_auth</decoded_as>
    <description>Custom authentication event detected</description>
  </rule>

  <!-- Successful Login -->
  <rule id="100101" level="3">
    <if_sid>100100</if_sid>
    <field name="event">login_success</field>
    <description>User login successful</description>

    <group>
      authentication,
      success,
      custom_app
    </group>
  </rule>

  <!-- Failed Login -->
  <rule id="100102" level="8">
    <if_sid>100100</if_sid>
    <field name="event">login_failed</field>
    <description>Failed user authentication</description>

    <group>
      authentication,
      brute_force,
      custom_app
    </group>

    <mitre>
      <id>T1110</id>
    </mitre>
  </rule>

  <!-- Administrator Login -->
  <rule id="100103" level="10">
    <if_sid>100100</if_sid>

    <field name="event">login_success</field>
    <field name="role">administrator</field>

    <description>Administrator account login detected</description>

    <group>
      authentication,
      privileged_access,
      compliance
    </group>

    <mitre>
      <id>T1078</id>
    </mitre>
  </rule>

</group>

Parent Rule

The parent rule performs broad classification.

Its responsibilities include:

  • Identifying the decoder
  • Grouping authentication events
  • Providing a shared entry point for every child rule

Notice that the rule uses level=”0″, meaning it classifies events without producing a security alert.

Multiple Child Rules

Each child references the parent using:

<if_sid>100100</if_sid>

This instructs Wazuh to evaluate the child only after the parent has successfully matched.

Because every child inherits the same context, duplicate XML is eliminated.

Field Matching

Child rules evaluate additional fields extracted by the decoder.

Examples include:

<field name="event">login_failed</field>

or

<field name="role">administrator</field>

Multiple field conditions can be combined to create increasingly specific detections.

Severity Assignment

Each child assigns an appropriate severity level based on risk.

For example:

EventSuggested Level
Successful Login3
Password Warning5
Failed Login8
Administrator Login10
Brute Force Attack12–15

Separating severity at the child level allows the same parent to support both informational and high-priority alerts.

MITRE ATT&CK Mapping

Wazuh supports associating alerts with MITRE ATT&CK techniques.

Examples include:

  • T1110 — Brute Force
  • T1078 — Valid Accounts

These mappings help security teams understand adversary behavior and improve reporting within the Wazuh Dashboard.

Groups

Groups categorize related alerts for searching, filtering, dashboards, and reporting.

Examples include:

  • authentication
  • brute_force
  • privilege_access
  • compliance
  • custom_app

Consistent group naming makes large deployments easier to organize.

Descriptions

Each child rule should contain a clear, concise description explaining the detected activity.

Examples:

  • User login successful
  • Authentication failure detected
  • Administrator account login detected
  • Password reset performed
  • Suspicious privilege escalation

Clear descriptions improve analyst triage and reduce investigation time.

Related Guide: How to Create Custom Detection Rules in Wazuh (With Examples)


Testing Parent Child Rules

After creating your rules, always verify that they behave exactly as expected before deploying them into production.

Testing ensures that the decoder extracts the correct fields, the parent rule matches the intended events, and the appropriate child rule generates alerts.

Using wazuh-logtest

The wazuh-logtest utility is the primary tool for validating custom decoders and rules.

It allows you to submit sample log entries and observe every stage of processing, including:

  • Decoder selection
  • Extracted fields
  • Parent rule matching
  • Child rule evaluation
  • Final alert generation

This makes it the fastest way to identify configuration issues before they affect production monitoring.

Verifying Parent Rule Matches

Start by confirming that the parent rule successfully identifies the event category.

Typical checks include:

  • Correct decoder selected
  • Expected fields extracted
  • Parent rule ID matched
  • No XML parsing errors

If the parent rule fails, none of its child rules will execute.

Confirming Child Rule Execution

Once the parent matches, verify that the correct child rule is selected.

For example:

Sample EventExpected Child Rule
Successful loginSuccess rule
Failed loginFailure rule
Administrator loginPrivileged login rule
Account lockoutLockout rule

Only the child whose conditions evaluate to true should generate the alert.

Reviewing Generated Alerts

Inspect the resulting alert and confirm that it includes the expected:

  • Rule ID
  • Description
  • Severity level
  • Groups
  • MITRE ATT&CK mapping
  • Extracted fields

If any of these values are incorrect, review both the decoder output and the child rule conditions.

Testing Multiple Log Samples

Never validate your rules using only one log entry.

Instead, build a representative test dataset that includes:

  • Normal user logins
  • Failed authentication attempts
  • Administrator activity
  • Invalid input
  • Malformed logs
  • Unexpected field values

Testing both positive and negative cases helps ensure your rules generate alerts only when intended.

Debugging Rule Behavior

If a child rule fails to trigger, work through the evaluation pipeline systematically:

  1. Confirm the log reaches the Wazuh manager.
  2. Verify the correct decoder is applied.
  3. Ensure all expected fields are extracted.
  4. Check that the parent rule matches.
  5. Verify the <if_sid> references the correct parent rule ID.
  6. Confirm field names and values exactly match the decoded output.
  7. Review the manager logs for XML or syntax errors.

Following this sequence isolates problems quickly and avoids chasing issues in the wrong stage of the detection pipeline.

Related Guides:


Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *