The audit log function records operations performed on the databases in the instance. You can use the audit logs for fault analysis, behavior analysis, and security audit. Audit logs are generally becoming an essential regulatory requirement of Finance Cloud and other mission-critical services.
Note:MongoDB audit logs currently record only the following operations:
- auth, admin, slow, insert, update, delete, command
- slow queries that last over 100 msCommon queries are not recorded.
Log on to the MongoDB console.
Locate the target instance and click its ID or Manage in the operation column to display the Basic Information page.
In the left-side navigation pane, click Data Security.
Click the Audit log tab. The following figure shows the audit log page of a replica set instance.
You can perform the following operations:
- Set the time range, database name, database user name, or other keywords, and click Query.
- Click File List to display exported audit log files.
- Click Export File to export audit logs.