All Products
Search
Document Center

ApsaraDB for MongoDB:Download audit logs

Last Updated:Mar 28, 2026

Download audit logs from an ApsaraDB for MongoDB instance to archive, filter, and analyze them locally.

Prerequisites

Before you begin, ensure that you have:

Download audit logs from a chart

Use this method to download a filtered subset of audit log data from a specific chart.

  1. Go to the Replica Set Instances or Sharded Cluster Instances page. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.

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

  3. (Optional) Filter log entries before downloading:

    • By keyword, operation type, or client IP address: See View audit logs.

    • By time range: Click the More icon in the upper-right corner of the chart and select Select Time Range.

  4. Click the More icon in the upper-right corner of the chart and select a download option:

    OptionOutput formatOpen with
    Download Chart Data.csvExcel or a similar spreadsheet tool
    Download Chart.pngMicrosoft Paint or a similar image viewer

Download all audit logs

Choose a download method based on the total number of log entries.

Up to 2,000 log entries

  1. Go to the Replica Set Instances or Sharded Cluster Instances page. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.

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

  3. (Optional) Click the More icon in the upper-right corner of the Audit Log Details section and select Select Time Range to narrow the results.

  4. Click the More icon in the upper-right corner of the Audit Log Details section and select Download Chart Data. The log entries download as a .csv file that you can open with Excel or a similar tool.

More than 2,000 log entries

Download audit logs directly from the Log Service (SLS) console. For instructions, see Download logs.

Important

When configuring the download in the Log Service console, use the following settings:

SettingValue
Logstoremongodb_audit_log_standard
Project namenosql-{Alibaba Cloud account ID}-{Region} (example: nosql-17649847257****-cn-hangzhou)
Download methodDownload All Logs with Cloud Shell or Download All Logs Using Command Line Tool

Do not select Download Log in Current Page, which downloads only the logs visible on the current page.