Metadata Audit Logs

Over time, the metadata audit log can become cluttered with entries that are no longer relevant. These can take up a vast amount of disk space and slow down your database. In dodeca-shell, the stats command can be used to check how many metadata audit log records exist in the current tenant.

Cleaning Up Logs

To clean up these logs, you can make use of the delete-metadata-audit-log-records dodeca-shell command.

dshell/FOO:>help delete-metadata-audit-log-records
NAME
       delete-metadata-audit-log-records - Delete metadata audit log records

SYNOPSIS
       delete-metadata-audit-log-records --all boolean --days Integer

OPTIONS
       --all boolean
       Delete all metadata audit log records
       [Optional, default = false]

       --days Integer
       Delete all metadata audit log records older than the given number of days
       [Optional]

The delete-metadata-audit-log-records command has two options: --all and --days. The --all option is a boolean flag that, when set to true, will delete all metadata audit log records. The --days option is an integer that specifies the number of days of records to keep. All records older than the specified number of days will be deleted.

For example, to delete all metadata audit log records older than 365 days, you can run the following command: delete-metadata-audit-log-records --days 365.

Output from the command will indicate the number of metadata audit log records and items that were deleted. Note that the below output is only an example and the actual number of records and items deleted may vary.

dshell/FOO:>delete-metadata-audit-log-records --days 365
 INFO > Deleted 10 metadata audit log records and 20 items from tenant FOO (note: count may erroneously report as zero depending on database technology)