This topic describes how to enable the log analysis feature in the Anti-DDoS Pro or Anti-DDoS Premium console. The log analysis feature allows you to collect the logs of Anti-DDoS Pro or Anti-DDoS Premium to Log Service.
Prerequisites
- An Anti-DDoS Pro or Anti-DDoS Premium instance is created. For more information, see Purchase an Anti-DDoS Pro or Anti-DDoS Premium instance.
- A domain name is added to the Anti-DDoS Pro or Anti-DDoS Premium instance. For more information, see Add a website.
Procedure
Important Before you can use a RAM user to enable the log analysis feature, you must grant the required permissions to the RAM user. For more information, see RAM user authorization.
- Log on to the Anti-DDoS Pro console.
- In the upper-left corner of the page, select Chinese Mainland. In this example, Anti-DDoS Pro is used. If you want to use Anti-DDoS Premium, select Outside Chinese Mainland.
- In the left-side navigation pane, choose .
- Select a log storage capacity and duration on the buy page. If you have purchased a log storage capacity and duration, skip this step.
- On the Log Analysis page, authorize Anti-DDoS Pro to use the AliyunDDoSCOOLogArchiveRole role to access Log Service. This operation is required only when you enable the log analysis feature for the first time. You must complete the authorization by using your Alibaba Cloud account.Warning To ensure that logs can be collected to Log Service, do not revoke permissions from the AliyunDDoSCOOLogArchiveRole role or delete the role.
- On the Log Analysis page, select the website domain, and turn on the Status switch to enable the log analysis feature. Important We recommend that you check the remaining log storage space and validity period at regular intervals when you use the log analysis feature. If more than 70% of storage space is used, we recommend that you increase the log storage capacity. Otherwise, you cannot store additional logs and data loss may occur.
Related operations
Operation | Description |
---|---|
Disable log delivery | On the Log Analysis page, select the website domain and turn off Status. |
Change the log storage period | Click Details. In the Details dialog box, modify the Storage Period parameter. Valid values: 30 to 180. Unit: days. |
Clear logs | If you want to delete logs to release the log storage space, click Clear on the Log Analysis page. Warning After you perform this operation, all logs that are stored are deleted. Proceed with caution. |
Renew | After the validity period of the log analysis feature expires, no more logs can be stored. The stored logs can be retained for seven days after the log analysis feature expires. Then, the Anti-DDoS Pro server clears all logs that are stored in the Logstore of your instance. To prevent the issues that are related to the expired log analysis feature, we recommend that you pay attention to the expiration time of the feature and renew the feature at the earliest opportunity, or enable auto-renewal. On the Log Analysis page, click Renew. For more information, see Renew a Log Analysis instance. |
Increase the log storage capacity | On the Log Analysis page, click Upgrade to increase the log storage capacity. For more information, see Manage log storage. |
Decrease the log storage capacity | On the Log Analysis page, click Downgrade to decrease the log storage capacity. For more information, see Manage log storage. |