Hi Loic, Recommended way to do this is via partitioning the audit table<https://dev.mysql.com/doc/refman/5.1/en/partitioning.html> as it let's one easily drop the stale partitions. Based on the audit volume and available space one create partition based on week or month of the audit date.
The limit on number of files kept that you see for HDFS log writer is only to prevent the local file system from getting filed up in case local files can't be pushed to HDFS in time. As you may seen log writing to HDFS happens in two stages. First logs get written to local file which then gets pushed or appended to remote HDFS store. In the HDFS store there isn't any limit on number of files. It too would require to be managed so stale logs are purged. Thanks Alok From: Loïc Chanel <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Tuesday, July 21, 2015 at 12:54 AM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Ranger audit logrotate Hi all ! As this has not been documented in Ranger documentation, I was wondering if there is a kind of log rotation in the MySQL database Ranger handles to put its audit logs into, or a way to configure such a thing in Ranger. My problem is I want to be sure that the database will never be too big, to avoid a full use of the disk only with MySQL database. In parallel, I saw that when putting audit logs into HDFS there was a limit on the number of files kept in the log archives, but my question here is really about MySQL. Thanks in advance for your help ! Regards, Loïc Loïc CHANEL Engineering student at TELECOM Nancy Trainee at Worldline - Villeurbanne
