To view request records of ApsaraDB for Redis by using audit logs, you must enable the audit log feature.
- The engine version of the ApsaraDB for Redis instance is Redis 4.0 or later.
- The ApsaraDB for Redis instance uses the latest minor version.
This topic is applicable to earlier versions of the audit log feature of ApsaraDB for Redis. For more information about the new version, see Enable the new version of the audit log feature.
After the audit log feature is enabled, the system applies for disk space to save logs. By default, logs are retained for 7 days. You can set the logs to be retained for up to 30 days. The audit log feature is free of charge and may incur fees in later versions.
- Log on to the ApsaraDB for Redis console.
- On the top of the page, select the region where the instance is deployed.
- On the Instances page, click the Instance ID of the instance.
- The Instance Information page appears. In the left-side navigation pane, choose .
- On the Audit Log page, click Config.
- In the dialog box that appears, click On, set Retention Days, and then click Confirm.
Note To disable the audit log feature, click Off. If the audit log feature is disabled, existing audit logs are deleted. Proceed with caution.
- In the Open Audit Log dialog box, read the prompt and click Confirm, On.