This topic describes how to disable audit logs for an ApsaraDB for MongoDB instance.

Prerequisites

The new audit log feature is enabled. For more information, see Enable the new audit log feature.

Background information

The audit log feature of ApsaraDB for MongoDB cannot be disabled. To reduce the size of audit logs and save storage space, you can disable the audit logs on specific types of operations.

Impacts

If you disable the audit logs on specific types of operations, ApsaraDB for MongoDB ignores these types of operations during the audit process. However, earlier audit logs that are generated for these types of operations are retained. You can still query these audit logs to obtain information that helps you resolve functionality issues. For more information, see Query audit logs.

Procedure

  1. Log on to the ApsaraDB for MongoDB console.
  2. In the upper-left corner of the page, select the resource group and the region of the target instance.
  3. In the left-side navigation pane, click Replica Set Instances, or Sharded Cluster Instances based on the instance type.
  4. Find the target instance and click its ID.
  5. In the left-side navigation pane of the Instance page, choose Data Security > Audit Logs.
  6. In the upper-left corner of the page, click Audit Log Filter Setting.
  7. On the Audit Log Filter Setting page, click Audit Log Filter Setting. In the Audit Log Filter Setting pane, clear the types of operations that you do not want to audit, and click Submit.
    Note The size of audit logs that are generated for operations of the admin and slow types is small. You can use these audit logs to resolve functionality issues. We recommend that you select these two operation types. For more information about operation types, see Modify audit settings.