---
title: "Tencent Cloud Collector"
canonical: "https://docs.devo.com/space/latest/1024262378/Tencent%20Cloud%20Collector"
format: markdown
---
> Macro (toc)

> ℹ️ Refer to the [Vendor setup ](#vendorsetup)section to know more about these configurations.

## Overview

-

## Devo collector features

| **Feature** | **Details** |
| --- | --- |
| Allow parallel downloading (`multipod`) | - `not allowed` |
| Running environments | - `collector server` |
| Populated Devo events | - `table` |
| Flattening preprocessing | - `no` |

## Data sources

| **Data source** | **Description** | **Collector service name** | **Devo table** | **Available from release** |
| --- | --- | --- | --- | --- |
| logs_search | Returns all the tencent logs. | logs_search | cls.tencent.log.event | v1.0.0 |

## Flattening preprocessing

| **Data source** | **Collector service** | **Optional** | **Flattening details** |
| --- | --- | --- | --- |
| logs_search | logs_search | yes | not required |

## Vendor setup

-

## Minimum configuration required for basic pulling

Although this collector supports advanced configuration, the fields required to retrieve data with basic configuration are defined below.

> ℹ️ This minimum configuration refers exclusively to those specific parameters of this integration. There are more required parameters related to the generic behavior of the collector. Check setting sections for details.

| **Setting** | **Details** |
| --- | --- |
| secret_id | The secret id for authentication. |
| secret_key | The secret key for authentication. |

> ℹ️ See the **Accepted authentication methods** section to verify what settings are required based on the desired authentication method.

## Accepted authentication methods

| **Authentication method** | **secret_id** | **secret_key** |
| --- | --- | --- |
| API Key authentication | REQUIRED | REQUIRED |

 

## Run the collector

Once the data source is configured, you can either send us the required information if you want us to host and manage the collector for you (<u>Cloud collector</u>), or deploy and host the collector in your own machine using a Docker image (<u>On-premise collector</u>).

> Macro (rw-ui-tabs-macro)
> 
> > Macro (rw-tab)
> 
> We use a piece of software called Collector Server to host and manage all our available collectors. If you want us to host this collector for you, [get in touch with us](https://devo.my.site.com/support/login?ec=302&startURL=%2Fsupport%2Fs%2F) and we will guide you through the configuration.
> 
> #### Editing JSON Config
> 
> config.json
> 
> ```
> {
>   "global_overrides": {
>     "debug": false
>   },
>   "inputs": {
>     "tencent_cloud": {
>       "id": "<short_unique_id>",
>       "enabled": true,
>       "credentials": {
>         "secret_id": "<secret_id_value>",
>         "secret_key": "<secret_key_value>",
>         "endpoint": "<endpoint_value>",
>         "region": "<region_value>"
>       },
>       "services": {
>         "logs_search": {
>           "initial_start_time_in_utc": "<initial_start_time_in_utc_value>",
>           "topic_ids": "<topics_array>",
>           "logset_id": "<logset_id_value>"
>         }
>       }
>     }
>   }
> }
> ```
> 
> The following table outlines the parameters available for configuring the collector. Each parameter is categorized by its necessity (mandatory or optional), data type, acceptable values or formats, and a brief description.
> 
> | **Parameter** | **Data type** | **Type** | **Value range / Format** | **Details** |
> | --- | --- | --- | --- | --- |
> | <short_unique_id> | int | Mandatory | Minimum Length 5 | Use this param to give a unique id to this input service.<br>This parameter is used to build the persistence address, do not use the same value for multiple collectors. It could cause a collision. |
> |  |  |  |  |  |
> | <secret_id_value> | str | Mandatory | Minimum Length 1 | secret id for Tencent Cloud |
> | <secret_key_value> | str | Mandatory | Minimum Length 1 | secret key for Tencent Cloud |
> | <endpoint_value> | str | Mandatory | Minimum Length 1 | endpoint for tencent cloud |
> | <region_value> | str | Mandatory | Minimum Length 1 | region for tencent cloud |
> | <initial_start_time_in_utc_value> | str | Mandatory | UTC format/ `Not more than 30 days old` from current date | Start date to pull data from the date specified |
> | <topics_array> | array | Mandatory | Minimum Length 1 | Array containing topics ids to be fetched |
> | <logset_id_value> | str | Mandatory | Minimum Length 1 | logset id to be fetched |
> 
> > Macro (rw-tab)
> 
> This data collector can be run in any machine that has the Docker service available because it should be executed as a docker container. The following sections explain how to prepare all the required setup for having the data collector running.
> 
> ### Structure
> 
> The following directory structure should be created for being used when running the collector:
> 
> ```
> <any_directory>
> └── devo-collectors/
>     └── <product_name>/
>         ├── certs/
>         │   ├── chain.crt
>         │   ├── <your_domain>.key
>         │   └── <your_domain>.crt
>         ├── state/
>         └── config/ 
>             └── config.yaml 
> ```
> 
> > ⚠️ Replace `<product_name>` with the proper value.
> 
> ### Devo credentials
> 
> In Devo, go to **Administration → Credentials → X.509 Certificates**, download the **Certificate**, **Private key** and **Chain CA** and save them in `<product_name>/certs/`. Learn more about security credentials in Devo [here](#).
> 
> ![image](media://4a771a6c-9e3f-40a6-9d56-a2d3cbf17a91)
> 
> > ⚠️ Replace `<product_name>` with the proper value.
> 
> ### Editing the config.yaml file
> 
> ```
> globals:
>   debug: false
>   id: not_used
>   name: tencent_cloud_collector
>   persistence:
>     type: filesystem
>     config:
>       directory_name: state
> outputs:
>   devo_1:
>     type: devo_platform
>     config:
>       address: <your-ingestion-endpoint>
>       port: 443
>       type: SSL
>       chain: chain.crt
>       cert: <your_domain>.crt
>       key: <your_domain>.key
> inputs:
>   tencent_cloud:
>   id: <short_unique_id>
>   enabled: true
>   credentials:
>     secret_id: <secret_id_value>
>     secret_key: <secret_key_value>
>     endpoint: <endpoint_value>
>     region: <region_value>
>   services:
>     logs_search:
>       initial_start_time_in_utc: <initial_start_time_in_utc_value>
>       topic_ids: <topics_array>
>       logset_id: <logset_id_value>
> ```
> 
> > ℹ️ All defined service entities will be executed by the collector. If you do not want to run any of them, just remove the entity from the `services` object.
> 
> Replace the placeholders with your required values following the description table below:
> 
> | **Parameter** | **Data type** | **Type** | **Value range / Format** | **Details** |
> | --- | --- | --- | --- | --- |
> | <short_unique_id> | int | Mandatory | Minimum Length 5 | Use this param to give a unique id to this input service.<br>This parameter is used to build the persistence address, do not use the same value for multiple collectors. It could cause a collision. |
> |  |  |  |  |  |
> | <secret_id_value> | str | Mandatory | Minimum Length 1 | secret id for Tencent Cloud |
> | <secret_key_value> | str | Mandatory | Minimum Length 1 | secret key for Tencent Cloud |
> | <endpoint_value> | str | Mandatory | Minimum Length 1 | endpoint for tencent cloud |
> | <region_value> | str | Mandatory | Minimum Length 1 | region for tencent cloud |
> | <initial_start_time_in_utc_value> | str | Mandatory | UTC format/ `Not more than 30 days old` from current date | Start date to pull data from the date specified |
> | <topics_array> | array | Mandatory | Minimum Length 1 | Array containing topics ids to be fetched |
> | <logset_id_value> | str | Mandatory | Minimum Length 1 | logset id to be fetched |
> 
>  
> 
> ### Download the Docker image
> 
> The collector should be deployed as a Docker container. Download the Docker image of the collector as a .tgz file by clicking the link in the following table:
> 
> | **Collector Docker image** | **SHA-256 hash** |
> | --- | --- |
> | [collector-tencent_cloud_if-docker-image-1.1.0.tgz](https://drive.google.com/file/d/1rw0jKRDqDPRbYddtjMSLU4c3ybbgzNv7/view?usp=drive_link) | f06fd620d6734726bbca9c2c29e718c100c660206b80d9b25e7e239d24dd4cfa |
> 
> Use the following command to add the Docker image to the system:
> 
> ```
> gunzip -c <image_file>-<version>.tgz | docker load
> ```
> 
> > ⚠️ Once the Docker image is imported, it will show the real name of the Docker image (including version info). Replace `<image_file>` and `<version>` with a proper value.
> 
> The Docker image can be deployed on the following services:
> 
> #### Docker
> 
> Execute the following command on the root directory `<any_directory>/devo-collectors/<product_name>/`
> 
> ```
> docker run 
> --name collector-<product_name> 
> --volume $PWD/certs:/devo-collector/certs 
> --volume $PWD/config:/devo-collector/config 
> --volume $PWD/state:/devo-collector/state 
> --env CONFIG_FILE=config.yaml 
> --rm 
> --interactive 
> --tty 
> <image_name>:<version>
> ```
> 
> > ⚠️ Replace `<product_name>`, `<image_name>` and `<version>` with the proper values.
> 
> #### Docker Compose
> 
> The following Docker Compose file can be used to execute the Docker container. It must be created in the `<any_directory>/devo-collectors/<product_name>/` directory.
> 
> ```
> version: '3'
> services:
>   collector-<product_name>:
>     image: <image_name>:${IMAGE_VERSION:-latest}
>     container_name: collector-<product_name>
>     volumes:
>       - ./certs:/devo-collector/certs
>       - ./config:/devo-collector/config
>       - ./credentials:/devo-collector/credentials
>       - ./state:/devo-collector/state
>     environment:
>       - CONFIG_FILE=${CONFIG_FILE:-config.yaml}
> ```
> 
> To run the container using docker-compose, execute the following command from the `<any_directory>/devo-collectors/<product_name>/` directory:
> 
> ```
> IMAGE_VERSION=<version> docker-compose up -d
> ```
> 
> > ⚠️ Replace `<product_name>`, `<image_name>` and `<version>` with the proper values.

## Collector services detail

This section is intended to explain how to proceed with specific actions for services.

### logs_search service

<details>
<summary>Verify data collection</summary>

Once the collector has been launched, it is important to check if the ingestion is performed in a proper way. To do so, go to the collector’s logs console.

This service has the following components:

| **Component** | **Description** |
| --- | --- |
| Setup | The setup module is in charge of authenticating the service and managing the token expiration when needed. |
| Puller | The setup module is in charge of pulling the data in a organized way and delivering the events via SDK. |

#### Setup output

A successful run has the following output messages for the setup module:

```
2024-12-20T13:59:29.019    INFO OutputProcess::MainThread -> ConsoleSenderManagerMonitor(internal_senders,console_1) -> Starting thread (every 300 seconds)
2024-12-20T13:59:29.020    INFO OutputProcess::DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-12-20T13:59:29.020    INFO OutputProcess::DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.01
2024-12-20T13:59:29.020    INFO OutputProcess::MainThread -> ConsoleSenderManager(internal_senders,manager,console_1) -> Starting thread
2024-12-20T13:59:29.021    INFO OutputProcess::ConsoleSenderManager(internal_senders,manager,console_1) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2024-12-20T13:59:29.022    INFO OutputProcess::ConsoleSenderManager(lookup_senders,manager,console_1) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-12-20T13:59:29.022    INFO OutputProcess::ConsoleSenderManager(lookup_senders,manager,console_1) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.01
2024-12-20T13:59:29.022    INFO OutputProcess::OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2024-12-20T13:59:29.022    INFO OutputProcess::OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-12-20T13:59:29.022    INFO OutputProcess::OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.01
2024-12-20T13:59:29.023    INFO OutputProcess::MainThread -> OutputMetricsThread -> Started thread for updating metrics values (update_period=10.0)
2024-12-20T13:59:29.025    INFO OutputProcess::OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-12-20T13:59:29.930    INFO OutputProcess::DevoSender(internal_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-12-20T13:59:31.017    INFO InputProcess::TencentCloudPullerSetup(tencent_cloud#84754,logs_search#predefined) -> Setup for module <TencentCloudPuller> has been successfully executed
```

#### Puller output

A successful initial run has the following output messages for the puller module:

> ℹ️ Note that the `PrePull` action is executed only one time before the first run of the `Pull` action.

```
2024-12-16T04:21:51.994    INFO InputProcess::TencentCloudPuller(tencent_cloud#15884,logs_search#predefined) -> Pull Started
2024-12-16T04:21:51.995    INFO InputProcess::TencentCloudPuller(tencent_cloud#15884,logs_search#predefined) -> Pulling data from 2024-12-06 17:30:00
2024-12-16T04:21:54.432    INFO InputProcess::Thread-11 -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-0] consumer worker "396a2d51fdab9cea06bcec6dea82653e-consumer-0" start
2024-12-16T04:21:54.432    INFO InputProcess::Thread-12 -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-0] heart beat start
2024-12-16T04:21:56.497    INFO InputProcess::Thread-12 -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-0] partition reorganize, adding: ['55425710-150f-45c3-8b05-00c0c2b14115[0]'], removing: ['55425710-150f-45c3-8b05-00c0c2b14115[]']
2024-12-16T04:21:56.788    INFO InputProcess::Thread-13 -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-1] consumer worker "396a2d51fdab9cea06bcec6dea82653e-consumer-1" start
2024-12-16T04:21:56.789    INFO InputProcess::Thread-14 -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-1] heart beat start
2024-12-16T04:21:58.807    INFO InputProcess::Thread-14 -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-1] partition reorganize, adding: [], removing: ['55425710-150f-45c3-8b05-00c0c2b14115[]']
2024-12-16T04:22:00.706    INFO InputProcess::Thread-14 -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-1] partition reorganize, adding: [], removing: ['55425710-150f-45c3-8b05-00c0c2b14115[]']
2024-12-16T04:22:03.493    INFO InputProcess::Thread-14 -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-1] partition reorganize, adding: [], removing: ['55425710-150f-45c3-8b05-00c0c2b14115[]']
2024-12-16T04:22:06.692    INFO InputProcess::Thread-14 -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-1] partition reorganize, adding: [], removing: ['55425710-150f-45c3-8b05-00c0c2b14115[]']
2024-12-16T04:22:06.800    INFO InputProcess::TencentCloudPuller(tencent_cloud#15884,logs_search#predefined) -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-0] try to stop heart beat
2024-12-16T04:22:06.800    INFO InputProcess::TencentCloudPuller(tencent_cloud#15884,logs_search#predefined) -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-0] get stop signal, start to stop consumer worker "396a2d51fdab9cea06bcec6dea82653e-consumer-0"
2024-12-16T04:22:06.801    INFO InputProcess::TencentCloudPuller(tencent_cloud#15884,logs_search#predefined) -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-1] try to stop heart beat
2024-12-16T04:22:06.801    INFO InputProcess::TencentCloudPuller(tencent_cloud#15884,logs_search#predefined) -> [c21b76cb-c6fc-4235-930e-3b2ec599e93c/['55425710-150f-45c3-8b05-00c0c2b14115']/396a2d51fdab9cea06bcec6dea82653e/396a2d51fdab9cea06bcec6dea82653e-consumer-1] get stop signal, start to stop consumer worker "396a2d51fdab9cea06bcec6dea82653e-consumer-1"
2024-12-16T04:22:06.955    INFO InputProcess::TencentCloudPuller(tencent_cloud#15884,logs_search#predefined) -> Updating the persistence
2024-12-16T04:22:07.073    INFO InputProcess::TencentCloudPuller(tencent_cloud#15884,logs_search#predefined) -> (Partial) Statistics for this pull cycle (@devo_pulling_id=1734322911982):Number of requests made: 1; Number of events received: 2016; Number of duplicated events filtered out: 0; Number of events generated and sent: 2016; Average of events per second: 133.699.
```

After a successful collector’s execution (that is, no error logs found), you will see the following log message:

```
2024-12-16T04:37:32.272    INFO InputProcess::TencentCloudPuller(tencent_cloud#15884,logs_search#predefined) -> (Partial) Statistics for this pull cycle (@devo_pulling_id=1734322911982):Number of requests made: 85; Number of events received: 149586; Number of duplicated events filtered out: 0; Number of events generated and sent: 149586; Average of events per second: 159.087.
```

> ℹ️ The value `@devo_pulling_id` is injected in each event to group all events ingested by the same pull action. You can use it to get the exact events downloaded in that `Pull` action in Devo’s search window.
</details>

<details>
<summary>Restart the persistence</summary>

This collector uses persistent storage to download events in an orderly fashion and avoid duplicates. In case you want to re-ingest historical data or recreate the persistence, you can restart the persistence of this collector by following these steps:

1. Edit the configuration file.
2. Change the value of the **initial_start_time_in_utc_value** parameter to a different one.
3. Save the changes.
4. Restart the collector.

The collector will detect this change and will restart the persistence using the parameters of the configuration file or the default configuration in case it has not been provided.

> ⚠️ Note that this action clears the persistence and cannot be recovered in any way. Resetting persistence could result in duplicate or lost events.
</details>

<details>
<summary>Troubleshooting</summary>

This collector has different security layers that detect both an invalid configuration and abnormal operation. This table will help you detect and resolve the most common errors.

| Error Type | Error Id | Error Message | Cause | Solution |
| --- | --- | --- | --- | --- |
| InitVariablesError | 1 | initial_start_time_in_utc is not set as per the datetime_format : {datetime_format} | The date in config is not as per required format | Ensure the date format is correct. |
|  |  |  |  |  |
| InitVariablesError | 2 | Date {initial_start_time_str} is in the future | The date in config is greater than current time | Ensure the datetime is less than current time |
| PullError | 300 | Some error :{e} occurred while fetching tencent logs | Tencent API call is failing | Check the credentials and ensure that the collector has the necessary permissions to access the Lark API. |
| PullError | 301 | Some error :{e} occurred while fetching tencent logs | Tencent API call is failing | Contact the developer with exact error message. |
</details>

## Collector operations

This section is intended to explain how to proceed with specific operations of this collector.

<details>
<summary>Verify collector operations</summary>

### Initialization

The initialization module is in charge of setup and running the input (pulling logic) and output (delivering logic) services and validating the given configuration.

A successful run has the following output messages for the initializer module:

```
2024-12-20T14:14:07.335    INFO InputProcess::MainThread -> Process started (pid=32085, ppid=32057, multiprocessing.start_method="fork")
2024-12-20T14:14:07.412    INFO OutputProcess::MainThread -> DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/nikhilgoyal/devo-collector-tencent-cloud/state/not_used/DevoSenderManager;standard_senders;devo_2.json.gz
2024-12-20T14:14:07.414    INFO OutputProcess::MainThread -> DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2024-12-20T14:14:07.414    INFO OutputProcess::MainThread -> DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/nikhilgoyal/devo-collector-tencent-cloud/state/ec09606e0738735b8032365abd62960d"
2024-12-20T14:14:07.418    INFO InputProcess::MainThread -> TencentCloudPuller(tencent_cloud#84754,logs_search#predefined) -> [PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/nikhilgoyal/devo-collector-tencent-cloud/state/not_used/tencent_cloud;84754;logs_search;predefined;TencentCloudPuller.json
2024-12-20T14:14:07.419    INFO OutputProcess::MainThread -> DevoSender(standard_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/nikhilgoyal/devo-collector-tencent-cloud/state/not_used/DevoSender;standard_senders;devo_sender_0.json.gz
2024-12-20T14:14:07.421    INFO InputProcess::MainThread -> TencentCloudPuller(tencent_cloud#84754,logs_search#predefined) -> [PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2024-12-20T14:14:07.421    INFO InputProcess::MainThread -> TencentCloudPuller(tencent_cloud#84754,logs_search#predefined) -> [PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 2), filename_path: "/home/nikhilgoyal/devo-collector-tencent-cloud/state/38dd5ef18d7c4af3fbb1a8f695eb533d"
2024-12-20T14:14:07.421    INFO InputProcess::MainThread -> TencentCloudPuller(tencent_cloud#84754,logs_search#predefined) -> [PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/nikhilgoyal/devo-collector-tencent-cloud/state/f898ad67d0aeb1dcf77081544d3f1d06"
2024-12-20T14:14:07.421    INFO OutputProcess::MainThread -> DevoSender(standard_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2024-12-20T14:14:07.421    INFO OutputProcess::MainThread -> DevoSender(standard_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/nikhilgoyal/devo-collector-tencent-cloud/state/b1ee30ea2c4b3be1eb50c8b2ca80d8d8"
2024-12-20T14:14:07.422    INFO InputProcess::MainThread -> TencentCloudPuller(tencent_cloud#84754,logs_search#predefined) -> [PERSISTENCE_SYSTEM] Checking if old persisted data must be removed
2024-12-20T14:14:07.422    INFO InputProcess::MainThread -> TencentCloudPuller(tencent_cloud#84754,logs_search#predefined) -> [PERSISTENCE_SYSTEM] No previous persistence file exists (Version 2), filename_path: "/home/nikhilgoyal/devo-collector-tencent-cloud/state/38dd5ef18d7c4af3fbb1a8f695eb533d"
2024-12-20T14:14:07.422    INFO InputProcess::MainThread -> TencentCloudPuller(tencent_cloud#84754,logs_search#predefined) -> [PERSISTENCE_SYSTEM] No previous persistence file exists (Version 1), filename_path: "/home/nikhilgoyal/devo-collector-tencent-cloud/state/f898ad67d0aeb1dcf77081544d3f1d06"
2024-12-20T14:14:07.423    INFO InputProcess::MainThread -> TencentCloudPuller(tencent_cloud#84754,logs_search#predefined) Starting the execution of init_variables()
2024-12-20T14:14:07.424    INFO InputProcess::MainThread -> Validating service metadata
2024-12-20T14:14:07.425    INFO OutputProcess::MainThread -> ConsoleSenderManager(standard_senders,manager,console_1) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/nikhilgoyal/devo-collector-tencent-cloud/state/not_used/ConsoleSenderManager;standard_senders;console_1.json.gz
2024-12-20T14:14:07.426    INFO OutputProcess::MainThread -> ConsoleSenderManager(standard_senders,manager,console_1) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2024-12-20T14:14:07.426    INFO OutputProcess::MainThread -> ConsoleSenderManager(standard_senders,manager,console_1) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/nikhilgoyal/devo-collector-tencent-cloud/state/0ec6b8af523d3a4c37bfd91bf5857dcb"
2024-12-20T14:14:07.428    INFO InputProcess::MainThread -> Validating defined module definition
2024-12-20T14:14:07.430    INFO OutputProcess::MainThread -> ConsoleSender(standard_senders,console_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/nikhilgoyal/devo-collector-tencent-cloud/state/not_used/ConsoleSender;standard_senders;console_sender_0.json.gz
2024-12-20T14:14:07.432    INFO OutputProcess::MainThread -> ConsoleSender(standard_senders,console_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2024-12-20T14:14:07.432    INFO OutputProcess::MainThread -> ConsoleSender(standard_senders,console_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/nikhilgoyal/devo-collector-tencent-cloud/state/bdb48adb0633b1678864d4e3de4dac4a"
2024-12-20T14:14:07.434    INFO InputProcess::MainThread -> Validating common input config
2024-12-20T14:14:07.434    INFO OutputProcess::MainThread -> OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/nikhilgoyal/devo-collector-tencent-cloud/state/not_used/OutputStandardConsumer;standard_senders;0.json.gz
2024-12-20T14:14:07.436    INFO OutputProcess::MainThread -> OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2024-12-20T14:14:07.436    INFO OutputProcess::MainThread -> OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/nikhilgoyal/devo-collector-tencent-cloud/state/de28663278a264d05d531fbc1db51a93"
2024-12-20T14:14:07.437    INFO InputProcess::MainThread -> Validating service input config
2024-12-20T14:14:07.438    INFO OutputProcess::MainThread -> DevoSenderManager(lookup_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/nikhilgoyal/devo-collector-tencent-cloud/state/not_used/DevoSenderManager;lookup_senders;devo_2.json.gz
2024-12-20T14:14:07.440    INFO InputProcess::MainThread -> Running overriding rules
2024-12-20T14:14:07.440    INFO OutputProcess::MainThread -> DevoSenderManager(lookup_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2024-12-20T14:14:07.440    INFO OutputProcess::MainThread -> DevoSenderManager(lookup_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/nikhilgoyal/devo-collector-tencent-cloud/state/8812b7237c673c4ed40c4adb7f5eaf01"
2024-12-20T14:14:07.440    INFO InputProcess::MainThread -> Validating the rate limiter config given by the user
2024-12-20T14:14:07.440    INFO InputProcess::MainThread -> <requests_limits> setting has not been defined. The generic settings will be used instead.
2024-12-20T14:14:07.441    INFO InputProcess::MainThread -> Adding raw config to the collector store
2024-12-20T14:14:07.441    INFO InputProcess::MainThread -> Running custom validation rules
2024-12-20T14:14:07.444    INFO OutputProcess::MainThread -> DevoSender(lookup_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/nikhilgoyal/devo-collector-tencent-cloud/state/not_used/DevoSender;lookup_senders;devo_sender_0.json.gz
2024-12-20T14:14:07.444    INFO InputProcess::MainThread -> Creating Tencent Log Fetcher
2024-12-20T14:14:07.445    INFO InputProcess::MainThread -> Created log fetcher: <agent.modules.tencent_cloud.commons.tencent_log_fetcher.TencentLogFetcher object at 0x73c5f93b4640>
2024-12-20T14:14:07.445    INFO OutputProcess::MainThread -> DevoSender(lookup_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2024-12-20T14:14:07.446    INFO OutputProcess::MainThread -> DevoSender(lookup_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/nikhilgoyal/devo-collector-tencent-cloud/state/df8895fef2a509cbd87fcc9850dc0c81"
2024-12-20T14:14:07.446    INFO InputProcess::MainThread -> TencentCloudPuller(tencent_cloud#84754,logs_search#predefined) Finalizing the execution of init_variables()
2024-12-20T14:14:07.448    INFO InputProcess::MainThread -> InputThread(tencent_cloud,84754) - Starting thread (execution_period=60s)
2024-12-20T14:14:07.448    INFO OutputProcess::MainThread -> ConsoleSenderManager(lookup_senders,manager,console_1) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/nikhilgoyal/devo-collector-tencent-cloud/state/not_used/ConsoleSenderManager;lookup_senders;console_1.json.gz
2024-12-20T14:14:07.448    INFO InputProcess::MainThread -> ServiceThread(tencent_cloud,84754,logs_search,predefined) - Starting thread (execution_period=60s)
2024-12-20T14:14:07.449    INFO InputProcess::MainThread -> TencentCloudPullerSetup(tencent_cloud#84754,logs_search#predefined) -> Starting thread
2024-12-20T14:14:07.449    INFO InputProcess::MainThread -> TencentCloudPuller(tencent_cloud#84754,logs_search#predefined) - Starting thread
2024-12-20T14:14:07.450 WARNING InputProcess::TencentCloudPuller(tencent_cloud#84754,logs_search#predefined) -> Waiting until setup will be executed
```

### Events delivery and Devo ingestion

The event delivery module is in charge of receiving the events from the internal queues where all events are injected by the pullers and delivering them using the selected compatible delivery method.

A successful run has the following output messages for the initializer module:

```
2024-06-24T08:40:34.130    INFO OutputProcess::ConsoleSenderManagerMonitor(standard_senders,console_1) -> Number of available senders: 1, sender manager internal queue size: 0
2024-06-24T08:40:34.130    INFO OutputProcess::ConsoleSenderManagerMonitor(standard_senders,console_1) -> enqueued_elapsed_times_in_seconds_stats: {}
2024-06-24T08:40:34.130    INFO OutputProcess::ConsoleSenderManagerMonitor(standard_senders,console_1) -> Sender: ConsoleSender(standard_senders,console_sender_0), status: {"internal_queue_size": 0, "is_connection_open": True}
2024-06-24T08:40:34.131    INFO OutputProcess::ConsoleSenderManagerMonitor(standard_senders,console_1) -> Standard - Total number of messages: 667 messages/bytes sent since/to "2024-06-24T03:05:34.119248+00:00/2024-06-24T03:10:34.131023+00:00": 667/1942773, (elapsed 0.078 seconds)
2024-06-24T08:40:34.131    INFO OutputProcess::ConsoleSenderManagerMonitor(standard_senders,console_1) -> Output metric sent
2024-06-24T08:40:34.132    INFO OutputProcess::ConsoleSenderManagerMonitor(internal_senders,console_1) -> Number of available senders: 1, sender manager internal queue size: 0
2024-06-24T08:40:34.132    INFO OutputProcess::ConsoleSenderManagerMonitor(internal_senders,console_1) -> enqueued_elapsed_times_in_seconds_stats: {}
2024-06-24T08:40:34.133    INFO OutputProcess::ConsoleSenderManagerMonitor(internal_senders,console_1) -> Sender: ConsoleSender(internal_senders,console_sender_0), status: {"internal_queue_size": 0, "is_connection_open": True}
2024-06-24T08:40:34.133    INFO OutputProcess::ConsoleSenderManagerMonitor(internal_senders,console_1) -> Internal - Total number of messages: 205 messages/bytes sent since/to "2024-06-24T03:05:34.127673+00:00/2024-06-24T03:10:34.133181+00:00": 205/84900, (elapsed 0.045 seconds)
```

> ℹ️ By default, these information traces will be displayed every 10 minutes.

#### Sender services

The Integrations Factory Collector SDK has 3 different senders services depending on the event type to delivery (`internal`, `standard`, and `lookup`). This collector uses the following Sender Services:

| **Sender services** | **Description** |
| --- | --- |
| `internal_senders` | In charge of delivering internal metrics to Devo such as logging traces or metrics. |
| `standard_senders` | In charge of delivering pulled events to Devo. |

#### Sender statistics

Each service displays its own performance statistics that allow checking how many events have been delivered to Devo by type:

| **Logging trace** | **Description** |
| --- | --- |
| `Number of available senders: 1` | Displays the number of concurrent senders available for the given Sender Service. |
| `sender manager internal queue size: 0` | Displays the items available in the internal sender queue.<br>> ℹ️ This value helps detect bottlenecks and needs to increase the performance of data delivery to Devo. This last can be made by increasing the concurrent senders. |
| `Total number of messages sent: 44, messages sent since "2022-06-28 10:39:22.511671+00:00": 21 (elapsed 0.007 seconds)` | Displayes the number of events from the last time and following the given example, the following conclusions can be obtained:<br>- 44 events were sent to Devo since the collector started.
- The last checkpoint timestamp was `2022-06-28 10:39:22.511671+00:00`.
- 21 events where sent to Devo between the last UTC checkpoint and now.
- Those 21 events required `0.007 seconds` to be delivered.<br>> ℹ️ By default these traces will be shown every 10 minutes. |
</details>

<details>
<summary>Check memory usage</summary>

To check the memory usage of this collector, look for the following log records in the collector which are displayed every 5 minutes by default, always after running the memory-free process.

- The used memory is displayed by running processes and the sum of both values will give the total used memory for the collector.
- The global pressure of the available memory is displayed in the `global` value.
- All metrics (Global, RSS, VMS) include the value before freeing and after `previous -> after freeing memory`

```
INFO InputProcess::MainThread -> [GC] global: 20.4% -> 20.4%, process: RSS(34.50MiB -> 34.08MiB), VMS(410.52MiB -> 410.02MiB)
INFO OutputProcess::MainThread -> [GC] global: 20.4% -> 20.4%, process: RSS(28.41MiB -> 28.41MiB), VMS(705.28MiB -> 705.28MiB)
```

> ℹ️ Differences between `RSS` and `VMS` memory usage:
> ℹ️ 
> ℹ️ - `RSS` is the Resident Set Size, which is the actual physical memory the process is using
> ℹ️ - `VMS` is the Virtual Memory Size which is the virtual memory that process is using
</details>

<details>
<summary>Enable/disable the logging debug mode</summary>

Sometimes it is necessary to activate the debug mode of the collector's logging. This debug mode increases the verbosity of the log and allows you to print execution traces that are very helpful in resolving incidents or detecting bottlenecks in heavy download processes.

- To enable this option you just need to edit the configuration file and change the debug_status parameter from false to true and restart the collector.
- To disable this option, you just need to update the configuration file and change the debug_status parameter from true to false and restart the collector.

For more information, visit the configuration and parameterization section corresponding to the chosen deployment mode.
</details>

## Change log for v1.x.x

| **Release** | **Released on** | **Release type** | **Details** | **Recommendations** |
| --- | --- | --- | --- | --- |
| `v1.1.0` | 3/11/2025 | [improvement]<br>[new feature] | **Improvements**<br>- Upgraded DCSDK from 1.13.1 to 1.15.0
- Upgraded Dockerfile base image to 1.4.0<br>**New Features**<br>- Created a separate table for cloudaudit logs. | `Recommended version` |
| `v1.0.0` | 12/20/2024 | [First release] | Released the first version of the Tencent Cloud collector. | `Initial version` |