Hi,
I have found that the Audit profile retention option was removed (Ignition 8.0.11), What is the reason for this and is there another alternative to achieve the same goal, ( prune the log table for older records i.e 90 days).
Thanks in advance
It’s not available due to a bug, not any intentional removal. You can still manually edit the field - support should be able to guide you through the process. Despite not being visible, pruning is still happening, at whatever age is defined; by default, that’s 90 days.
Our main server happens to be on 8.1.0 which was before the retention setting was fully exposed in the gateway config, but I can see it if I dump the config.idb:
CREATE TABLE AUDITPROFILES (
"AUDITPROFILES_ID" NUMERIC(18,0) NOT NULL,
"NAME" VARCHAR(4096) NOT NULL,
"TYPE" VARCHAR(4096) NOT NULL,
"DESCRIPTION" VARCHAR(4096),
"RETENTION" INTEGER DEFAULT 90 NOT NULL,
CONSTRAINT PK_AUDITPROFILES PRIMARY KEY (AUDITPROFILES_ID)
);
INSERT INTO AUDITPROFILES VALUES(2,'default_audit','DATASOURCE',NULL,90);
If I shut down the server, tweak that last value to 0, and start it back up, will that properly adjust it to not prune on version 8.1.0? (We intend to upgrade soon, but I need to fix this sooner.)
Yes. Also, in 8.1.3 all datasource audit profiles (regardless of their prior prune setting) will be automatically set to have pruning disabled (with a new, explicit toggle); you’ll have to manually enable pruning (regardless of the prune age setting) upon upgrade.
Hrm… Tried a RETENTION of 0 on our development server and it just removed all the rows in the entire AUDIT_EVENTS table. Should it maybe be negative?
Looking at the logic again, negative won’t work properly either (until 8.1.3, anyways) - I would just set it to a high enough number (e.g., 5 years) that it’s guaranteed not to prune until you are able to upgrade.