Create hourly log rotation
j-carpentier opened this issue · 0 comments
j-carpentier commented
I'm looking for creating hourly log rotation for fast growing logs, in my case haproxy
Here is my current configuration : /etc/logrotate.d/haproxy
/var/log/haproxy.log
{
su syslog syslog
rotate 24
size 500M
maxsize 500M
hourly
missingok
notifempty
compress
delaycompress
postrotate
invoke-rc.d rsyslog rotate >/dev/null 2>&1 || true
endscript
}
I'm able to create an hourly job for haproxy using :
options:
- hourly
But unfortunately, there is no hourly crontab by default on Ubuntu 16.04 (xenial)
but only a daily one : /etc/cron.daily/logrotate