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
-
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.
-
In the left-side navigation pane, choose .
-
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.NoteTo 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.NoteTo 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.
ImportantKeep 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 themongodb_audit_log_standardLogstore. -
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.
-
-
-