


Configuration Item | Description | Rule | Required |
Target CKafka Topic Ownership | Ship CLS logs to the CKafka topic of the current root account. Ship CLS logs to the CKafka of other root accounts. For example, if account A wants to ship logs in CLS to the CKafka topic of account B, account B needs to configure an access role on Cloud Access Management (CAM). After the configuration is completed, account A enters the role ARN and external ID in the CLS console before the logs can be shipped across accounts. The steps to configure the role are as follows: 1. Create a role. Account B logs in to CAM and goes to the Role Management page. 1.1 Create an access policy, such as cross_shipper. The policy syntax is as follows: Note: The authorization in the example follows the principle of least privilege, with the resource configured to be shipped only to the CKafka instance ckafka-12abcde3 in the Guangzhou region. Configure the authorization according to your actual needs.
1.2 Create a role, set the role carrier to Tencent Cloud Account, set the cloud account type to Other Root Accounts, enter the ID of account A, such as 100012345678, select Enable Validation, and configure an external ID, such as Hello123. 1.3 Configure a role policy, configure an access policy for the role, and select the access policy cross_shipper (example) configured in the first step. 1.4 Save the role, such as uinA_writeCLS_to_CKafka. 2. Configure a carrier for the role. Locate uinA_writeCLS_to_CKafka (example) in the CAM role list, click the role, choose Role Carrier > Manage Carrier > Add Product Service > CLS below, and then click Update. You can see that the current role has two carriers: account A and cls.cloud.tencent.com (CLS). 3. Account A logs in to CLS and enters a role ARN and external ID. The two pieces of information need to be provided by account B: Account B locates the role uinA_writeCLS_to_CKafka (example) in the CAM role list and clicks it to view its RoleArn, such as qcs::cam::uin/100001112345:roleName/uinA_writeCLS_to_CKafka. The external ID, such as Hello123, can be seen in the role carrier. Note: When entering a role ARN and external ID, ensure that no additional spaces are included, as this may cause permission verification to fail. Cross-account shipping will incur read traffic fees for a log topic under account A. | Current root account/Other root accounts. | No |
CKafka instance | The CKafka topic in the same region as the current log topic serves as the shipping target. In cross-account shipping scenarios, users need to manually enter the CKafka instance ID and topic name. | Select from the list. | Required |
Format of Data to Ship | The option Original content indicates shipping the user's raw logs. | Select from the list. | Required |
Data compression format | No compression: Snappy and LZ4. | Select from the list. | Required |
Shipping log preview | Preview the log data to be shipped. | - | - |
Configuration Item | Description | Rule | Required |
CKafka instance | The CKafka topic in the same region as the current log topic serves as the shipping target. | Select from the list. | Required |
Format of Data to Ship | The option JSON indicates shipping logs in JSON format. | Select from the list. | Required |
Escaped/Unescaped in JSON format | Escaped: Convert the value of first-level JSON nodes to a string. You can select this option if the value of your first-level nodes is struct and needs to be converted to a string before downstream storage or computation. Example: Original log: {"a":"aa", "b":{"b1":"b1b1", "c1":"c1c1"}} Ship to CKafka: {"a":"aa","b":"{\\"b1\\":\\"b1b1\\", \\"c1\\":\\"c1c1\\"}"} Do not escape: Make no modifications to your JSON structure and hierarchy. The log format remains consistent with the collection side. Example: Original log: {"a":"aa", "b":{"b1":"b1b1", "c1":"c1c1"}} Ship to CKafka: {"a":"aa", "b":{"b1":"b1b1", "c1":"c1c1"}} Note: When a first-level JSON node contains numerical values, they will be automatically converted to int or float after shipping. Original log: {"a":123, "b":"123", "c":"-123", "d":"123.45", "e":{"e1":123,"f1":"123"}} Ship to CKafka: {"a":123,"b":123,"c":-123,"d":123.45,"e":{"e1":123,"f1":"123"}} | Select from the list. | Required |
__TAG__metadata | Flatten or do not flatten __TAG__metadata according to your actual business scenarios. Example: __TAG__metadata: {"__TAG__":{"fieldA":200, "fieldB":"text"}} Flattened: {"__TAG__.fieldA":200,"__TAG__.fieldB":"text"} Not flattened: {"__TAG__":{"fieldA":200, "fieldB":"text"}} | | |
Data compression format | Snappy and LZ4 are supported. | Select from the list. | Required |
Shipping log preview | Preview the log data to be shipped. | - | - |
Feedback