Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create hourly log rotation #8

Open
j-carpentier opened this issue Oct 15, 2019 · 0 comments
Open

Create hourly log rotation #8

j-carpentier opened this issue Oct 15, 2019 · 0 comments

Comments

@j-carpentier
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant