Hello, how are you?
I recommend doing a few checks to find out what is taking up so much disk space.
First of all, please run du -sh /var/ossec to see how much disk space Wazuh is taking up.
Then, if the problem of disk space is caused by Wazuh, you should check which file is taking up disk space. Usually, those files are logs files, which are located at /var/ossec/logs. You can run the same command as before, but with the specified directory you want to check, for example, du -sh /var/ossec/logs. Old files are rotated into folders sorted by date:
/var/ossec/logs/alerts/year/month/day /var/ossec/logs/archives/year/month/dayYou can delete or move files that no longer interest you. Furthermore, when your alerts are sent to Elastic, it is not necessary to keep your logs in your manager. You can also, apply a data retention policy to remove old logs and use Opendistro IML for the elasticsearch indices, it is up to you. Here you can learn more about it: https://wazuh.com/blog/wazuh-index-management/
If the alerts file is taking up much disk space, you could run cat /var/ossec/logs/alerts/alerts.log | grep Alert | sort | cut -d '.' -f 1 | uniq -c , so you can check which alerts are repeated.
Finally, I would recommend you check Wazuh configuration in /var/ossec/etc/ossec.conf and disable options like logall and logall_json because, by default, alerts will be generated on important events or of security relevance, so with logall option enabled, you are storing all events even if they do not match a rule.
Best regards.