audit-cleanup Command
Remove entries from the audit trail by means of the COMMANDER service.
It is possible to delete old audit trail entries by means of the audit
cleanup
command provided by the COMMANDER service, together with the ./config/system/cleanupConfiguration.json
configuration file.
Configuration
The audit
field in the JSON file contains details on the deletion of the audit trail entries using the following parameters:
Parameter | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
defaultCleanupAfterDays | An integer default value for the | ||||||||
actions | Contains a list of mappings of the minimum age of audit trail entry types and the corresponding cleanup timing.
|
{ "audit": { "defaultCleanupAfterDays": 10, "actions": [ { "comment": "OBJECT_CREATED", "action": 100, "cleanupAfterDays": -1 }, { "comment": "DOCUMENT_ACCESSED", "action": 400, "cleanupAfterDays": 1 } ] } }
When the lifetime of the audit trail entries is exceeded, they are not automatically deleted. The deletion of entries takes place only as a result of the execution of the audit
cleanup
command in the COMMANDER service AND if the specified lifetime is exceeded. When executed, the command reads the cleanupConfiguration.json
file. If the file does not exist, the defaultCleanupAfterDays
value is set to -1 and thus no entry will be deleted from the audit trail.
Execution in the Commander
Two parameters can be given to the audit
-cleanup
command:
Parameter | Description | Example |
---|---|---|
-t | --tenant | Specifies the target tenant. If not specified, the command is executed for all tenants. | audit-cleanup -t default (with the example tenant default ) |