I am wondering about a good logroate for our icingaweb2.log.
So far I would work with:
/var/log/icingaweb2/icingaweb2.log {
weekly
rotate 4
compress #size 500M
su root icingaweb2
create 0644 apache apache
postrotate
/bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true
endscript
}
The size line is optional
I am not quite sure about my postrotate, though. Do I need this?
The answer depends greatly on the size of your environment.
Personally these messages are not so important thusly we do a daily rotation and just keep 3 days worth of history.