Premium Feature — Available with the Professional and Enterprise Editions of LabKey Server. Learn more or contact LabKey.

Site Administrators have the option to enable a Retention Time for audit log events. By default this option is disabled, and all audit log data is retained indefinitely. When enabled, logs can be retained for as short as 3 months or as long as 7 years. On a nightly basis, audit records older than the set retention time will be deleted. You have the option to export the data to text files before rows are deleted.

This page is also visible to users with the "Troubleshooter" role on the site, but only Site Administrators can make changes to settings here.

Enable Audit Log Retention Time

Setting a retention time for audit log event tables will cause the server to delete all rows with a creation timestamp older than the specified limit. This means that the audit logs active on the server will only go back the specified amount of time.

To set an audit log retention time:

  • Select (Admin) > Site > Admin Console.
  • Under Premium Features, click Audit Log Maintenance.
  • Select the desired Retention time from the dropdown menu.
  • Click Save to enable.

Options are:

    • None - all audit log data is retained indefinitely
    • 3 months
    • 6 months
    • 9 months
    • 1 year
    • 18 months
    • 2 years
    • 3 years
    • 4 years
    • 5 years
    • 6 years
    • 7 years
If, for example, you choose to set the retention time at 3 years then LabKey will automatically, on a nightly basis, delete all rows from the audit tables that were created more than three years ago.

Export Archive Data

When a retention time is set, you also have the option to export these data rows to TSV files before the rows are deleted. The files are written to the site file root on a nightly basis. File names will be based on the table name for each specific audit log provider. If the file already exists, new rows will be appended to it. If it does not, it will be created. Administrators can then choose how to manage these archive files to suit the organization's needs.

The action to export data before deletion is enabled by default whenever a retention time is set. To disable it, uncheck the Export data before deleting rows box. When disabled, the records older than the specified retention time will be permanently deleted.

Related Topics

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand allcollapse all