Altering the default audit trail record types and collection duration
Immuta has default settings for each type of audit record it collects and the amount of time these are kept within the audit trail. This article looks at how to alter the default retention duration.
bometadata=# select table_schema, table_name, pg_relation_size('"'||table_schema||'"."'||table_name||'"'),pg_total_relation_size('"'||table_schema||'"."'||table_name||'"')
from information_schema.tables
where table_schema in ('pgboss','bometadata')
order by table_schema,3 desc;
table_schema | table_name | pg_relation_size | pg_total_relation_size
--------------+--------------------------------+------------------+------------------------
bometadata | auditrecord | 5100445696 | 8789712896bometadata=# select "recordType", min("createdAt"), max("createdAt"), count(*) as "recordCount" from bometadata.auditrecord group by "recordType" order by "recordCount" desc;
recordType | min | max | recordCount
------------------------------+----------------------------+----------------------------+-------------
spark | 2020-04-24 16:36:36.643+00 | 2024-04-30 15:28:36.992+00 | 22655076
sqlQuery | 2020-04-21 20:28:52.739+00 | 2024-04-30 15:29:54.958+00 | 13252993"cleanUpAuditRecordTypeExclusions": [
"dataSourceSubscription",
"sqlQuery",
"nativeQuery",
"blobFetch",
"spark",
"policyHandlerCreate",
"policyHandlerUpdate",
"policyExemption",
"globalPolicyCreate",
"globalPolicyUpdate",
"globalPolicyDelete",
"globalPolicyDisabled",
"globalPolicyConflictResolved",
"prestoQuery",
"globalPolicyApproved",
"globalPolicyChangeRequested",
"globalPolicyApprovalRescinded"
]PreviousAdding an HTTP Proxy to Self-Managed DeploymentNextAPI calls required to collect an audit trail
Last updated

