To view request records of ApsaraDB for Redis by using audit logs, you must enable the audit log feature.

Prerequisites

  • 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.
Note If your instance version does not allow you to query audit logs and must be upgraded before you can use the audit log feature, upgrade the major or minor version as needed. For more information, see Upgrade the minor version and Upgrade the major version.

Applicability

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.

Background

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.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. On the top of the page, select the region where the instance is deployed.
  3. On the Instances page, click the Instance ID of the instance.
  4. The Instance Information page appears. In the left-side navigation pane, choose Logs > Audit Log.
  5. On the Audit Log page, click Config.
  6. 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.
  7. In the Open Audit Log dialog box, read the prompt and click Confirm, On.