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