All Products
Search
Document Center

Dynamic Content Delivery Network:Real-time log delivery

Last Updated:Nov 15, 2023

The real-time log delivery feature allows you to collect logs of one or more accelerated domain names in a specific region in real time and deliver the logs to Simple Log Service for analysis. This helps you monitor your business and identify service issues in an efficient manner. This topic describes how to enable or disable real-time log delivery.

Prerequisites

Simple Log Service is activated.

Limits

  • For the same domain name and the same log type, only one region of Simple Log Service to which real-time logs are delivered can be selected for each region from which real-time logs are collected. For example, if the region from which real-time logs are collected is Chinese mainland, EdgeRoutine logs of example.com cannot be delivered to the China (Hangzhou) and China (Beijing) regions at the same time. Only one delivery project can be associated with a region.

  • Note

    However, you can deliver user access logs of example.com to the China (Hangzhou) region and EdgeRoutine logs of example.com to the China (Beijing) region, because the logs are of different types.

  • You can associate a region of Simple Log Service to which real-time logs of the same type are delivered with only one delivery project. For example, if Project A delivers EdgeRoutine logs of example.com to the China (Hangzhou) region, Project B fails to deliver EdgeRoutine logs of aliyundoc.com to the China (Hangzhou) region because an EdgeRoutine log delivery project is associated with the region.

    To resolve the preceding issue, you need to add the delivery of EdgeRoutine logs that are collected from aliyundoc.com to Project A.

  • If real-time logs that you collect are of the same type, all log delivery projects share a set of fields. Field modifications that are made for a project take effect globally. For example, the domain field is selected by default for user access logs. If a user removes the domain field for a project, the field is immediately removed from other delivery projects of access logs.

Enable real-time logs

Log on to the DCDN console and choose Logs > Real-time Logs. Then, follow the on-screen instructions in the console to enable real-time logs.

开通服务

Enable real-time log delivery

  1. Log on to the DCDN console.
  2. In the left-side navigation pane, choose Logs > Real-time Logs.

  3. Click Create Delivery Project.

  4. Create a delivery project.

    1. In the Create Real-time Log Delivery Project dialog box, configure the parameters for the project. The following table describes the parameters.

      创建实时日志项目

      Parameter

      Description

      Project Name

      The name of the project. The project name is used to identify the delivery project and must be unique.

      The project name can be up to 24 characters in length and can contain letters, digits, and underscores (_).

      Log Type

      The type of real-time logs that you want to deliver. Valid values:

      • Access Log

      • WAF Interception Log

      • EdgeRoutine Log

      Log Field

      The log fields that you want to include in real-time logs of different types. For more information, see Log fields.

      Sampling Rate

      The percentage of log entries that you want to deliver to Simple Log Service. Valid values: 0% to 100%.

      Note

      Number of log entries delivered to Simple Log Service = Total number of log entries × Sampling rate. If you want to deliver all log entries, set the value to 100%.

    2. Click Next. Select the region from which real-time logs are collected and the region of Simple Log Service to which real-time logs are delivered. The region of Simple Log Service is the region in which the logs are stored.

      Important
      • After you create a delivery project, you cannot change the region from which logs are collected and the region to which logs are delivered. You can delete a delivery project that you no longer use and create a delivery project that meets your expectations. For more information, see Disable real-time log delivery.

      • The first time you create a delivery project, you need to grant DCDN the permissions to access Simple Log Service to ensure that logs can be delivered to Simple Log Service.

      投递区域

      After logs are collected, the logs can be delivered only to the region of Simple Log Service that you specified for storage. The following table describes the mapping between the regions from which logs are collected and regions to which logs are delivered.

      Collected from

      Delivered to

      Chinese Mainland

      China (Hangzhou)

      China (Shanghai)

      China (Qingdao)

      China (Beijing)

      China (Zhangjiakou)

      China (Shenzhen)

      Europe

      Germany (Frankfurt)

      US

      US (Silicon Valley)

      India

      India (Mumbai)

      Other Country/Region

      Singapore (Singapore)

    3. Click Next and select one or more domain names.

      投递域名
  5. Click Next. The delivery project is created.

    After you create a delivery project, real-time log delivery settings immediately take effect. The system automatically collects logs of the specified domain names in the selected region and delivers the collected logs to Simple Log Service.

Disable real-time log delivery

You can disable real-time log delivery for one or more domain names in a delivery project. You can also disable real-time log delivery for all domain names in a delivery project.

Scenario

Description

Disable real-time log delivery for a domain name in a delivery project

After you remove a domain name from a delivery project, real-time logs of the domain name are no longer delivered to Simple Log Service. Perform the following steps:

  1. In the list of delivery projects, select the delivery project from which you want to remove a domain name and click Modify.

  2. Click Next to go to the Domain Names step.

  3. In the Selected Domain section, remove the domain name for which you want to disable real-time log delivery.

  4. Click Next. The real-time log delivery feature is disabled for the domain name.

Disable real-time log delivery for all domain names in a delivery project

After you delete a delivery project, real-time logs of all domain names that are bound to the delivery project are no longer delivered to Simple Log Service. Perform the following steps:

  1. In the list of delivery projects, select the delivery project that you want to delete and click Delete.

  2. Click OK.