This is basicaly what I do:

SCRIPT that removes empty folders dated a day before today (and older):
#!/bin/bash

# Cleaning up mlogc orphan audit dirs
for dir in $(ls /path/to/mlogc/audit/ | grep -v mlogc | grep -v `date +%Y%m%d` | egrep -v "/path/to/mlogc/audit/$"); do rm -rf /path/to/mlogc/audit/${dir}; done

It is run once a day using cron.

It sure can be optimized and cleaned up. And I'm sure there is a better way to do it. But since mlogc does not clean it up, this is what is working for me :)


 Atenciosamente,

Marcus Semblano
CT - Segurança | Security Specialist
T: 11 3544-0444

Locaweb – www.locaweb.com.br
Líder em Hosting Infrastructure Services no Brasil e na América Latina em 2012, segundo a IDC


From: Reuben Popp [reuben.popp@gmail.com]
Sent: Friday, March 07, 2014 1:01 PM
To: mod-security-users@lists.sourceforge.net
Subject: [mod-security-users] Daily/Weekly cleanup of mlogc CollectorRoot?

Hey all,

Does anyone know of any scripts or have any suggestions on best practices for cleaning up the empty directories left by mlogc after shipping events off to the collector?  That is, assuming that KeepEntries is set to 0.

As always, TIA!
Reuben