On 06/03/14 21:59, Daniel Pocock wrote: > > On 06/03/14 21:51, Michael Biebl wrote: >> Am 06.03.2014 16:11, schrieb Daniel Pocock: >>> Package: rsyslog-mongodb >>> Version: 7.4.4-1 >>> >>> With normal logfiles, the files are rotated by logrotate >>> >>> What is the recommended solution for purging old records from MongoDB? >> Tbh, I have absolutely no idea. I'm actually not convinced that this >> should be done automatically. >> That said, the mongodb maintainer might have an answer, how this could >> be done for mongodb, so I've CCed him. >> >> Fwiw, the other db output plugins (e.g. rsyslog-mysql or rsyslog-pgsql) >> don't setup such an automatic pruning either. >> > I also raised an upstream issue for comments on this issue: > > https://github.com/rsyslog/rsyslog/issues/47 > > Maybe some cron job can be created and records can be purged based on > some combination of (priority, facility, age) - that would resemble the > rules used to manage the traditional files > > Given the simplicity of MongoDB setup and maintenance for this type of > data set, it could even be offered as an option in the debconf menus, e.g. > > "Do you want to enable ommongodb now in a default configuration? This > will just work if your mongodb-server has no passwords, as is the > default on Debian." > > This may lead to quite a lot of people using it. > > >
Brief update on this issue - I published a script for this on my blog: http://danielpocock.com/pruning-syslog-entries-from-mongodb It uses python-pymongo -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org