post rotation file compression using dynafiles

This is the place for you, if you got rsyslog up and running but wonder how to make it do what you want.

Moderator: rgerhards

post rotation file compression using dynafiles

Postby gkuser » Tue Jun 03, 2008 5:00 pm

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.
gkuser
New
 
Posts: 5
Joined: Mon Jun 02, 2008 8:29 pm

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

Re: post rotation file compression using dynafiles

Postby rgerhards » Tue Jun 03, 2008 5:13 pm

Sorry, that's not yet supported. I suggest you file an enhancement request at http://bugzilla.adiscon.com/. I myself am interested in this functionality, but the new config format is definitely first to be implemented ;)

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 2647
Joined: Thu Feb 13, 2003 11:57 am

Re: post rotation file compression using dynafiles

Postby arv » Mon May 04, 2009 6:43 pm

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.
arv
Avarage
 
Posts: 12
Joined: Tue Sep 30, 2008 11:25 am

Google Ads



Return to Configuration

Who is online

Users browsing this forum: No registered users and 0 guests

cron