Feature Introduction
The log shipping feature delivers log data to CLS and CKafka, helping you unlock the value of log data and meet log Ops requirements. Log shipping supports all access log fields collected by the current WAF engine. You can enable near real-time delivery of access log data with simple configuration in the WAF console.
Note:
If any exceptions occur during log shipping , please Contact Us for assistance. After you complete the configuration for delivering logs to CLS or CKafka, refer to the operations for enabling log shipping to enable access log delivery.
Using the log shipping feature and using the log service feature do not conflict. Whether the log service is enabled or not, you can enable and use the log shipping feature (it is recommended to enable it based on business needs).
Log Shipping to CLS
To deliver logs to CLS, you need to activate CLS in advance and authorize WAF.
Note:
If you have activated CLS, you can directly go to the authorization guide page in Step 3. 1. Log in to the WAF console. In the left sidebar, choose Access Logs > Log Shipping. 2. If you have not activated CLS, click Activate Now to go to the CLS activation page. For details, see CLS documentation. 3. Authorize WAF to deliver data to CLS.
3.1 In the Ship to CLS module on the log shipping page, click Configure Now to trigger the authorization pop-up.
3.2 Click Go to Authorize to go to the CAM authorization page.
3.3 On the CAM authorization page, click Agree to Authorize to allow WAF to ship log data to CLS. If you encounter issues during authorization, see CAM documentation. 3.4 After clicking Agree to Authorize, you can return to the log shipping page and click Advanced Configuration. In the CLS shipping configuration pop-up, select the shipping region and log topic name, configure log fields as needed, and click OK to complete the configuration. Alternatively, click Create to automatically create the WAF logset waf_post_logset and ship WAF logs to this log topic. For details, see CLS console. Attention:
The Request Body and Response Body may contain sensitive data. Selecting this option authorizes the WAF account to record and store the corresponding fields. These fields can be large, so ensure that the CLS capacity is sufficient.
Log field settings can be configured for all domain names or a single domain name. When policies are configured for all domain names and a single domain name at the same time, the policy configured for the single domain name takes precedence.
4. After shipping logs to CLS, you can enable log shipping for the desired domain names. For details, see Enabling Log Shipping. Note:
If the authorization status is abnormal, you can submit a ticket to contact us for handling the exception. Shipping Logs to CKafka
Prerequisites
You have purchased a Tencent Cloud CKafka instance and configured its bandwidth specifications based on actual log usage. Operation Step
1. Log in to the WAF console. In the left sidebar, choose Access Logs > Log Shipping. 2. Authorize WAF to ship data to the CKafka instance.
2.1 In the Ship to CKafka module on the log shipping page, click Configure Now to trigger the authorization pop-up window.
2.2 Click Go to Authorize to go to the CAM authorization page.
2.3 On the CAM authorization page, click Grant Authorization to allow WAF to ship log data to CKafka. If you encounter any issues during authorization, see the CAM documentation. 2.4 After clicking Grant Authorization, you can go back to the log shipping page and click Configure to trigger the pop-up window for CKafka shipping configuration.
3. In the CKafka shipping configuration dialog, configure the relevant parameters and click Create to complete the configuration.
Supported Environment: You can select this access method on the condition that you have purchased a Tencent Cloud product that can be used in conjunction with CKafka. Select a Kafka instance, IP address, and port.
|
Region | | When the supporting environment is connected to CKafka, you need to submit a ticket and ask the CKafka message queue assistant to add it to the allowlist before it can be used. |
Message Queue Instance | Running CKafka instances in the current region. |
|
Topic ID/Name | Corresponding topic ID information. |
|
Supported environment | IP address and port of the supporting environment, for example, 11.186.191.154:6069. |
|
Log field settings | Select log fields to deliver as needed. Attention: The Request Body and Response Body may contain sensitive data. Selecting this option authorizes the WAF account to record and store the corresponding fields. These fields can be large, so ensure that the CLS capacity is sufficient. Log field settings can be configured for all domain names or a single domain name. When policies are configured for all domain names and a single domain name at the same time, the policy configured for the single domain name takes precedence. |
|
Public Domain Name Access: Select Public Domain Name Access, select a message queue instance and public domain name, and enter a username and password for the selected message queue instance.
|
Region | |
Message Queue Instance | Running CKafka instances in the current region. |
Topic ID/Name | Corresponding topic ID information. |
Public Domain Name Access | Public domain name for accessing the environment. |
Username | SASL username. |
Password | SASL password. |
Log field settings | Select log fields to deliver as needed. Attention: The Request Body and Response Body may contain sensitive data. Selecting this option authorizes the WAF account to record and store the corresponding fields. These fields can be large, so ensure that the CLS capacity is sufficient. Log field settings can be configured for all domain names or a single domain name. When policies are configured for all domain names and a single domain name at the same time, the policy configured for the single domain name takes precedence. |
4. After you ship logs to CKafka, you can enable the log shipping feature for the required domain names. For details, see Enabling Log Shipping. Enabling Log Shipping
Note:
Access logs are shipped at the domain name level. Instances of all editions support enabling access log shipping.
Enabling Access Log Shipping
1. Log in to the WAF console. In the left sidebar, choose Connection Management > Domain Onboarding. 2. On the domain name access page, select the required domain name, and choose More > Access Log Shipping.
3. In the Advanced Settings window, select the shipping targets and click Save to enable access log shipping for the current domain name.