Push to Tencent Cloud CLS
EdgeOne Real-time Log Delivery supports pushing logs to Tencent Cloud Log Service (CLS). You can configure it through the console or API. For more information about CLS, refer to CLS Product Documentation.
Prerequisites
1. Log in to the Tencent Cloud CLS console and activate CLS.
2. If you wish to use a sub-account for CLS-related operations, refer to CLS Permission Management Guide, to complete sub-account authorization and ensure that the sub-account has related read and write permissions for CLS log sets and log topics.
Note:
You must authorize EdgeOne to access your log sets and log topics through the service role
TEO_QCSLinkedRoleInRealTimeLogCLS. EdgeOne will use the service role to query log sets and log topics, modify index configurations, and push logs.Configuration Guide
1. Log in to the Tencent Cloud EdgeOne console, enter Service Dashboard in the left menu bar, and click the site to be configured under Website Security Acceleration.
2. On the site details page, click Log Service > Real-time Logs.
3. On the real-time logs page, click Create delivery task.
4. On the Select Log Source page, enter the task name, select the log type and service area, and click Next.
5. On the Select Destination page, select Tencent Cloud CLS and click Next.
6. On the Define Log Content page:
(Required) Select the domain name/layer-4 proxy instance/edge function instance for which logs need to be pushed;
(Required) Check the log fields to be pushed from the predefined field list.
(Optional) Add custom log fields, which support custom log field names and custom log field values using expressions.
(Optional) Configure the filter conditions. By default, all logs are pushed.
(Optional) In advanced settings, set the sampling ratio. By default, sampling is not enabled and 100% of logs are pushed to the destination.
(Optional) In advanced settings, set the log output format. The default format is JSON Lines.
Note:
When data is pushed to CLS, only the JSON Lines format is supported.
Click Next.
7. On the destination information page, select the region, log set, and log topic for the destination log set.
Note:
Due to write permission restrictions on CLS log topics imposed by other cloud products such as SCF, you cannot select the SCF default log topic or default log topics of other cloud products when configuring the destination for EO real-time log shipping. This prevents log shipping failures or log search unavailability.
8. Click Ship.
9. In the pop-up window, select the index configuration method. It is recommended to click Quick Index Configuration. EdgeOne will create a key-value index for the previously selected log topic. You can also configure the index yourself in the CLS Console. Note that if Key-Value Index is not enabled, you will be unable to search logs.
Note:
When the log volume is too large and the automatic splitting feature of the CLS log topic is disabled, or when the partition value has reached its upper limit, CLS will limit the frequency of log push requests, which may cause log data loss. To avoid this issue, see CLS Log Topic Partition Splitting for relevant configuration.