After you enable the Log Service for Web Application Firewall (WAF) feature, you can set the maximum log storage duration to 180 days or 360 days. You can set the maximum log storage duration based on the log storage capacity and your actual needs. This topic is suitable only for users who have purchased subscription-based WAF instances. The edition of the instances must be Business or above.

Prerequisites

  • A WAF instance is purchased and the instance meets the following requirements:
    • The WAF instance uses the subscription billing method.
    • The edition of the instance is Business or above.
      Note If the WAF instance is of the Pro edition or lower, you cannot change the log storage period.
  • The Log Service for WAF feature is enabled. For more information, see Enable Log Service for WAF.

Procedure

  1. Log on to the Web Application Firewall console.
  2. In the top navigation bar, select the resource group to which the instance belongs and the region, Mainland China or International, in which the instance is deployed.
  3. In the left-side navigation pane, choose Log Management > Log Service .
  4. In the upper-right corner of the Log Service page, move your pointer over Log Storage Period, specify the log storage duration, and then click Save.
    • If you set Log Storage Period to 360 Days when you enable the Log Service for WAF feature, the default log storage duration is 360 days. You can click 30, 90, 180, or 360 to specify the log storage duration to 30 days, 90 days, 180 days, or 360 days. You can also click Custom and enter an integer within the range of 30 to 360.
    • If you set Log Storage Period to 180 Days when you enable the Log Service for WAF feature, the default log storage period is 180 days. You can click 30, 90, or 180 to specify the log storage duration to 30 days, 90 days, or 180 days. You can also click Custom and enter an integer within the range of 30 to 180.
    Note When you enable the Log Service for WAF feature, you can set Log Storage Period to 180 Days or 360 Days. The maximum value cannot be changed. If you want to change the maximum value of Log Storage Period, click Upgrade.

Result

After the log storage duration is changed, Log Service for WAF only stores logs within the specified duration and automatically deletes expired logs.