Official audit logs are billed on a pay-as-you-go basis based on the storage usage and log retention period. If you want to modify the log retention period for all ApsaraDB for MongoDB instances in your Alibaba Cloud account that reside in the same region, you can use the ApsaraDB for MongoDB console. This topic describes how to modify the log retention period.
Precautions
- The specified retention period is valid for all instances in the region of the current instance. We recommend that you evaluate the retention period of audit logs for all instances in the same region before you set the parameter.
- Audit logs are billed on a pay-as-you-go basis based on the storage usage and log retention period. To prevent high costs, we recommend that you set the shortest period that meets your business requirements.
Procedure
- Log on to the ApsaraDB for MongoDB console.
- In the upper-left corner of the page, select the resource group and region to which the instance belongs.
- In the left-side navigation pane, click Replica Set Instances or Sharded Cluster Instances based on the instance type.
- Click the ID of an instance, or click in the Actions column corresponding to the instance and select Manage.
- In the left-side navigation pane of the instance details page, choose .
- In the upper-right corner, click Service Settings.
- In the Global Settings section of the Service Settings panel, modify the log retention period. Important
- The specified retention period is valid for all instances in the region of the current instance. We recommend that you evaluate the retention period of audit logs for all instances in the same region before you set the parameter.
- Audit logs are billed on a pay-as-you-go basis based on the storage usage and log retention period. To prevent high costs, we recommend that you set the shortest period that meets your business requirements.
- Click OK.
Related API operations
Operation | Description |
---|---|
ModifyAuditPolicy | Enables the audit log feature for an ApsaraDB for MongoDB instance and sets a retention period for audit logs, or disables the audit log feature for an ApsaraDB for MongoDB instance. |