[rsyslog] central logserver log rotation
Johnny Tan
linuxweb at gmail.com
Fri Mar 28 16:06:48 CET 2008
Jan-Frode Myklebust wrote:
> /etc/rsyslog.conf:
>
> #####################################################
> # Log everything to a per host daily logfile #
> #####################################################
> $template DailyPerHostLogs,"/var/log/syslog/%$YEAR%/%$MONTH%/%$DAY%/%HOSTNAME%/messages.log"
> *.* -?DailyPerHostLogs
>
> /etc/cron.hourly/syslog-bzip2:
>
> find /var/log/syslog/2008 -type f -mtime +1 -name "*.log" -exec bzip2 '{}' \;
Thanks for the example. And ... I was just thinking of doing
some gzip/bzip on my morning commute today, so your cron
example comes just in time too :).
johnn
More information about the rsyslog
mailing list