Hi Chetan,
I think I reproduced your issue. When using wazuh-logtest to test the Wazuh ruleset, the generated alerts are not written to the alert files. However, I have performed the same test by monitoring a log file and writing the event in there.
1. Configure Logcollector to monitor test.log as follows:
<localfile>
<log_format>syslog</log_format>
<location>/root/test.log</location>
</localfile>
2. Restart your manager and wait until the file is monitored:
2023/02/14 10:29:42 wazuh-logcollector: INFO: (1950): Analyzing file: '/root/test.log'.
3. Write the event into test.log:
# echo "Feb 6 17:37:26 mlhofw01.medreichin.com 1675705047.440102845 Medreich_HO_Secondary_ security_event ids_alerted signature=1:58125:1 priority=1 timestamp=1675705047.281494 direction=ingress protocol=tcp/ip src=3.24.133.171:43352 dst=192.168.1.65:25 decision=blocked action=allow message: FILE-OFFICE Microsoft MSHTML ActiveX control bypass attempt" >> /root/test.log
3. The alert appears in both alert files (/var/ossec/logs/alerts.log and /var/ossec/logs/alerts.json):
** Alert 1676367032.866806: - ids,
2023 Feb 14 10:30:32 mlhofw01.medreichin.com->/root/test.log
Rule: 20101 (level 6) -> 'IDS event.'
Feb 6 17:37:26 mlhofw01.medreichin.com 1675705047.440102845 Medreich_HO_Secondary_ security_event ids_alerted signature=1:58125:1 priority=1 timestamp=1675705047.281494 direction=ingress protocol=tcp/ip src=3.24.133.171:43352 dst=192.168.1.65:25 decision=blocked action=allow message: FILE-OFFICE Microsoft MSHTML ActiveX control bypass attempt
message: FILE-OFFICE Microsoft MSHTML ActiveX control bypass attempt
Please do the same test so we can confirm it works as expected.
In addition, I see several warnings when the analysis engine loads the ruleset. Please, fix them so that the module works as it should in all cases. Here you can see
the ruleset documentation so you can know how it works.
I hope it helps! Don't hesitate to ask for further needs.