In Web Application Firewall (WAF), after you enable the Simple Log Service for WAF feature, you can change the retention period of logs based on your protection and analysis requirements. The default retention period is 180 days. This topic describes how to change the retention period of logs.
Benefits of dynamically adjusting log retention periods
The required log retention period varies based on the business and technical scenario. You can adjust the period to flexibly manage enterprise resources, ensure system performance and data security, and meet compliance and business requirements.
Reduce storage costs:
The amount of log data significantly increases with business development. This causes storage costs to increase. You can reduce your log retention period to reduce storage usage and costs.
Optimize performance:
Large-scale log storage compromises the speed of query and analysis response and system performance. You can reduce your log retention period to reduce the amount of historical log data and improve the system performance and response speed.
Meet compliance requirements:
The law-compliant log retention period varies based on the industry and the area. You can adjust your log retention period to meet different requirements. This helps prevent legal and compliance issues.
Achieve regular auditing and monitoring:
Enterprises need to audit and monitor log data on a regular basis to ensure the traceability of security events. You can adjust your log retention period to cover the time range required for auditing and monitoring. This ensures the availability of the required logs.
Improve data security:
Long-term and large-scale log storage may increase the risk of sensitive data leakage. You can reduce your log retention period to mitigate the risk and improve data security.
Adapt to business requirement changes:
The required log retention period changes when the business requirements and conditions change. You can dynamically adjust your log retention period based on the changes to meet the business and resource configuration requirements in different phases.
Procedure
Log on to the WAF 3.0 console. In the top navigation bar, select the resource group and region of your WAF instance. You can select Chinese Mainland or Outside Chinese Mainland.
In the left-side navigation pane, choose .
In the upper-right corner of the Log Service page, click Storage Duration to go to the Simple Log Service console.
On the Logstore Attributes page, click Modify in the upper-right corner. Then, modify the Data Retention Period parameter and click Save. You can change the parameter value to Specified Days or Permanent Storage.
NoteIf you set the Data Retention Period parameter to Specified Days, you can further specify a period of time in the range of 1 to 3,650 days. If you want to store logs for a longer period of time, you can set the parameter to Permanent Storage.
If the log retention period that you specify ends, expired logs are automatically deleted.