To view request records of ApsaraDB for Redis through audit logs, you must first enable the log auditing feature.

Prerequisites

  • 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.
Note If your instance version does not meet the conditions of the log auditing feature and you want to upgrade the version, upgrade the major or minor version as needed. For more information, see Upgrade the minor version and Upgrade the major version.

Precautions

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.

Background

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.

Procedure

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