You can set the retention time for audit logs in the console. Audit logs can be stored for 7 days to 30 days.

Prerequisites

  • The engine version of the ApsaraDB for Redis instance is Redis 4.0 or later.
  • The minor version of the ApsaraDB for Redis instance is the latest.
  • The log auditing feature is enabled.
Note If your instance version does not meet the conditions for using the log auditing feature and you need to upgrade the version to use this feature, upgrade the major or minor version as needed. For more information, see Upgrade the minor version and Upgrade the major version.

Procedure

  1. Log on to the ApsaraDB for Redis console.
  2. In the upper-left corner of the top navigation bar, select the region where the target instance is located.
  3. On the Instance List page, click the target instance ID or Manage in the Action column next to the target instance.
  4. On the Instance Information page, choose Logs > Audit Logs from the left-side navigation pane.
  5. On the Audit Log page, click Config.set audit log retention period
  6. In the Config Audit Log dialog box that appears, adjust the Retention Days slider, and then click Confirm.
    Warning Expired log entries are not retained.