The log rotation will be applied by using the ILM policy, to make that you can take a look to this documentation blog, where everything is explained step by step:
Wazuh index management · Wazuh · The Open Source Security Platform
As it is a hard link, you can not change the internal log rotation strategy or directory. However, as /var/ossec/logs/alerts/<year>/<month>/<day>.json|log files are generated per day, you can schedule a cronjob in your environment to move the older files to some other directory. For example:
These crontab will run at 00:00 am everyday and automatically move the files from /var/ossec/logs/alerts/ directory that was last modified before 2 days or more as -mtime +2 to /home/backup directory. You can modify the destination directory and last modified duration. However, it is recommended to set the -mtime value at least +2 to avoid moving any files that might be needed by Wazuh Manager later.
For the syslog at /var/log/, you can create a similar cronjob according to your need. However, it is always recommended to be aware of the static files and avoid moving them to reduce the risk of breaking things.
You can review these to learn more about cronjob:
I hope it helps. Please let me know, if you need anything else.