Ingest Tencent Cloud log data

更新时间:
复制 MD 格式

In multi-cloud environments, security logs scattered across providers make unified threat detection harder. Security Center's Agentic SOC and cloud firewall — an AI-driven security operations platform — centralizes log import and analysis across cloud environments. This document covers how to import WAF alert logs from Tencent Cloud into Agentic SOC for unified threat detection.

How it works

Tencent Cloud logs flow into Security Center through four stages:

  1. Aggregate logs in CLS. Logs from Tencent Cloud products, such as Web Application Firewall (WAF), are consolidated into Tencent Cloud Log Service (CLS).

  2. Export to an intermediary. CLS exports logs to TDMQ for CKafka or Cloud Object Storage (COS), which acts as a staging layer for cross-cloud transfer.

  3. Pull into Agentic SOC. Agentic SOC subscribes to and pulls log data from the message queue or COS using standard Kafka or S3 protocols, then sends it to a specified data source.

  4. Ingest and normalize. Create an Ingestion Policy (a configuration that defines how logs are collected and routed) in Agentic SOC and apply a Standardization Rule (a parsing rule that normalizes raw logs into a unified schema). The policy and rule parse and normalize the raw logs before storing them in the data warehouse.

imageimage

Supported logs

This solution supports importing only the Web Application Firewall (WAF) alert log from Tencent Cloud.

Ship logs to CLS

Consolidate WAF logs into Tencent Cloud Log Service (CLS) before configuring the import.

Web Application Firewall

For detailed instructions, see the official Tencent Cloud documentation: .
  1. Authorize and enable log service. Log in to the WAF console. Go to Access Log > Log shipping or Attack Log > Log shipping. Click Configure and follow the prompts to complete authorization. After authorization, click Tencent Cloud - API key managementCreate on the LogShipping page.

    Important

    After authorization, the system automatically creates a Logset named waf_post_logset.

  2. Web Application Firewall consoleWeb Application Firewall consoleEnable log shipping. Enable log delivery for the logs you want to collect. For more information, see Enabling Log Shipping.

    • Enable Attack Log Shipping: In the WAF console, choose Instance Management in the left navigation pane. On the instance details page, turn on Attack log shipping.

    • Enable Access Log Shipping:

      1. In the WAF console, choose Connection Management > Domain names. In the Actions column for the domain, click More > Log shipping.

      2. In the advanced settings window, select a delivery target and click Save.

Cloud Firewall

Note

For detailed instructions, see the official Tencent Cloud documentation: Cloud Firewall - Log Shipping.

  1. Create a sub-account with permissions

    Note

    Alternatively, you can use an API key from your main account in API Key Management.

    1. We recommend that you create a dedicated API account for the firewall log shipping task on the Access Management - User List page and grant it full read/write permissions for CLS: QcloudCLSFullAccess.

    2. On the API Key tab of the User Details page, click Create Key, and securely store the generated SecretId and SecretKey (click Download CSV File or copy and save them to a local file). For more information, see Sub-account Access Key Management.

  2. Configure log shipping to CLS

    1. In the Cloud Firewall console, navigate to the Log Analysis page. In the Log Shipping section, select the Ship to CLS tab.

    2. In the Configure CLS Delivery section, enter the sub-account key (SecurityID and SecurityKey) that you created in the previous step for authentication.

    3. Turn on the shipping switch for the desired logs, such as attack logs or access control logs.

      Important

      After you enable shipping, you can view the corresponding CLS log topic information in the Log Topic ID/Name column.

Choose an import method

Agentic SOC imports CLS logs using standard protocols rather than Tencent Cloud-specific APIs. This means you select a protocol vendor — Apache for Kafka or AWS-S3 for object storage — rather than "Tencent Cloud" when granting permissions. (The Tencent Cloud authorization option is used only for threat detection rule linkage, such as IP blocking — not for log import.)

Choose the method based on your real-time requirements and cost priorities:

Kafka protocol consumptionCOS
Real-time performanceNear real-timeMinute-level latency
Configuration complexityLowLow
Tencent Cloud costsLog Service feesCOS storage fees
Alibaba Cloud costsAgentic SOC log ingestion traffic feesAgentic SOC log ingestion traffic fees
Best forStream-based security computing, rapid alert responseCost-effective archival, batch offline analysis

Import data using Kafka protocol consumption

Step 1: Configure Kafka on the Tencent Cloud side

Enable Kafka protocol consumption in CLS

For detailed instructions, see the official Tencent Cloud documentation: Consume Logs over Kafka.
  1. Go to the Tencent Cloud Log TopicTencent Cloud - User listTencent Cloud - Policies page and select the log storage Region in the upper-left corner.

  2. Click the target Log Topic to open its details page.

  3. In the left navigation pane, click Consumption over Kafka. On the Basic Information tab, click Edit, then turn on Current Status. Configure the settings: Click OK.

    SettingValue
    Timestamp rangeHistory + Latest
    Consumer data formatJSON (select Disable Escape) or Raw Content
    Data compression formatNo Compression
    Public accessEnabled
    Service logEnabled
  4. After completing the configuration, view the consumer parameters to get the connection details needed for the next steps:

    ParameterDescription
    Public endpointFormat: kafkaconsumer-${region}.cls.tencentcs.com:9096
    topicThe Kafka topic
    usernameSet to ${LogSetID} (the Logset ID)
    passwordSet to ${SecretId}#${SecretKey}

Set up an AccessKey pair

Use either a main account key or a sub-account key with minimum required permissions.

Step 2: Configure Kafka log import in Security Center

Grant Security Center access to Kafka

  1. Go to Security Center console - System Configuration - Feature Settings. In the upper-left corner, select the region where your assets are located: Chinese Mainland or Outside Chinese Mainland.

  2. On the Multi-cloud Configuration Management tab, select Multi-cloud Assets, then click Grant Permission. In the panel, configure:

    ParameterValue
    VendorApache
    Connection typeKafka
    EndpointPublic access address from Tencent Cloud CLS
    UsernameKafka username from Tencent Cloud CLS
    PasswordSecretId#SecretKey (concatenated from Set up an AccessKey pair)
    Communication protocolsasl_plaintext
    SASL authentication mechanismplain
  3. Under Configure synchronization policy, set the AK Service Status Check interval — the frequency at which Security Center verifies the Tencent Cloud AccessKey pair. Select Disable to turn off this check.

Create a data import task

  1. Create a data source (skip if you already have one for Tencent Cloud logs).

    1. Go to . Select the region: Chinese Mainland or Outside Chinese Mainland.

    2. On the Data Source tab, create a data source to receive logs from Tencent Cloud. For instructions, see Set up data sources.

      • Source data source type: Select User Log Service or Agentic SOC Dedicated Collection Channel.

      • Add instances: Create a new Logstore to isolate Tencent Cloud log data.

  2. On the Data Import tab, click Add Data. Configure:

    ParameterValue
    EndpointPublic access address for Kafka protocol consumption from Tencent Cloud
    TopicsConsumer topic from Tencent Cloud
    Value typejson (if Consumer Data Format is JSON) or text (if Raw Content)
    Data source nameThe data source created in step 1
    Target LogstoreAuto-fetched from the selected data source
  3. Click OK. Security Center begins pulling logs from Tencent Cloud automatically.

Import data using COS

Step 1: Prepare COS on the Tencent Cloud side

Create a CLS-to-COS shipping task

For detailed instructions, see the official Tencent Cloud documentation: Create a Shipping Task to COS.
  1. Go to the Tencent Cloud - log topic page and select the log storage Region.

  2. Click the target Log Topic to open its details page.

    • Web Application Firewall: Typically found under the waf_post_logset Logset. For details, see Ship logs to CLS.

  3. In the left navigation pane, select Shipping to COS, then click Add Shipping Configuration. Configure the shipping task:

    If a confirmation page for log archival appears, click Still Ship To COS to proceed.
    • Basic configuration:

      SettingValue
      Time rangeNo end time (required for ongoing data analysis)
      File sizeTrigger value for log delivery. When accumulated log size reaches this value, logs are delivered to COS.
      Shipping intervalTime interval for delivery. Logs from each interval are compressed and sent to COS.
      Important

      Important: File size and shipping interval use a logical OR relationship — delivery triggers when either condition is met.

    • Bucket configuration:

      SettingValue
      COS bucket and Cloud FirewallSelect or create a bucket to store WAF and Cloud Firewall (CFW) logs
      File namingDelivery time naming (recommended for easy data identification)
      File compressiongzip or No Compression
      COS storage classStandard. See Storage Class Overview.
      Warning

      Warning: Security Center does not support lzop or snappy compression.

    • Advanced configuration:

      SettingValue
      Consumer data formatJSON
      JSONDisable Escape
  4. Get the COS bucket endpoint. Go to the Tencent Cloud Bucket List page and open the bucket you configured. Copy the domain name from the Domain Information section.

    Important

    The endpoint must not include the bucket name. The format is cos.${region}.myqcloud.com.

    image

Set up an AccessKey pair

Use either a main account key or a sub-account key with minimum required permissions.

  • Main account key: Go to Tencent Cloud API Key Management and click Create Key. Save the generated SecretId and SecretKey. For more information, see .

    You can use either an API key or a project key.
  • Sub-account key:

    1. On the page, create a policy with minimum required permissions. For more information, see Authorization for Shipping to COS and Create custom policy by policy syntaxCreate custom policy by policy syntax.

      {
          "version": "2.0",
          "statement": [
              {
                  "effect": "allow",
                  "action": [
                      "cls:DescribeTopics",
                      "cls:DescribeLogsets",
                      "cls:DescribeIndex",
                      "cls:CreateShipper"
                  ],
                  "resource": "*"
              },
              {
                  "effect": "allow",
                  "action": [
                      "tag:DescribeResourceTagsByResourceIds",
                      "tag:DescribeTagKeys",
                      "tag:DescribeTagValues",
                      "cls:ModifyShipper",
                      "cls:DescribeShippers",
                      "cls:DeleteShipper",
                      "cls:DescribeShipperTasks",
                      "cls:RetryShipperTask",
                      "cls:DescribeShipperPreview",
                      "cos:GetService",
                      "cam:ListAttachedRolePolicies",
                      "cam:AttachRolePolicy",
                      "cam:CreateRole",
                      "cam:DescribeRoleList"
                  ],
                  "resource": "*"
              }
          ]
      }
    2. Go to the page and select an existing sub-account or create a new one.

      • Attach the policy you created.

      • On the User Details page, go to the API Key tab and click Create Key. Save the generated SecretId and SecretKey. For more information, see Managing sub-account access keys.

Step 2: Configure COS log import in Security Center

Grant Security Center access to COS

  1. Go to . Select the region: Chinese Mainland or Outside Chinese Mainland.

  2. On the Multi-cloud Configuration Management tab, select Multi-cloud Assets, click Grant Permission, then select IDC from the dropdown. In the panel, configure:

    ParameterValue
    VendorAWS-S3
    Connection typeS3
    EndpointCOS bucket access domain name (from Create a CLS-to-COS shipping task)
    Access Key IDSecretId from Set up an AccessKey pair
    Secret Access KeySecretKey from Set up an AccessKey pair
  3. Under Configure synchronization policy, set the AK Service Status Check interval. Select Disable to turn off this check.

Create a data import task

  1. Go to Security Center console > Agentic SOC > Integration Center. Select the region: Chinese Mainland or Outside Chinese Mainland.

  2. On the Data Import tab, click Add Data. Configure:

    ParameterValue
    EndpointCOS bucket access domain name
    BucketCOS bucket name
    Data source nameA custom data source with normal status (Custom Log Capability or Agentic SOC Dedicated Data Collection Channel). If none exists, see Set up data sources.
    Target LogstoreAuto-fetched from the selected data source
  3. Click OK. Security Center begins pulling logs from Tencent Cloud automatically.

Analyze imported data

After logs arrive in Simple Log Service (SLS), configure ingestion and detection rules to enable analysis in Agentic SOC.

  1. Create an ingestion policy. Follow Add a product to Agentic SOC 2.0 to create an ingestion policy with:

    • Data Source: The target data source configured in the data import task.

    • Standardization Rule: Agentic SOC provides built-in standardization rules for Tencent Cloud logs. To create custom rules, see Standardized log access rules.

    • Standardization Method: Defaults to Real-time Consumption and cannot be changed.

    image

  2. Configure threat detection rules. Enable or create log detection rules in rule management based on your security needs. The system analyzes logs, generates alerts, and creates security events. For instructions, see Configure threat detection rules.

Billing

This solution involves fees from both Tencent Cloud and Alibaba Cloud. Review the billing documentation for each service before implementation.

Tencent Cloud:

ServiceFee itemsBilling documentation
CLSLog storage, read/write operationsTencent Cloud Log Service billing overview
COSStorage capacity, requests, public network trafficTencent Cloud COS billing overview

Alibaba Cloud:

Costs depend on the data source type selected during setup.

For Agentic SOC billing, see Agentic SOC Subscription and Agentic SOC Pay-As-You-Go. For Simple Log Service (SLS) billing, see SLS billing overview.
Data source typeAgentic SOC fee itemsSLS fee itemsDetails
Agentic SOC Dedicated Collection ChannelLog ingestion fees + log storage and write fees (both consume Log Ingestion Traffic)Fees other than storage and writes (such as public network traffic)Agentic SOC creates and manages the SLS resources, so Agentic SOC is billed for Logstore storage and write operations.
User Log ServiceLog ingestion fees (Log Ingestion Traffic)All log-related fees (storage, writes, public network traffic)Log resources are fully managed by SLS, so all log-related fees are billed by SLS.

FAQ

No log data appears in SLS after creating the import task.

Work through these checks in order:

  1. Check Tencent Cloud: Log in to the Tencent Cloud console and confirm that logs have been generated and delivered to your CLS, Kafka topic, or COS bucket.

  2. Check authorization credentials: In Security Center, on the Multi-cloud Assets page, verify the authorization status. Confirm the AccessKey pair is valid and the password uses the correct SecretId#SecretKey concatenated format for Tencent Cloud Kafka.

  3. Check network connectivity: If using Kafka, confirm that public access is enabled for the Kafka service in Tencent Cloud and that your security group or firewall rules allow access from Security Center's service IPs.

  4. Check the import task: In Security Center, on the Data Import page, review the task status and error logs, then make corrections based on the reported information.

Why select Apache or AWS-S3 instead of Tencent Cloud when granting permissions?

Log import uses standard, protocol-based connections rather than vendor-specific APIs:

  • Apache represents the Kafka protocol; AWS-S3 represents the S3 object storage protocol.

  • The Tencent Cloud authorization option is used only to integrate Agentic SOC threat detection rules with Tencent Cloud for security event linkage (such as blocking IPs). It cannot be used for log import.