How Wazuh uses Linux Audit system call monitoring
A security team that needs to answer who ran which command, who escalated privileges and who touched sensitive files on Linux hosts needs a record generated by the kernel, not by the applications themselves. The Linux Audit subsystem provides that record. It is the kernel-level auditing framework that logs system calls and file access events according to rules loaded by the auditd daemon, and each event carries a timestamp, the process, the user identity and the outcome. Wazuh does not replace this subsystem. The Wazuh agent on the host reads the audit log, forwards the events to the Wazuh server, and the server applies decoders and rules to turn raw audit records into alerts that the dashboard and the indexer can search.
The chain has several places where it can silently break, so the first step is to confirm the behavior of your release. Check the Wazuh documentation for the version you deploy to see which audit log path the agent reads, which decoders handle audit records and which rule groups are shipped by default. Confirm that auditd is installed, running and writing to the path the agent expects, and that your audit rules are loaded in the order and form the documentation describes. Test with a known command or a read of a test file, then confirm the alert appears in the dashboard with the expected user and process fields.
The main sizing question is event volume, and no figures for it are available here. Volume depends on which system calls you audit, how busy the hosts are, and whether rules match broad activity such as every file open by every user. Before you write rules, ask your team or partner to run a short measurement on representative hosts, record the event rate and disk growth of the audit log, and compare it with the indexer capacity you have planned. Narrow rules tied to specific paths, users and privileged commands are easier to keep under control than broad rules that you later have to filter out.
How Linux Audit events reach Wazuh alerts
The path starts with audit rules loaded into the kernel, which record matching system calls and hand them to auditd on the endpoint. The Wazuh agent on that same host reads the audit log and forwards events to the Wazuh server, where decoders extract fields and rules decide what becomes an alert. Alerts are then stored in the Wazuh indexer and shown in the Wazuh dashboard. The agent host is the trust boundary where rule volume is set, so the audit rules there decide how much data every later stage must handle.
Audit events flow from kernel rules on the endpoint through the Wazuh server to the indexer and dashboard.
Which system call questions to answer first
Command execution events answer whether a person or process ran a program that matters, such as a download utility, a network scanner or a shell started from an unexpected parent. Start with execve events filtered to the binaries you care about, and make sure the record carries the fields that explain the action: the audit user ID, the effective user ID, the login UID, the working directory, the executable path and the parent process. The login UID is the field that survives sudo and su, so it is the one to check first when you need to know which person was behind an action.
- Fields to keep:
auid,uid,euid,exe,cwd,ppidand the command arguments where your policy allows them. - Administrator noise: interactive troubleshooting by operators who legitimately run
curl,wgetor package managers on production hosts. - Automation noise: configuration management, patching jobs and monitoring agents that run the same commands on a schedule and produce identical records.
- Alert or archive: alert on commands that have no business reason on a given host class, such as compilers on database servers. Archive routine administrative runs and use the archive for later investigation.
- Argument capture: arguments can contain secrets, so confirm with your security team what may be stored before enabling full command lines.
Before you write any rule, confirm with the platform owners which automation accounts run on each host class, because that list determines most of the noise.
Privilege escalation questions ask whether a non-privileged session gained root or another elevated identity, and whether the change was expected. The useful evidence sits in the relationship between the login UID and the effective UID: a session that started as one person and now runs with a different effective identity is the pattern to watch. Audit rules on setuid and setgid calls, together with records of sudo and su use, give the sequence needed to reconstruct the event.
- Fields to keep:
auid(the original login identity),uidandeuidbefore and after the change,syscall,exeand the terminal or session identifiers. - Administrator noise: routine
sudouse by administrators is expected, so an alert on anysudoevent will fire constantly. - Automation noise: service managers and deployment tools that switch identity as part of normal operation, which can look identical to an attacker's first step.
- Alert or archive: alert when an identity change is not followed by an approved change ticket window, or when the
auidbelongs to an account that should never escalate. Archive successful, routinesudouse. - Baseline first: record a normal week of escalation events per host class before you set thresholds.
Check that the sudo logging configuration on each host writes to the same place the audit records do, so the two sources can be correlated.
Sensitive file access questions ask who read, changed or replaced files such as account databases, SSH keys, certificates, application secrets and audit configuration. Watch for reads as well as writes, because copying a credential file is a separate action from modifying it. Audit watch rules on paths or the openat family of calls can capture these events, but the path list must be deliberate, because every watched path adds volume.
- Fields to keep:
pathorname,auid,uid,exe,successand the operation type, so a read is distinguishable from a write. - Administrator noise: configuration edits by operators during change windows, and backup or logrotate jobs that read whole directories.
- Automation noise: certificate renewal, secret injection and configuration management that rewrite the same files on every run.
- Alert or archive: alert on writes to authentication and audit configuration files and on reads of private keys by processes outside an approved list. Archive reads of files that many services touch as part of normal operation.
- Keep the path list short: start with a small set of high-value paths and expand only when a finding justifies it.
Ask the owners of each sensitive path which services and jobs must read it, and turn that answer into an allow list before you configure the alert.
Audit rule options and when each fits
This table compares the main Linux Audit rule styles used with Wazuh, from broad syscall rules to file watches, key tags and service account exclusions. Read each row for the situation where it fits and the event volume it tends to add, then choose the narrowest rule that still answers the question your security team needs answered.
| Rule option | When it fits | Volume trade-off |
|---|---|---|
| Syscall rules for execve | Command execution tracking on hosts where you need to see what users and scripts launched, such as jump hosts or production application servers. | High on busy hosts because every process launch matches. Limit by architecture, user ID or executable path where possible. |
| Syscall rules for privilege changes | Detecting setuid and setgid use, changes to identity, or privilege transitions that map to your privileged access policy. | Usually lower than command execution, but cron jobs, sudo and login tooling can generate steady matches that need filtering. |
| File watch rules on sensitive paths | Watching fixed locations such as authentication configuration, sudoers, SSH settings or key stores where any write is significant. | Low when paths are specific. Broad directory watches on shared or log-heavy paths can grow quickly, so scope them to named files. |
| Key tagging for Wazuh rule matching | Attaching a consistent key to each rule so Wazuh decoders and rules can match a category such as privileged commands without parsing raw audit fields. | Adds no events by itself. It changes how alerts are grouped and tuned, and it works best when keys are agreed before rules are written. |
| Exclusion of known service accounts | Removing routine automation, backup and configuration management activity that runs on schedule and repeats the same commands. | Reduces volume, but an exclusion can hide an attacker who abuses that account. Review exclusions against the account's documented purpose. |
| Exclusion by path or command | Suppressing known noisy binaries or paths, such as health checks or monitoring agents, after you confirm they are expected. | Cuts repetitive events. Confirm the exclusion does not match attacker tooling that uses similar names or locations. |
| Broad catch-all rules | Early discovery work on a test host, when you need to learn what the system generates before narrowing scope. | Highest volume. Use only in a lab or short window, then replace with scoped rules before production rollout. |
Setting up Linux Audit monitoring with Wazuh
This sequence takes a Linux host from a bare auditd installation to a verified stream of command, privilege and sensitive file events in Wazuh alerts. Each step ends with a check so the team knows whether to move on or fix the previous step.
Confirm the agent and auditd are installed
The systems administrator checks that the Wazuh agent is installed, enrolled and reporting to the Wazuh server, and that the auditd service is installed and running on the same host. Confirm the agent status shows as active in the Wazuh dashboard and that the audit daemon is enabled at boot. Do not continue until both services are healthy, because every later check depends on them.
Define a small audit rule set
Write a short rules file under the audit rules directory that covers only the behavior you need first: executions of privileged commands, changes to identity and sudo configuration, and reads or writes to a few named sensitive files. Keep keys on every rule so Wazuh can match events to decoders and rules later. Record the rule set in version control and have the security owner approve it before it reaches production hosts.
Load and verify the audit rules
Load the rules file with augenrules or auditctl, then list the active rules to confirm each entry from the file appears with its key. Check the audit daemon logs for syntax errors or rules that were rejected, since a single bad line can stop the whole set from loading. The step is complete when the listed rules match the approved file exactly.
Confirm the agent forwards audit events
Trigger one harmless audited action, such as reading a test file you own, and then check the audit log file on the host for the matching record. Next, confirm the Wazuh agent is configured to read that log, usually through its localfile settings, and that the agent restarts cleanly after any change. The check passes when the raw audit record is visible on the host and the agent reports it as collected.
Test with controlled commands
Run a short, scripted list of controlled commands on a test host, such as a sudo call, an edit to a watched file and a read of a watched path, and record the time and user for each one. Keep the list in a runbook so the same tests can be repeated after every rule change. The step is done when each command produces the expected audit record and no unexpected events appear for the test account.
Review the alerts in the dashboard
In the Wazuh dashboard, search the alerts for the test host and the keys you defined, and compare each controlled command with the alert it produced. Note any test that generated no alert, any alert with missing user or command fields, and any duplicate events. Feed these findings back into the rule set before expanding it. The sequence is complete when every controlled test maps to an expected alert and the findings are documented.
Keeping audit rule volume under control
Broad syscall rules are the fastest way to overload both the endpoint and the indexer. A rule that records every execve or every file open on a busy host produces events at the rate the host performs those calls, which can be far higher than the security questions you are trying to answer. The cost lands in three places: CPU and disk on the monitored host while the audit subsystem writes records, the Wazuh server decoding and ruling each event, and the Wazuh indexer storing and searching what remains. Before writing any rule, ask your team to define the specific question each rule answers, such as which non-service accounts run privileged binaries or which processes touch the sudoers file. A rule that cannot be tied to a question is a candidate for removal.
Scope each rule as narrowly as the question allows. Filter by user with -F auid or -F uid where the question concerns particular accounts, limit execution monitoring to specific binaries with -F exe or path watches with -w, and separate privilege-escalation rules from broader command-history rules so they can be tuned independently. Exclude high-frequency automation such as configuration management runs, backup jobs, health checks and CI agents by their service accounts or executable paths, but document each exclusion and review it on a schedule, because an attacker who blends into an excluded account will be invisible. Confirm the exact field names and rule syntax against the Linux Audit documentation for your distribution's version of auditd before you deploy.
Roll out in phases by host group, not all at once. Start with a pilot group of representative hosts, such as one server role and one admin workstation class, and measure the audit log growth, agent-side event rate and indexer ingestion for a full business cycle before adding groups. Establish your own baseline on each host class first, since volumes depend on workload, and set a volume threshold that triggers a rule review. Expand only when the pilot shows that the alerts are actionable and that storage projections for the indexer are acceptable. Ask whoever owns indexer retention to confirm capacity before each expansion, and record each rule change so that tuning decisions can be traced later.
Security and operational considerations
Audit rules sit close to the most sensitive activity on a host, so the monitoring itself needs protection. The cards below cover the risks that connect rule tampering, data exposure, change control, upgrades, retention and testing, and what to check for each before rules reach production.
Rules that users can disable
Audit rules are only useful if they stay loaded. A user with root access can often change or remove rules with the audit tooling, which silently stops the telemetry Wazuh depends on. Check whether the audit configuration is immutable after load, whether the agent alerts when audit rules are missing or changed, and who on the host can run the audit control commands. Treat a silent gap as an incident signal in its own right.
Sensitive data in command arguments
Command-execution rules record the full argument list, so passwords, tokens or connection strings typed on a command line can land in the event stream and the indexer. Identify which commands in your fleet take secrets as arguments, decide whether those events are kept, masked or excluded, and confirm who can read the resulting alerts in the dashboard. Retention and access policies apply to this data as much as to any other log.
Rule changes without change control
Audit rules are configuration, and a rule added to a shared group can flood every host with events overnight. Record each rule change with a reason, an owner and a rollback step, and route changes through the same review you apply to other production configuration. Confirm which team can push agent configuration and whether that path is logged, since the change history is what an auditor will ask for.
Agent upgrades that change behavior
Agent and rule updates can alter which events are generated, how they are decoded, or how audit settings are applied on the host. Compare event volume and alert counts before and after each upgrade on a canary group, and confirm that your audit rules still load cleanly on each operating system version in the fleet. Check the Wazuh release notes for each patch before rolling it out, because the release notes are where behavior changes are listed.
Wazuh release notesRetention and access to audit alerts
Audit-derived alerts often show who ran which privileged command and when, which makes them sensitive personal and operational data. Decide how long command and file-access events stay in the indexer, who can search them, and whether older events are archived under separate controls. Review dashboard roles so that analysts who need alerts do not automatically gain access to raw event detail that contains arguments or file paths.
Testing rules on non-production hosts
A broad audit rule can multiply event volume on busy servers and slow the host, so every new rule should run first on a representative non-production host. Measure the event rate, disk growth and any CPU impact over a normal working period, then widen the rule to a canary group before the full fleet. Keep the test hosts close to production in operating system and workload so that the results carry over.
Questions buyers ask about Linux Audit monitoring with Wazuh
What drives the effort and cost of Linux Audit monitoring with Wazuh?
The main drivers are how many hosts you monitor, how many distinct operating system builds and audit configurations they run, and how many audit rules you need to meet your own detection and evidence goals. Each rule you add increases event volume, which affects storage on the Wazuh indexer, search cost and the time analysts spend tuning alerts. Costs come from two sources: your own engineering time to define rules and test them, and any external work you buy for scoping, rule design and validation. Self-hosted Wazuh has no license fee, so the recurring costs are infrastructure and staff time. Ask any partner for a quote that lists host count, rule set size, the number of test cycles and what is one-time versus recurring.
How long does a pilot for Linux Audit monitoring usually take?
A pilot usually runs in phases: agree on the rules you want, deploy them to a small group of hosts, measure event volume, tune the rules and then decide whether to widen the rollout. The duration depends on how many systems are in scope, how quickly your change process approves configuration, and how much tuning the first results need. Because no duration was supplied for this topic, confirm the expected timeline in writing with your partner before the work starts, and ask which milestones end the pilot and what evidence each milestone produces.
What does our internal team need to provide for the work?
You need to provide a named owner for the audit policy, access to representative Linux hosts in a test group, and a list of the activities you care about, such as privileged command execution, changes to authentication files or reads of regulated data. Your team should also supply the Wazuh server and indexer environment or confirm the deployment method, a change window for agent configuration, and people who can review alert samples for false positives. Ask the partner to list these inputs in the written scope so gaps are visible early.
Can our own team implement Linux Audit monitoring with Wazuh?
Yes, if your engineers have Linux administration experience, have run Wazuh agents before and can test rules on non-production hosts. The core work is writing audit rules that match your risk model, deploying the configuration through Wazuh agent management, reviewing the resulting alerts and tuning them. Teams without this experience often underestimate the time spent on tuning and on the volume that busy hosts generate. An external partner is useful when you need a fixed-scope design review, independent testing or a second opinion on what to alert on versus archive.
How do we decide between alerting on an audit event and only archiving it?
Alert on events that need a human or automated response soon, such as use of privileged commands by unexpected accounts, changes to authentication configuration or access to sensitive files outside a planned process. Archive events that you need for later investigation or evidence but that do not warrant immediate action, such as routine reads of non-sensitive paths. Base the split on your incident response process and your retention obligations, and test each rule against a sample of real host activity before you enable alerting. Revisit the split after the first month, because the right answer depends on the traffic you actually see.
What changes after a Wazuh upgrade for Linux Audit monitoring?
After a Wazuh upgrade, check that the agent version, the server version and the rule and decoder content still match, because audit rules and their alert mappings can change between releases. Confirm that the audit daemon configuration on each host still loads, that event volume has not shifted unexpectedly and that alerts still reach the dashboard. Wazuh publishes patch releases in the 4.14 line on a regular cadence, so plan a regression check for each upgrade. Follow the order and backup steps in the Wazuh documentation and test the audit configuration on a staging group first. The upgrade notes in the Wazuh release notes are the natural starting point for checking what changed.
How DeployOpen scopes and delivers Linux Audit monitoring
DeployOpen plans and builds Wazuh system call monitoring with Linux Audit inside your own infrastructure, starting from the commands, privileged actions and sensitive paths your security team needs to see. Rule volume is treated as a design constraint from the first session, so the audit configuration is tuned before it reaches production hosts.
How we scope
- We review which hosts, operating systems and roles the Linux Audit rules will cover and which are out of scope.
- We agree in writing which events matter for command execution, privilege escalation and sensitive file access.
- We confirm the expected event volume, the Wazuh deployment that will receive it and who triages the alerts.
How we build
- We write and stage audit rule sets, then test them on representative hosts before any broad rollout.
- We configure Wazuh decoders and rules so audit records become readable, correlated alerts instead of raw noise.
- We measure event volume during testing and adjust rules, exclusions and agent groups to keep the load manageable.
How we hand over
- We document each audit rule, its purpose, its owner and the alert it produces, so changes can be reviewed later.
- We walk your operations team through alert triage, rule change requests and how to test a new rule safely.
- We deliver the configuration, test results and runbooks so your team can maintain the monitoring without us.
How we support
- Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
- Ongoing support, upgrades and tuning of audit rules after Wazuh updates are available as a retainer.
- Before rules change on production hosts, we recommend a written change process that your team approves.

