Alibaba Cloud CDN allows you to process log data in Data Lake Analytics (DLA) and persist the log data in Object Storage Service (OSS). You can also use DLA to analyze log data. This topic describes how to enable log storage.
Prerequisites
Before you enable log storage, make sure that the following requirements are met:
- OSS is activated. To activate OSS, go to the product page of OSS.
- DLA is activated. To activate DLA, go to the product page of DLA.
- DLA and OSS are activated in the accelerated region of Alibaba Cloud CDN.
Background information
Alibaba Cloud CDN supports the log storage feature. This feature is integrated with OSS and DLA. When you enable log storage, the system automatically creates the AliyunServiceRoleForDCDNLogDelivery service-linked role and grants the role the permissions on OSS and DLA. Alibaba Cloud CDN can assume this role to automatically deliver logs to OSS and DLA. For more information about the service-linked role, see Manage the SLR for log storage.
Scenarios
By default, the log storage feature of Alibaba Cloud CDN retains log data for 30 days. If you want to retain log data for a longer period of time or analyze log data, you can enable DLA for log storage. DLA allows you to persist and analyze log data based on business requirements.
Billing rules
- For more information about the billing rules of OSS, see OSS Pricing.
- For more information about the billing rules of DLA, see Billing method.
Notice
- After you enable log storage, logs are delivered by DLA. You are charged for DLA even if you do not use DLA to analyze data.
- If you use DLA only to deliver log data but do not analyze log data, DLA consumes compute units (CUs) only for log delivery. No CU is consumed for log analytics.
- If you use DLA to analyze log data, CUs are consumed based on the number of log entries and the complexity of the log analytics model. CU consumption increases with the number of log entries or the complexity of the analytics model.
Enable log storage
- Logs are collected from points of presence (POPs) and then directly delivered to OSS. Log integrity is not guaranteed. If you want to acquire complete log data, we recommend that you go to the Log Download tab to download logs. Make sure that the fields that you specify are the same as the fields in the logs.
- By default, RAM users cannot enable or manage log storage. You must grant the RAM users the required permissions. For more information, see Grant a RAM user permissions on log storage.
- If you want to grant a RAM user the permissions to manage log storage, make sure that the authorized scope is set to Alibaba Cloud Account. For more information, see Step 2: Grant permissions to the RAM user.
- If you want to manage log storage as a RAM user, make sure that the authorized scope of the RAM user is set to Alibaba Cloud Account. Otherwise, log storage may be disabled for some domain names.
- Log on to the Alibaba Cloud CDN console.
- In the left-side navigation pane, choose .
- Click the DLA for Log Storage and Analytics tab.
- Click Activate Now.
- Configure the Storage Location parameter.
- Configure the Delivery Rule parameter.
Disable log storage
- Log on to the Alibaba Cloud CDN console.
- In the left-side navigation pane, choose .
- Click the DLA for Log Storage and Analytics tab.
- Click Close Delivery Task.
- Click OK.
You can delete the AliyunServiceRoleForCDNLogDelivery service-linked role. For more information, see Delete AliyunServiceRoleForCDNLogDelivery.
FAQ
What is the format of the files that are delivered to OSS after log storage is enabled?
The files that are delivered to OSS are in the Optimized Row Columnar (ORC) format. We recommend that you use DLA to analyze ORC files.