Hi Braulio,
Thanks for using Wazuh!
If you don't see the log on the agent configuration --> Log collection --> Logs, seems that log is not configured to be monitored, so you need to add this log to Agent config file "
/var/ossec/etc/ossec.conf", so edit the config file and add the following:
<localfile>
<location>/var/log/apache2/access.log</location>
<log_format>syslog</log_format>
</localfile>Then you will need to restart the agent:
systemctl restart wazuh-agent
With this configuration, the agent should be sending the logs to the manager. In order to check this, we can enable the archives in the manager so you will need to open /var/ossec/etc/ossec.conf and set the logall tag on yes, take into account that this will be generated a lot of information due to you will be logging all the events of all the agent that are connected to this Wazuh Manager, so once you have checked set this back to "no" in order to avoid disk spaces issues.
<ossec_config>
<global>
<jsonout_output>yes</jsonout_output>
<alerts_log>yes</alerts_log>
<logall>yes</logall>
Then you will need to restart the manager:
systemctl restart wazuh-manager
Now, access logs should appear in /var/ossec/logs/archives/archives.log, so you can look for the access.log on the archives by doing this:
grep access.log /var/ossec/logs/archives/archives.log
If you can see your access.log on archives.log, you will need to validate if that logs trigger some alerts, to check that you can use the logtest tool.
On the Wazuh Manager execute this:
/var/ossec/bin/wazuh-logtest and then paste the log line that you have found on the archives.log and you can observe is some alerts is generated.
If you don't get any alerts, it is because your log has not matched with any of Wazuh's build-in rules and you will need to create some custom rules.
Ref Doc.
Please, let me know if you have any doubts or questions.
Regards