gkuser wrote:i am running 3.14.2 and would like to be able to have rsyslog compress the files once it rotates them.
$template DYNfirewall,"/var/log/rsyslog/%HOSTNAME%/%$YEAR%/%$MONTH%/%$NOW%-isg-traffic.log"
So in the above I would have
/var/log/rsyslog/hostname/2008/06/2008-06-01-isg-traffic.log.2.gz
/var/log/rsyslog/hostname/2008/06/2008-06-02-isg-traffic.log.1.gz
/var/log/rsyslog/hostname/2008/06/2008-06-03-isg-traffic.log
I would rather keep control of file rotation to that of rsyslog instead of the logrotate cron.
Any new thoughts about this matter ?
Maybe it could be implemented like that:
- Code: Select all
#normal output:
*.* ?DynFile
output w/o syncing:
#*.* -?DynFile
#output w/o syncing with fast gzipping logs:
*.* -?(z1)DynFile
#output w/o syncing with best gzipping logs:
*.* -?(z9)DynFile
I would be consistent with @ syntax (log forwarding).
Alternatively it can be implemented as a module so config might look like:
- Code: Select all
:omgzip:"/var/log/rsyslog/%$YEAR%/%$MONTH%/%DAY%/%HOSTNAME%.log"
Please take it into consideration.