Hello, I hope you're well.
There are two separate aspects to cover here:
1. Log rotation (Wazuh Manager — filesystem logs)
Wazuh handles log rotation automatically. Log files are compressed daily and signed using MD5, SHA1, and SHA256 hashing algorithms. Rotated files are organized under /var/ossec/logs/ in year/month subdirectories.
To control how long rotated logs are kept, set monitord.keep_log_days in /var/ossec/etc/local_internal_options.conf: