[syslog-ng] Limit filesize

janth at moldung.no janth at moldung.no
Thu May 24 11:53:44 CEST 2007


Hello,
Is it possible to limit the size of each logfile when using the destinatin shown under?
   destination dst { file("/syslog/logs/$R_YEAR/$R_MONTH/$R_DAY/$HOST" ); };

I.e. destination dst { file("/syslog/logs/$R_YEAR/$R_MONTH/$R_DAY/$HOST" maxsize(5g) ); };

That way no single host could log more than 5g, and if /syslog/logs is a single
filesystem, the risk of loosing logs from other hosts is minimized if a hoss
logging too much or trying to ddos syslog-ng-loghost.
Of course syslog-ng should log internally if the limit is reached and logging for host is stopped.

-- 
Jan Thomas Moldung


More information about the syslog-ng mailing list