Log Rotation Removal instead of Compression?

653 views
Skip to first unread message

Eli

unread,
Oct 10, 2012, 10:33:49 PM10/10/12
to flu...@googlegroups.com
Hi Folks,
I have a use case where I'd really just like to keep my current log file and just get rid of old ones. Right now, when using the "file" output plugin, Fluentd can compress my old logs when a new one is switched to. Can Fluentd do anything else at that point, like move the logs or remove them? Sure I could make an agent for this, but if it's already built into Fluentd, I'd rather not add that extra complexity.

Eli

Kazuki Ohta

unread,
Oct 11, 2012, 4:51:56 PM10/11/12
to flu...@googlegroups.com
Eli,

Unfortunately, there're no options to remove old logs. The easier way is having cron like this:

> find /path/to/dir/ -type f -mtime +30 -delete

Or using MongoDB's capped collection.

Eli

unread,
Oct 11, 2012, 4:55:10 PM10/11/12
to flu...@googlegroups.com
Thanks, KazukI!
Reply all
Reply to author
Forward
0 new messages