All Products
Search
Document Center

ApsaraDB for MongoDB:Download audit logs

Last Updated:Dec 12, 2023

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

Prerequisites

Before the official launch of the audit log feature, the free trial edition was activated for the instance.
Note Starting from January 6, 2022, the official edition of the audit log feature has been launched in all regions, and new applications for the free trial edition have ended. For more information, see [Notice] On official launch of the pay-as-you-go audit log feature and no more application for the free trial edition.

Procedure

  1. Log on to the ApsaraDB for MongoDB console.

  2. In the left-side navigation pane, click Replica Set Instances or Sharded Cluster Instances based on the instance type.

  3. In the upper-left corner of the page, select the resource group and region to which the instance belongs.

  4. Click the ID of an instance, or click More icon in the Actions column corresponding to the instance and select Manage.

  5. In the left-side navigation pane of the instance details page, choose Data Security > Audit Logs.

  6. In the chart section, download audit logs based on your business requirements.

    • Download audit logs from a specified chart

      Click More in the upper-right corner of the chart that you want to view, and select Download Chart Data or Download Chart.

      Note

      You can filter the log entries of a chart by using the following methods and download only the log entries that you require.

      • Filter log entries based on conditions such as keyword, operation type, and client IP address. For more information, see View audit logs.

      • Filter log entries based on the time when they were generated. Click More in the upper-right corner of the chart that you want to view and select Select Time Range to specify a time range.

      • After you click Download Chart Data, the log entries that meet the specified conditions 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.

      • After you click Download Chart, the log entries that meet the specified conditions are downloaded in the web browser and saved as a .png file to your computer. You can view the file by using tools such as Paint.

    • Download all audit logs

      Click More in the upper-right corner of the Audit Log Details section and select Download Chart Data.

      Note

      You can click More in the upper-right corner of the Audit Log Details section and select Select Time Range to specify a time range. Then, you can download audit logs that meet your requirements.

      After you click Download Chart Data, the log entries that meet the specified conditions 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.