This topic describes how to download the audit logs of an ApsaraDB for MongoDB instance to your computer. You can archive, filter, and analyze the downloaded audit logs.

Prerequisites

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

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, choose Data Security > Audit Logs.
  6. In the section that displays log charts, find the chart whose data you want to download, click the More icon icon in the upper-right corner of the chart, and then click Download Log.
    Note You can filter the log entries of a chart and download only the log entries that you require.
    • Filter the log entries of a chart based on various dimensions, such as keyword, operation type, and client IP address. For more information, see Filter the audit logs of an instance.
    • Filter the log entries of a chart based on the time when the log entries are generated. You need to find the chart whose data you want to download, click the More icon icon in the upper-right corner of the chart, and then select the Select Time Range to specify a time range.
    Download LogAfter you click Download Log, the log entries that meet the specified criteria are downloaded in the web browser and saved as a .csv file to your computer. You can view the file by using tools such as Excel.