[syslog-ng] Logs rotate and compress but still log to compressed file

Valdis.Kletnieks at vt.edu Valdis.Kletnieks at vt.edu
Tue May 17 22:24:49 CEST 2005


On Tue, 17 May 2005 14:13:40 MDT, Andrew Morris said:

> 2) Use syslog-ng to rotate your logs daily for you.  Then rotate the
> logs from previous days.

I use:

destination n_messages { file("/logs/$HOST/$YEAR/$MONTH/messages-$YEAR-$MONTH$DAY"); }

find /logs -type f -mtime +30 ! -name '*.gz' -exec gzip {} \;
find /logs -type f -mtime +180 -exec rm {} \;

Or whatever floats your boat...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 226 bytes
Desc: not available
Url : http://www.test.balabit.hu/pipermail/syslog-ng/attachments/20050517/539e69a7/attachment.pgp


More information about the syslog-ng mailing list