You can check if logs reach the manager by enabling temporarily logall_json in wazuh-manager
https://documentation.wazuh.com/current/user-manual/reference/ossec-conf/global.html#logall-json
To enable logall, go to the manager ossec.conf file and change:
<logall_json>no</logall_json>
to:
<logall_json>yes</logall_json>
Restart the manager-
All logs received in the manager will be stored in the file /var/ossec/log/archives/archives.json.
If the log is received by the manager but no alert was generated, you should create custom rules and decoders.
Here I share information about custom rules and decoders.
https://wazuh.com/blog/creating-decoders-and-rules-from-scratch/
https://documentation.wazuh.com/current/user-manual/ruleset/custom.html
https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/index.html
The wazuh_logtest tool can help with the whole process:
https://documentation.wazuh.com/current/user-manual/capabilities/wazuh-logtest/how-it-works.html
If the manager does not receive the events, we must verify if the samba server is writing the logs in a file, and then if the agent has the correct logcollector configuration to collect the logs.
I hope it helps.
Best regards,
Pedro Nicolas.
Could you share the complete log as wazuh-manager receives it? this is by enabling the logall_json, in the previous comment I explain how to configure it.
It should look like the following example log:
{"timestamp":"2024-06-11T10:06:00.083-0300","agent":{"id":"000","name":"nico-VirtualBox"},"manager":{"name":"nico-VirtualBox"},"id":"1718111160.77271","full_log":"2024-01-01 01:23:45,678 [main] INFO com.sample.server.sample.sampletext.SampleController - getSampleList#127.0.0.1#username=sample #Request: [sampleString=1, sampleCode=1, sampleType=1] ","predecoder":{"timestamp":"2024-01-01 01:23:45,678"},"decoder":{},"location":"/home/nico/log-test/test"}