Audit Trail Log

Audit trail log feature introduces the ability to log every Model9 CLI action. The action log will result in an output file in a CSV format.

Enabling and Disabling Audit Logging

Agent configuration file

To enable the audit trail log feature add the following to the agent configuration file (agent.yml):

audit.enabled: true

To disable the audit trail log feature set the audit.enabled parameter to false or remove it as it's the default setting.

An agent restart is required for any configuration change

Agent logging properties

Add the following properties to the /usr/lpp/model9/conf/logging.properties configuration file:

io.model9.backup.common.utilities.jul.CsvRecordFileHandler.pattern=../logs/model9-audit-<system-name>-agent-<agent-name>-csv-%g.log
io.model9.backup.common.utilities.jul.CsvRecordFileHandler.limit=1000000
io.model9.backup.common.utilities.jul.CsvRecordFileHandler.count=10000
io.model9.backup.common.utilities.jul.CsvSimpleFormatter.format=%1$tF %1$tT.%1$tL,%5$s%n
io.model9.backup.common.utilities.jul.CsvRecordFileHandler.formatter=io.model9.backup.common.utilities.jul.CsvSimpleFormatter
io.model9.backup.common.utilities.jul.CsvRecordFileHandler.append=true
io.model9.backup.common.utilities.jul.CsvRecordFileHandler.level=INFO
io.model9.backup.agent.cli.missions.AbstractMission$AuditCsv.handlers=io.model9.backup.common.utilities.jul.CsvRecordFileHandler

Update the first parameter, suffixed with CsvRecordFileHandler.pattern, with the following, to ensure that each agent will write only to its own log file:

<system-name> - Replaced with the system
<agent-name>  - Replaced with the agent STC name

Create the desired folder to contain the audit trail logs for example: /usr/lpp/model9/logs

The directory should have read and write permissions.

Sample audit log file content:

2022-03-17 15:26:42.397 INFO    [io.model9.backup.agent.cli.missions.AbstractMission$AuditCsv-145] MSG00008,M9DEMO,CLI,BACKDSN,group-ADCDPL,STARTED,M9.DEMO.PS,https://s3.amazonaws.com//model9-ci-production-2,BACKDSN M9.DEMO.PS 
2022-03-17 15:26:51.851 INFO    [io.model9.backup.agent.cli.missions.AbstractMission$AuditCsv-145] MSG00008,M9DEMO,CLI,BACKDSN,group-ADCDPL,ENDED OK,M9.DEMO.PS,https://s3.amazonaws.com//model9-ci-production-2,BACKDSN M9.DEMO.PS 

Last updated