Dear List,
starting to configure Wazuh for the first time I wonder because of
missing e-mail alerts about new, changed or deleted files. What I did is
on the manager:
vi /var/ossec/etc/ossec.conf
<ossec_config>
...
<global>
<jsonout_output>yes</jsonout_output>
<alerts_log>yes</alerts_log>
<logall>no</logall>
<logall_json>no</logall_json>
<email_notification>yes</email_notification>
<smtp_server>mailhost.anywhere.on.earth.</smtp_server>
<email_from>WazuhServer...@anywhere.on.earth</email_from>
<email_to>m...@anywhere.on.earth</email_to>
<email_maxperhour>32</email_maxperhour>
</global>
<alerts>
<log_alert_level>1</log_alert_level>
<email_alert_level>7</email_alert_level>
</alerts>
<email_alerts>
<email_to>m...@anywhere.on.earth</email_to>
<event_location>001|a01-210-210|10.97.210.210</event_location>
<do_not_delay />
<do_not_group />
</email_alerts>
<!-- 550 changed, 553 deleted, 554 added -->
<email_alerts>
<email_to>m...@anywhere.on.earth</email_to>
<event_location>001|a01-210-210|10.97.210.210</event_location>
<rule_id>550, 553, 554</rule_id>
<do_not_delay />
<do_not_group />
</email_alerts>
<syscheck>
<disabled>no</disabled>
<!-- Frequency that syscheck is executed default every 12 hours -->
<frequency>3600</frequency>
<scan_on_start>yes</scan_on_start>
<!-- Generate alert when new file detected -->
<alert_new_files>yes</alert_new_files>
<!-- Don't ignore files that change more than 3 times -->
<auto_ignore>no</auto_ignore>
<!-- Directories to check (perform all possible verifications) -->
<directories check_all="yes" report_changes="yes"
realtime="yes">/etc,/usr/bin,/usr/sbin</directories>
<directories check_all="yes" report_changes="yes"
realtime="yes">/bin,/sbin,/boot</directories>
</syscheck>
...
</ossec_config>
On Manager and on Agent (a01-210-210) I did a
"/var/ossec/bin/ossec-control restart".
Then I went to the Agent and created a file in one of the observed
directories:
touch /etc/test
After that I triggered a syscheck for all agents on manager:
/var/ossec/bin/agent_control -r -a
But I never got any e-mail notification about the new file added :-( ....
Maybe someone sees, what I did wrong, thx & with best regards
Hans-Ulrich
PS: the "anywhere.on.earth"-stuff is only a placeholder for the real values.