This document explains how to configure the Wazuh agent on a Fedora system to collect kernel logs from journald using journalctl, and how to verify and view them on the Wazuh Dashboard.
Edit /var/ossec/etc/ossec.conf and add:
<localfile>
<command>journalctl -k --no-pager -o short-iso -f -n 0</command>
<log_format>syslog</log_format>
<alias>journald-kernel</alias>
</localfile>This instructs the Wazuh agent to tail only kernel logs from journald.
sudo systemctl restart wazuh-agentcat /var/ossec/logs/ossec.log | grep journalctlYou should see entries confirming that ossec-logcollector started reading from journalctl.
sudo dmesg --kernel --level=warn,err,critThis triggers kernel warnings and errors that should be forwarded by the agent.
In the Wazuh Dashboard:
-
Go to Security events → Security Events (Discover).
-
Use filters such as:
agent.name:"fedora" AND data.syslog.facility:kernelor
agent.name:"fedora" AND rule.groups:"syslog"
-
Check the Alerts view for triggered rules (e.g., 5302, 5303).
To build a dedicated view:
- Dashboard → Create visualization
- Select Data Table or Log Stream
- Apply filter:
data.syslog.facility:kernel - Save as "Kernel Logs (Fedora)"
- Add it to your custom dashboard
With this setup, kernel logs from Fedora’s journald are continuously collected by the Wazuh agent, sent to the Wazuh Manager, and made available in the Wazuh Dashboard for monitoring and alerting.