After you enable the Log Analysis feature, you can modify the log storage capacity or delete all stored logs.

Prerequisites

The Log Analysis feature is enabled for your Anti-DDoS Pro or Anti-DDoS Premium instance.

For more information, see Step 1: Enable Log Analysis.

Background information

You can increase or decrease the log storage capacity based on your business requirements. For more information, see Increase the log storage capacity and Decrease the log storage capacity. If you enable log collection for a new website, the required log storage capacity increases. If you reduce the log storage duration, the log storage capacity that is required for the same business scale decreases.

Method to calculate the required log storage capacity

The following example shows how to estimate the required log storage capacity based on the daily QPS of your website:

In most cases, each request log occupies approximately 2 KB of storage. If the average QPS of your website is 500, the required storage for the logs that are generated within a day is 86,400,000 KB, which is approximately 82 GB. This value is calculated by using the following formula: 500 × 60 × 60 × 24 × 2 = 86,400,000. If you want to store logs that are generated within 180 days, the required log storage capacity is 15,552,000,000 KB, which is approximately 14.5 TB. This value is calculated by using the following formula: 86,400,000 × 180 = 15,552,000,000.

Method to handle exhausted log storage capacity

If the log storage capacity is exhausted, new logs cannot be stored and are lost. To resolve this issue, you can perform one of the following operations:
  • (Recommended) Increase the log storage capacity. For more information, see Increase the log storage capacity.
  • Delete stored logs and reduce the log storage duration. For more information, see Delete logs and Modify the log storage duration.
    Notice
    • If you perform this operation, all logs are deleted and cannot be recovered. Before you delete the stored logs, make sure that you no longer need all logs.
    • Each Alibaba Cloud account can delete stored logs twice. If you want to delete stored logs more than twice, submit a ticket. We recommend that you do not frequently delete logs. If the log storage capacity cannot meet your business requirements, we recommend that you increase the log storage capacity at the earliest opportunity.

Increase the log storage capacity

If the log storage capacity cannot meet your business requirements, you can increase the log storage capacity.
  1. Log on to the Anti-DDoS Pro console.
  2. In the top navigation bar, select the region where your instance resides.
    • Mainland China: If you select this region, the Anti-DDoS Pro console appears.
    • Outside Mainland China: If you select this region, the Anti-DDoS Premium console appears.
    You can switch the region to configure and manage Anti-DDoS Pro or Anti-DDoS Premium instances. Make sure that you select the required region when you use Anti-DDoS Pro or Anti-DDoS Premium.
  3. In the left-side navigation pane, choose Investigation > Log Analysis.
  4. In the upper-right corner of the Log Analysis page, click Upgrade.
  5. On the Upgrade/Downgrade page, select a log storage capacity that is greater than the current one, and read and select Log Service Terms of Service.
    Example: If the current log storage capacity is 3 TB, you can select 5 TB or higher.
  6. Click Buy Now and complete the payment.
    After the log storage capacity is increased, you can view the new log storage capacity and usage in the upper-right corner of the Log Analysis page.

Decrease the log storage capacity

If the log storage capacity exceeds your business requirements, you can decrease the log storage capacity.

  1. Log on to the Anti-DDoS Pro console.
  2. In the top navigation bar, select the region where your instance resides.
    • Mainland China: If you select this region, the Anti-DDoS Pro console appears.
    • Outside Mainland China: If you select this region, the Anti-DDoS Premium console appears.
    You can switch the region to configure and manage Anti-DDoS Pro or Anti-DDoS Premium instances. Make sure that you select the required region when you use Anti-DDoS Pro or Anti-DDoS Premium.
  3. In the left-side navigation pane, choose Investigation > Log Analysis.
  4. In the upper-right corner of the Log Analysis page, click Downgrade.
  5. On the Upgrade/Downgrade page, select a log storage capacity that is less than the current one, and read and select Log Service Terms of Service.
    Example: If the current log storage capacity is 10 TB, you can select 5 TB or lower.
  6. Click Buy Now and complete the payment.
    After the log storage capacity is decreased, you can view the new log storage capacity and usage in the upper-right corner of the Log Analysis page.

Delete logs

If you do not want stored logs to occupy your log storage, you can delete the logs. After you delete the logs, all logs that are stored are deleted.

  1. Log on to the Anti-DDoS Pro console.
  2. In the top navigation bar, select the region where your instance resides.
    • Mainland China: If you select this region, the Anti-DDoS Pro console appears.
    • Outside Mainland China: If you select this region, the Anti-DDoS Premium console appears.
    You can switch the region to configure and manage Anti-DDoS Pro or Anti-DDoS Premium instances. Make sure that you select the required region when you use Anti-DDoS Pro or Anti-DDoS Premium.
  3. In the left-side navigation pane, choose Investigation > Log Analysis.
  4. In the upper-right corner of the Log Analysis page, click Clear.
    Notice If no logs are stored, the Clear operation is not supported.
  5. In the Are you sure to clear all logs? message, click OK.
    Each Alibaba Cloud account can delete stored logs twice. If you want to delete stored logs more than twice, submit a ticket. We recommend that you do not frequently delete logs. If the log storage capacity cannot meet your business requirements, we recommend that you increase the log storage capacity at the earliest opportunity.
    Warning You cannot recover the logs that you delete. Proceed with caution.
    After you delete the logs, you must wait for 2 to 3 hours before you can view the result in the upper-right corner of the Log Analysis page.