Wazuh Lab Server Management Quick Reference — v18
Baseline: Wazuh 4.14.5 lab deployment. Commands assume package-based services; container deployments require container-specific commands.
Core Components and Default Ports
| Component | Default port | Purpose |
|---|---|---|
| Wazuh server | 1514/TCP | Agent event communication |
| Wazuh server | 1515/TCP | Agent enrollment |
| Wazuh server API | 55000/TCP | REST API |
| Wazuh indexer | 9200/TCP | Indexer API |
| Wazuh dashboard | 443/TCP | Web interface |
UDP 1514 is optional and disabled by default. Restrict management and API ports to trusted networks.
Health and Service Control
Prefer the operating system service manager for start/stop/restart operations:
sudo systemctl --no-pager --full status wazuh-manager
sudo systemctl --no-pager --full status wazuh-indexer
sudo systemctl --no-pager --full status wazuh-dashboardUse wazuh-control to inspect manager-side processes:
sudo /var/ossec/bin/wazuh-control status
sudo /var/ossec/bin/wazuh-control info -vsudo systemctl restart wazuh-manager
sudo systemctl restart wazuh-indexer
sudo systemctl restart wazuh-dashboardRestart only the affected component and collect evidence before restarting.
Agent Status
sudo /var/ossec/bin/agent_control -l
sudo /var/ossec/bin/agent_control -lc
sudo /var/ossec/bin/agent_control -i <agent-id>-llists all agents.-lclists currently connected agents.-ishows one agent's details.
Never expose enrollment or authentication keys in screenshots.
Logs and Configuration
| Location | Purpose |
|---|---|
/var/ossec/etc/ossec.conf |
Main Wazuh server/agent configuration |
/var/ossec/etc/rules/local_rules.xml |
Local detection rules |
/var/ossec/etc/decoders/local_decoder.xml |
Local decoders |
/var/ossec/logs/ossec.log |
Wazuh operational log |
/var/ossec/logs/alerts/alerts.json |
Structured generated alerts |
/var/ossec/logs/alerts/alerts.log |
Human-readable generated alerts |
/etc/wazuh-indexer/ |
Indexer package configuration |
/etc/wazuh-dashboard/ |
Dashboard package configuration |
sudo tail -f /var/ossec/logs/ossec.log
sudo tail -f /var/ossec/logs/alerts/alerts.json
sudo journalctl -u wazuh-manager -f
sudo journalctl -u wazuh-indexer -f
sudo journalctl -u wazuh-dashboard -fValidate Changes
Back up local files before editing. Use an XML parser for well-formedness and Wazuh Logtest for decoder/rule behavior:
sudo xmllint --noout /var/ossec/etc/ossec.conf
sudo xmllint --noout /var/ossec/etc/rules/local_rules.xml
sudo xmllint --noout /var/ossec/etc/decoders/local_decoder.xml
sudo /var/ossec/bin/wazuh-logtestxmllint checks XML structure; it does not prove that a Wazuh rule is semantically correct. wazuh-logtest evaluates a supplied one-line event through pre-decoding, decoding, and rule matching.
Suricata Integration
On the Ubuntu sensor:
sudo tail -f /var/log/suricata/eve.json
sudo tail -f /var/ossec/logs/ossec.log
sudo systemctl --no-pager --full status suricata wazuh-agentOn the Wazuh server:
sudo tail -f /var/ossec/logs/alerts/alerts.json
sudo /var/ossec/bin/wazuh-logtestIn the Dashboard, start with:
rule.groups: suricata
Confirm in order: mirrored traffic reaches the sensor, Suricata writes eve.json, the agent monitors it as JSON, the manager receives it, and a rule generates an alert.
Resource and Time Checks
df -h
df -ih
free -h
uptime
timedatectlFor the Amazon Linux 2023 Wazuh server, check chronyd when installed:
sudo systemctl --no-pager --full status chronydFor Ubuntu sensors, check the configured time-synchronization service, commonly systemd-timesyncd or chrony.
Listening Ports and Firewall
sudo ss -lntup | grep -E '1514|1515|55000|9200|443'Use the firewall tool installed on that host:
sudo firewall-cmd --list-all # firewalld, common on RPM-based systems
sudo ufw status verbose # UFW, when installed on UbuntuTroubleshooting Order
- Confirm the source event exists on the endpoint or sensor.
- Confirm the Wazuh agent is active.
- Inspect the relevant
ossec.log. - Test the exact raw event with
wazuh-logtestwhen rule/decoder behavior is in question. - Confirm an alert exists in
alerts.json. - If the alert exists but is absent from the Dashboard, check the time range, indexer, and dashboard services.
- Restart only the affected service after preserving evidence.
Technical References
- Wazuh architecture and required ports: https://documentation.wazuh.com/current/getting-started/architecture.html
wazuh-control: https://documentation.wazuh.com/current/user-manual/reference/tools/wazuh-control.htmlagent_control: https://documentation.wazuh.com/current/user-manual/reference/tools/agent-control.htmlwazuh-logtest: https://documentation.wazuh.com/current/user-manual/reference/tools/wazuh-logtest.html- Rules, decoders, and alert paths: https://documentation.wazuh.com/current/user-manual/ruleset/index.html
- Wazuh Suricata integration: https://documentation.wazuh.com/current/proof-of-concept-guide/integrate-network-ids-suricata.html