Information
Information stored in one location is vulnerable to accidental or incidental deletion or alteration.
Off-loading is a common process in information systems with limited audit storage capacity.
The Database management system (DBMS) may write audit records to database tables, to files in the file system, to other kinds of local repository, or directly to a centralized log management system. Whatever the method used, it must be compatible with off-loading the records to the centralized system.
Solution
To specify auditLog, or a centralized system log (recommended), configure these in the mongod.conf configuration file:
auditLog:
destination: syslog
Refer to documentation for additional configuration:
https://www.mongodb.com/docs/v8.0/core/auditing/
When deploying a Log Forwarding Tool, use a monitor for the audit log file and push records to a centralized log management system (e.g., Elasticsearch, Splunk, or a custom solution).
Allocate sufficient space to the storage volume hosting the file identified in the MongoDB configuration "auditLog.path" to support audit file peak demand.