What Wazuh command monitoring does and when teams need it
Command monitoring in Wazuh runs a specific command on an endpoint at a set interval and treats the output as log data, so the same analysis pipeline that handles syslog and event logs can alert on what a host is doing right now. A team that already watches files with integrity monitoring and collects logs from its hosts often still lacks visibility into live state: which ports are listening, which processes are running, how full a disk is, whether a USB storage device has been attached. Command monitoring fills that gap by asking the host directly and matching the answer against rules.
The documented use cases include running processes, disk space, output changes, USB storage and load average. The two examples the Wazuh documentation leans on are good starting points. Netstat output can reveal a new listener that was not present at the last check, and ps output can surface a process that should not be running on a given server. Because each check is a command, the reader must confirm which binaries exist on each operating system the agent covers, since Wazuh agents run on Linux, Windows, macOS, Solaris, AIX and HP-UX and the available tools differ across them.
Choose command monitoring when the question is about current host state that a file change or a log line will not answer, such as whether a listener appeared or a disk is filling. Choose file integrity monitoring when the question is whether a specific file or configuration changed. Choose system call auditing, covered in the sibling topic on Linux Audit, when the question is which process executed a command or touched a sensitive file. Many teams need all three, but they should decide which signal each one is meant to produce before writing rules, or they will duplicate alerts.
Before committing, plan the cost side. Each command runs on every targeted agent at the interval you set, so frequent checks on large fleets add load and alert volume. Ask your team to inventory the commands needed per platform, confirm their output format on your oldest supported OS versions, and decide who owns the resulting rules. Wazuh server components analyze the output, so the indexer must hold the alerts. Confirm the sizing with your own event volume estimates, not with generic figures.
How command output travels from agent to dashboard
The flow starts on the endpoint, where the agent runs a command at its configured interval and sends the output onward. The Wazuh server then applies decoders and rules to that output, so a change in a listener list or process list can raise an alert. Alerts are stored in the Wazuh indexer and shown in the Wazuh dashboard. The check to make is the agent configuration, because that is where the commands are defined and where the trust boundary sits. Anyone who can change that configuration controls what runs on the endpoint.
Commands are defined on the agent, and their output becomes alerts viewed in the dashboard.
Command monitoring options and when each fits
This table compares the main choices when configuring Wazuh command monitoring: how often a command runs, whether alerts carry full output or only changes, which commands an agent may run, and whether settings live in a group or on one agent. Read each row as a decision point, and check the platform column before you write rules, because a command that exists on one operating system may be missing or different on another.
| Choice | What it does | When it fits and what it costs |
|---|---|---|
| Run frequency | Sets how often the agent executes the command and sends the output to the server | Short intervals suit fast-moving signals such as new listeners. Each run adds agent load and log volume, so confirm the interval against your agent hosts and alert capacity |
| Full output | Sends the complete command output on every run | Useful for forensic context and for rules that need the whole process or port list. Expect high event volume because unchanged output repeats on every run |
| Changed output only | Alerts when the output differs from the previous run | Best for detecting new listeners or new processes with less noise. Baselines reset after restarts or agent upgrades, so expect a burst of alerts at those points |
| Allowed commands | Defines which commands the agent runs and which outputs reach the server | Keep the list short and reviewed. Every allowed command is a potential execution path, so each addition should go through change control |
| Group-level configuration | Applies the same command set to every agent in a group through the shared configuration | Suits fleets with the same role and operating system. Changes reach all members, so test on a pilot group before wider rollout |
| Per-agent configuration | Applies commands to one agent through its local configuration | Suits special hosts such as a database server with unique needs. Adds maintenance overhead, and drift between agents becomes harder to spot |
| Platform availability | Commands differ across Linux, Windows, macOS and other agent platforms | Check that each command and its output format exist on every target platform before writing shared rules. Confirm gaps in the Wazuh documentation for your agent versions |
How to set up command monitoring on agents
This sequence takes a command from an idea about what to watch to a tested alert on a pilot group of agents, so that each command is confirmed on every operating system before it reaches production.
Inventory the signals you need to watch
Your security or operations team lists the questions command output should answer, such as which ports are listening, which processes are running, how full disks are, whether USB storage is attached and what the load average looks like. For each signal, note the operating systems in scope and the expected normal state. Done means a written list in which every signal has a named owner, the systems it applies to and the change that should raise an alert. Nothing is configured yet, so the list is the reference for the rest of the sequence.
Confirm command availability and output on each OS
An engineer runs the candidate command by hand on a representative host for each operating system in scope, such as a Linux distribution, Windows and macOS. They check that the binary exists, that it needs no interactive input, and that its output format is stable across versions, because a changed column layout will break decoding. Done means that each command has a saved sample of its output per operating system and a note on the privileges it needs. Where a command is missing on one platform, record an alternative or exclude that platform from the signal.
Define commands in the agent group configuration
The engineer adds a command or full-command block to the shared configuration of an agent group in the Wazuh server, using the interval, frequency and alias settings that the command monitoring documentation describes. Assign the change to a pilot group, not the whole fleet, and keep the file under version control so it can be reviewed and rolled back. Done means the agents in the pilot group receive the configuration on their next check-in, and the command runs at the planned interval as shown in the agent logs.
Test decoding with the Wazuh log test tool
Using the saved output samples from the second step, the engineer runs the Wazuh log test tool on the Wazuh server to see which decoders and rules match each line. They confirm that the fields extracted from the output, such as port number, process name or mount percentage, are the ones the later rules will depend on. Done means each sample produces the expected decoded fields and matches a known rule or the intended custom rule, with no fields that silently fail to parse. Repeat this check for every operating system sample.
Write rules for output changes
A detection engineer writes custom rules that compare the current output with what is expected, for example a listener that did not appear in the approved list or a process name that matches a known bad pattern. Use a CDB list for approved values where that keeps rules readable, and assign rule levels that match the response your team has agreed. Done means each rule fires on the test sample it was written for and stays silent on the baseline sample, verified with the log test tool before the rule is deployed to the manager.
Validate alerts on a pilot group before rollout
The team runs the configuration on a small pilot group for a period they choose, then reviews the alerts the dashboard produces. They check each alert for a true change, a known benign change such as a scheduled backup, or a parsing error, and tune the rules or the approved lists accordingly. Done means that the pilot shows alerts that match real changes, the noise is understood and documented, and the owner has signed off on expanding the same configuration to the wider agent group in a controlled change.
Writing rules on output changes without flooding alerts
Command monitoring is only useful if the alerts it produces are worth reading. The cards below cover the parallel decisions you make before writing any rule: what counts as a change, how the first run after a reboot is handled, which process lists are too noisy to alert on, which listeners are expected, and how lists keep exceptions out of the rule logic. Detailed rule and decoder syntax lives in the rules and decoders topic.
Alert on any change or specific values
The first decision is whether a rule fires on any difference in command output or only when a specific value appears. A any-change rule is simple to write but fires on every harmless variation, such as a short-lived ephemeral port or a fluctuating load average. A value-specific rule, such as a listener on a port your policy does not allow, is quieter but only catches what you thought to name. Decide per check which risk you are accepting before writing the rule.
Command monitoring docsBaseline handling after reboot
After a reboot, many commands return a different set of results because services start in a different order and processes get new IDs. Without a plan, every restart produces a burst of alerts that buries real events. Decide whether the first run after boot establishes a baseline, whether alerts are suppressed for a settling window, and who reviews the baseline when it changes for a legitimate reason. Test this on a rebooted host before rollout.
Noisy process lists
Full process listings change constantly, so matching on raw ps output produces false positives from browsers, package managers and scheduled jobs. Narrow the command to the fields you care about, or match on specific process names and owners that should never appear. Check the sample output on each operating system you run, because column layouts and process names differ between Linux, Windows and macOS hosts.
Expected listeners and approved services
Listener checks only help when you maintain a list of the ports each host group should expose. Start from the approved service inventory for each role, such as a web tier listening on 443 and nothing else, then alert on anything outside that set. Review the list whenever a change request adds or removes a service, or the rule will either miss a new exposure or flag a planned deployment.
Tuning with CDB lists
Exceptions belong in lists, not in rule logic. Wazuh supports CDB lists that rules can check against, so you can keep an approved process or port inventory in one file and update it without editing each rule. This keeps rule changes reviewable and lets operations staff maintain exceptions under change control. Confirm how the list is distributed to agent groups, since a list that is missing on one group will silently change what alerts fire there.
Where command monitoring falls short of other Wazuh capabilities
Command monitoring gives you periodic snapshots, not a record of activity. The agent runs each configured command at a set interval and treats the output as log data, so anything that starts and stops between two runs can be missed entirely. A process that launches, does its work and exits in a few seconds, or a listening port opened and closed between samples, will not appear in the output. Before you rely on it for detection, ask the vendor and your own testing team to confirm the interval you can set for each command and how much load frequent runs place on the endpoint. Treat the command as a way to see the current state of a host, not as a complete history of what happened on it.
The host itself is part of the trust boundary. Command output comes from binaries and libraries on the endpoint, so an attacker with root or administrator rights can replace netstat, ps or the commands in your configuration, or filter what they return. Command monitoring cannot tell you that the output was altered. For changes to the binaries and configuration files that produce that output, use file integrity monitoring, and for who ran what and when, use the Linux Audit integration. Both are covered in the sibling topics Wazuh malware detection with YARA and rootcheck and the Linux Audit topic in this group. Devices where you cannot install an agent need the approach in the agentless monitoring topic instead.
Decide the split before you write rules. Use command monitoring for state that you can check on a schedule, such as listeners, disk usage, load average and attached USB storage, and assign the fast-moving or tamper-sensitive events to Linux Audit, file integrity monitoring or endpoint protection logs. Document which events each tool covers so that a gap in one is visible to the people who respond to alerts. Confirm the supported command syntax and output format for each operating system you run, because the same check can need different commands on Linux, Windows and macOS.
Limits to confirm in your environment
Command monitoring depends on what each operating system prints, how the agent runs commands, and how much load the checks add. The cards below list the questions to answer on a test host before you commit to intervals, rules and response logic.
Commands and output per OS
Confirm which commands each target operating system provides and what their output looks like in the version you run. Tools such as netstat, ss, ps, df and lsblk differ between distributions and between Linux, Windows, macOS, Solaris, AIX and HP-UX. A rule written against one format can silently match nothing on another platform, so capture real output from each build of each OS in your fleet and test the decoder against it.
Command monitoring docsWindows versus Linux behavior
Ask how command definitions behave on Windows hosts, where native tools and their output differ from Linux and where PowerShell or other shells may be needed. Confirm the quoting, character encoding and line-ending behavior of the output, because these details break field extraction. Treat Windows and Linux as separate test tracks with their own rule sets rather than assuming one configuration covers both.
Performance at your chosen interval
Ask what load each monitored command adds at the frequency you plan, and measure it on representative hosts. A command that scans large process lists, disk volumes or listening sockets every few minutes can consume CPU and I/O on busy servers. Record the baseline, the peak during each run and the effect on application latency, then adjust the interval per host group.
Timeout and failure behavior
Confirm what the agent does when a command hangs, exits with an error or returns no output. Ask whether a timeout produces an event that you can alert on, or whether the gap goes unnoticed. A silent failure looks like a quiet host, so add a heartbeat or a check that the command ran, and document how the agent reports the failure to the server.
Wazuh version in use
Confirm the exact Wazuh release on both the server and the agents, and read the release notes for changes to command monitoring, decoders or agent behavior. The current release line is 4.14, and patch releases have arrived roughly every one to two months, so the version you test against may change before go-live. Retest your command definitions after each agent or server upgrade.
Wazuh release notesChange control for command lists
Decide who may add, change or remove monitored commands, and how those changes reach agents through centralized configuration. Each command runs with agent privileges, so a broad or poorly reviewed command list is a security decision as well as a monitoring decision. Keep the definitions in version control, test them on a staging group, and record the approval before they reach production hosts.
Questions teams ask before adding command monitoring
What does command monitoring cost to set up in Wazuh?
The software has no license fee, so the cost is the work: planning which commands to watch, configuring agents, writing and testing rules, and running the platform. Self-hosted Wazuh is open source under the GNU General Public License version 2, so the license itself adds nothing. Costs come from your own staff time, any partner fees for a fixed-scope engagement, and the infrastructure that runs the Wazuh server and indexer. Ask any quote to separate one-time setup from recurring work such as rule tuning, upgrades and monitoring the alerts that result.
What drives the effort for command monitoring?
Effort scales with the number of platforms, the number of commands you watch, and how much rule tuning the output needs. The main drivers are:
- The operating systems in scope, since commands such as netstat and ps differ across Linux, Windows and macOS.
- How noisy each command's output is, because listeners and processes change often on busy hosts.
- How many custom rules you write for output changes and how often they are tested.
- Change control for who may approve a new monitored command or a new allowed command.
A small, uniform fleet with a short list of commands is far less work than a mixed estate with dozens of exceptions.
How long does a command monitoring pilot take?
Pilot length depends on scope, and no fixed duration applies to every environment. A pilot usually covers a small set of hosts, a short list of commands such as listening ports, running processes, disk usage and USB storage, and a defined set of rules. Plan for time to confirm the command output on each operating system, to test alerts against known changes, and to agree which alerts go to a person. Ask any partner to state the pilot scope and its exit criteria in writing before work starts, so the timeline follows from the scope rather than a generic estimate.
What does our internal team need to provide?
Your team needs to supply access and decisions that no outside party can make for you. Expect to provide:
- Hosts or a test group where agents can be installed and the commands can run.
- A named approver for each command that agents are allowed to run.
- Staff who will read and triage the alerts after go-live, since rules that nobody reviews deliver no value.
- Access to the Wazuh server, indexer and dashboard, along with the change window for production hosts.
Confirm these responsibilities in the written scope so that gaps are visible before the pilot starts.
Can our team set up command monitoring using only the Wazuh documentation?
Yes, a capable team can build command monitoring from the Wazuh command monitoring documentation, provided it has time, a test environment and someone who can write and test rules. The documentation explains the use cases, including running processes, disk space, output changes, USB storage and load average. The harder parts are practical: confirming output on each operating system, avoiding alert floods, and deciding which commands agents should be permitted to run. If your team lacks those skills or the capacity to test, a fixed-scope engagement can cover the build and hand over the configuration with documentation.
What does a fixed-scope command monitoring engagement cover?
A fixed-scope engagement covers the work listed in an agreed written scope, with deliverables and timelines set before work starts. For command monitoring, that typically includes the list of platforms and commands, agent configuration, the rules for output changes, testing against known changes, and handover notes for your operators. It does not include unlisted platforms or ongoing alert triage unless the scope says so. Ongoing support, upgrades and continuous testing are available as retainers, which you can add after the initial build.
Does command monitoring create security risk on production hosts?
Command monitoring adds risk only where the configuration is careless, so the control points matter. Monitored commands run on endpoints, so each one should be reviewed for what it reveals and how long it runs. Restrict which commands agents may execute, keep configuration under change control, and confirm that the Wazuh server and dashboard are hardened and accessed through the right identity controls. Test each change on a non-production host first, and record who approved it.
Which Wazuh version should we plan command monitoring around?
Plan around the current 4.14 release line, and confirm the exact patch version with the Wazuh release notes before you install anything. At the time of writing, the latest listed patch in the supplied facts is 4.14.9, released on 14 October 2026. Wazuh shipped 4.14 patch releases roughly every one to two months, so your test and production versions can drift quickly. Agree a version policy in your change process, and retest command rules after each upgrade.
What a command monitoring rollout needs from your team
Before DeployOpen writes any command definitions, your team needs to supply four inputs: the signals you want to watch, the approved command list, the host groups that will receive each command, and the alert routing owners. The signals determine which command outputs matter, for example listening ports for new listeners, running processes for unexpected binaries, disk usage, USB storage and load average. The approved command list is the most sensitive input, because each entry is a command an agent will execute on a schedule with the privileges of the agent. Ask your security and platform leads to sign off on the exact binaries and arguments, and to name who may request additions later.
The rollout also depends on the Wazuh deployment you already run or plan to build. Confirm the Wazuh release line and patch level in use (the current line is 4.14), whether you run a single server or a cluster, how agents are grouped in the manager, and whether the indexer and dashboard are sized for the extra alert volume that frequent command output can produce. Confirm too whether any hosts are offline or air-gapped, because that affects how agent configuration is distributed. Record the agent operating systems in scope, since command syntax and available tools differ between Linux, Windows and macOS.
Finally, name the people who receive and act on each alert class: the on-call queue for changes to listening ports, the platform team for disk thresholds, and the security team for unexpected processes. DeployOpen will agree the scope, the list of deliverables, the host groups, the test plan and the timeline in writing before work starts, and that document should record each owner and their escalation path. Ask any implementation partner to show how the written scope handles command additions after go-live, since each new command is a new change to the agents.
How DeployOpen scopes and delivers Wazuh command monitoring
DeployOpen plans Wazuh command monitoring as a fixed-scope piece of work inside your own infrastructure, starting from the commands you need watched and the alerts your team will act on. The work covers agent configuration, rule design, testing and handover, with ongoing support available as a retainer.
How we scope
- We list the commands to monitor, such as port listing, process listing and disk usage, and the hosts each one applies to.
- We agree which output changes should raise alerts, who receives them, and which noise is acceptable.
- We record the scope, deliverables and timeline in writing before any configuration begins.
How we build
- We configure command monitoring in agent configuration grouped by host role, then test output parsing on sample data.
- We write and tune the decoders and rules that turn command output changes into alerts.
- We review which commands agents are permitted to run and document the restrictions we apply.
How we hand over
- We deliver the agent configuration, rule files and a record of each monitored command and its purpose.
- We document test cases showing which output changes produced which alerts, so your team can repeat them.
- We walk your operations staff through alert triage, tuning and the process for adding new commands.
How we support
- We can retest command monitoring after Wazuh upgrades, since agent and server changes can affect output handling.
- Ongoing support, upgrades and continuous testing are available as a retainer, scoped in writing.
- We confirm each change with your team before it reaches production hosts, including any change to allowed commands.

