All Products
Search
Document Center

ApsaraDB for MongoDB:Download audit logs

Last Updated:Jul 17, 2026

Download queried audit logs to your computer for archiving or further analysis.

Prerequisites

Ensure that the audit log feature is enabled. For more information, see Enable audit logs.

Procedure

  1. Navigate to the Replica Set Instances or Sharded Cluster Instances page. In the top navigation bar, select a resource group and region, and then click the target instance ID.

  2. In the left-side navigation pane, choose Data Security > Audit Logs.

  3. In the log chart area, download the audit logs as needed.

    • Download audit logs from a specific chart

      Click 更多 in the upper-right corner of the target chart, and select Download Chart Data or Download Chart.

      Note

      To download specific logs, filter them by using one of the following methods.

      • Filter by criteria such as keyword, operation type, or client IP address. For more information, see Query audit logs.

      • Filter by time range. In the upper-right corner of the target chart, click 更多, select Select Time Range, and then specify a time range.

      • After you click Download Chart Data, the log entries for the selected area are saved to your computer in a .csv file. You can view the file with a tool like Microsoft Excel.

      • After you click Download Chart, the chart image is saved to your computer in a .png file. You can view the file with an image viewer.

    • Download all audit logs

      • To download 2,000 or fewer audit log entries

        In the upper-right corner of the Audit Log Details list, click 更多 and select Download Chart Data.

        Note

        To download logs for a specific period, first click 更多 in the upper-right corner of the Audit Log Details list, select Select Time Range, and then specify a time range.

        After you click Download Chart Data, the log entries for the selected area are saved to your computer in a .csv file. You can view the file with a tool like Microsoft Excel.

      • To download more than 2,000 audit log entries

        Download the logs from the Log Service console. For more information, see Download logs.

        Important

        Keep the following in mind:

        • The name of the target Project must be in the format nosql-{your Alibaba Cloud account ID}-{region}, for example, nosql-17649847257****-cn-hangzhou. Then, select the mongodb_audit_log_standard Logstore.

        • For the download method, select either Download All Logs with Cloud Shell or Download All Logs Using Command Line Tool. If you select Download Log in Current Page, only the logs displayed on the current page are downloaded.