systemctl start wazuh-agentStarts the Wazuh agent service on a Linux endpoint using systemd.
The endpoint agent for the open-source Wazuh SIEM/XDR: log collection, file-integrity monitoring and vulnerability detection.
See https://documentation.wazuh.com/current/installation-guide/wazuh-agent/systemctl start wazuh-agentStarts the Wazuh agent service on a Linux endpoint using systemd.
systemctl stop wazuh-agentStops the Wazuh agent service on a Linux endpoint to halt monitoring.
systemctl restart wazuh-agentRestarts the Wazuh agent service to apply configuration changes.
systemctl status wazuh-agentDisplays the current operational status and recent logs of the Wazuh agent service.
/var/ossec/bin/wazuh-control infoProvides version information and build details of the installed Wazuh agent.
net start WazuhSvcStarts the Wazuh agent service on a Windows endpoint using the command line.
/var/ossec/bin/wazuh-control startManually starts the agent processes using the internal control script.
/var/ossec/bin/agent-auth -m <MANAGER_IP>Registers the agent with the Wazuh manager using the manager's IP address.
Example
/var/ossec/bin/agent-auth -m 192.168.1.100/var/ossec/bin/agent-auth -m <MANAGER_IP> -A <AGENT_NAME>Registers the agent with a specific custom name instead of the hostname.
Example
/var/ossec/bin/agent-auth -m 192.168.1.100 -A WebServer01/var/ossec/bin/agent-auth -m <MANAGER_IP> -P <PASSWORD>Registers the agent using a password for authentication with the manager.
Example
/var/ossec/bin/agent-auth -m 192.168.1.100 -P secretpass/var/ossec/bin/agent-auth -m <MANAGER_IP> -G <GROUP>Registers the agent and immediately assigns it to a specific configuration group.
Example
/var/ossec/bin/agent-auth -m 192.168.1.100 -G web_servers/var/ossec/bin/agent-auth -m <MANAGER_IP> -v <CERT_PATH> -k <KEY_PATH>Registers the agent using SSL/TLS certificates for mutual authentication.
Example
/var/ossec/bin/agent-auth -m 192.168.1.100 -v agent.cert -k agent.key/var/ossec/bin/manage_agents -i <KEY_STRING>Manually imports a pre-generated authentication key on the agent.
Example
/var/ossec/bin/manage_agents -i MTIzIDQ1NiA3ODkg...cat /var/ossec/etc/client.keysDisplays the contents of the client keys file to verify registration status.
rm /var/ossec/etc/client.keysRemoves the client key file to force re-registration of the agent.
/var/ossec/bin/verify-agent-confChecks the ossec.conf file for syntax errors before restarting the service.
grep '<manager_address>' /var/ossec/etc/ossec.confVerifies the configured Wazuh manager IP address in the configuration file.
sed -i 's/<protocol>udp/<protocol>tcp/' /var/ossec/etc/ossec.confSwitches the agent transport protocol from UDP to TCP via command line.
tail -f /var/ossec/logs/ossec.logMonitors the Wazuh agent's internal operational log in real-time.
grep 'Error' /var/ossec/logs/ossec.logFilters the internal log file for error messages to troubleshoot issues.
tail -f /var/ossec/logs/active-responses.logMonitors the execution log of active response scripts on the endpoint.
/var/ossec/bin/syscheck_update -lList synchronized files in the FIM database (if local tool is enabled).
touch /etc/test_fim_fileCreates a test file to validate if File Integrity Monitoring is triggering alerts.
echo 'modification' >> /etc/test_fim_fileModifies a monitored file to verify FIM modification detection.
ls -l /var/ossec/active-response/bin/Lists available active response scripts executable by the agent.
/var/ossec/active-response/bin/host-deny.sh add - <IP_ADDRESS>Manually triggers the host-deny active response script to test IP blocking.
Example
/var/ossec/active-response/bin/host-deny.sh add - 192.168.1.50/var/ossec/active-response/bin/firewall-drop.sh delete - <IP_ADDRESS>Manually removes a firewall block created by the firewall-drop active response.
Example
/var/ossec/active-response/bin/firewall-drop.sh delete - 192.168.1.50echo 'wazuh_modules.debug=2' >> /var/ossec/etc/local_internal_options.confEnables verbose debug logging for Wazuh modules in the internal options file.
echo 'agent.debug=2' >> /var/ossec/etc/local_internal_options.confEnables verbose debug logging specifically for the agent communication process.
eventcreate /ID 1 /L Application /T INFORMATION /SO 'WazuhTest' /D 'Test Log'Creates a dummy Windows Event Log entry to verify Windows log collection.
sed -i 's/<disabled>yes/<disabled>no/' /var/ossec/etc/ossec.confEnables a disabled module (like SCA or Syscollector) via command line stream editor.
/var/ossec/bin/wazuh-control restartRestarts the agent, which forces a rootcheck and syscheck scan based on default frequency.
grep -q 'Client version' /var/ossec/logs/ossec.log && echo 'Upgraded'Scriptable check to verify if an agent upgrade has completed successfully.
usermod -aG docker wazuhAdds the wazuh user to the docker group so the agent can monitor Docker events.
sqlite3 /var/ossec/queue/syscollector/db/local.db 'SELECT * FROM packages LIMIT 5;'Directly queries the local Syscollector SQLite database to view inventory data.
nc -zv <MANAGER_IP> 1514Uses Netcat to test if the manager's registration/event port is reachable.
Example
nc -zv 192.168.1.100 1514chmod 644 /var/log/custom_app.logEnsures a custom log file is readable by the Wazuh agent user for collection.
tcpdump -w wazuh_debug.pcap -s 0 host <MANAGER_IP> and port 1514Captures full packets to/from manager for advanced protocol analysis in Wireshark.
Example
tcpdump -w wazuh_debug.pcap -s 0 host 192.168.1.100 and port 1514/var/ossec/bin/agent_control -lLists active agents (Note: This is a manager command but useful in hybrid testing).
/var/ossec/bin/rootcheck_control -i 001Queries rootcheck database for agent 001 (Manager side command for validation).
/var/ossec/bin/agent_upgrade -a 001 -f <package_path>Forces a remote upgrade of agent 001 from the manager (WPK file required).
Example
/var/ossec/bin/agent_upgrade -a 001 -f wazuh_agent_v4.x.wpksystemctl disable wazuh-agentDisables the Wazuh agent from starting automatically on system boot.
Exposes the operating system as a SQL database: query processes, users, ports, packages and more across Linux, macOS and Windows.
Microsoft Sysinternals System Monitor: logs process creation, network connections, file changes and more to the Windows (and Linux) event log.
The Linux Audit daemon: records system calls, file access and command execution according to rules, for compliance and detection.