---
title: "IBM Cloud Activity Tracker collector"
canonical: "https://docs.devo.com/space/latest/413859841/IBM%20Cloud%20Activity%20Tracker%20collector"
format: markdown
---
> Macro (toc)

## Overview

The IBM Cloud Activity Tracker collects all activity events within IBM cloud.

## Devo collector features

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

## Data sources

| **Data source** | **Description** | **API endpoint** | **Collector service name** | **Devo table** | **Available from release** |
| --- | --- | --- | --- | --- | --- |
| IBM cloud | Get the cloud activity tracker logs from ibm cloud logs (event streaming) | `kafka event streaming` | `activity_tracker` | `cloud.ibm.activity_tracker.audit` | v2.0.0 |

For more information on how the events are parsed, [visit our page](https://devodocs.atlassian.net/wiki/spaces/latest/pages/379781121).

## 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** |
| --- | --- |
| `api_key` | The api_key for ibm cloud logs for authentication. |
| `kafka_admin_url` | The kafka admin url to get the topic name. Ex:-> `https://****-eventstreams.cloud.ibm.com` |
| `bootstrap_endpoints` | The bootstrap endpoints is set of broker addresses that a Kafka client (producer or consumer) uses to connect . Sample Ex: - `broker-*******.cloud.ibm.com:1000, broker-*******.cloud.ibm.com:1001, broker-*******.cloud.ibm.com:1003` |

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

## Accepted authentication methods

|  |  |
| --- | --- |
| **Authentication method** | **api_ key** |
| IAM Token | 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. 
> 
> To enable the collector for a customer:
> 
> 1. In the **Collector Server** **GUI**, access the **domain** in which you want this instance to be created
> 2. Click **Add Collector** and find the one you wish to add.
> 3. In the **Version** field, select the latest value.
> 4. In the **Collector Name** field, set the value you prefer (this name must be unique inside the same Collector Server domain).
> 5. In the sending method select **Direct Send. Direct Send** configuration is optional for collectors that create `Table` events, but mandatory for those that create `Lookups`.
> 6. In the **Parameters** section, establish the **Collector Parameters** as follows below:
> 
> ### Editing the JSON configuration
> 
> ```
> {
>   "global_overrides": {
>     "debug": false
>   },
>   "inputs": {
>     "ibm_cloud_logs": {
>       "id": "<input_id_value>",
>       "enabled": true,
>       "kafka_admin_url": "<kafka_admin_url>",
>       "credentials": {
>         "api_key": "<api_key>"
>       },
>       "services": {
>         "activity_tracker": {
>           "bootstrap_endpoints": "<bootstrap_endpoints>",
>           "group_id": "group_id",
>           "override_tag": "<override_tag>",
>           "auto_offset_reset": "<auto_offset_reset>",
>           "user_topic_name": "<user_topic_name>",
>           "request_period_in_seconds": "<request_period_in_seconds>"
>         }
>       }
>     }
>   }
> }
> ```
> 
> | **Parameter** | **Data type** | **Type** | **Value range / Format** | **Details** |
> | --- | --- | --- | --- | --- |
> | `input_id_value` | `int` | mandatory | Minimum Length 5 | Use this parameter to give a unique ID to this input service. This parameter is used to build the persistence address; do not use the same value for multiple collectors. It could cause a collision. |
> | `kafka_admin_url` | str | mandatory | Minimum Length 1 | Use this param to Provide kafka URL for API call to get the description topic about topic. |
> | `api_key` | `str` | mandatory | Minimum Length 1 | The api key is your unique identifier for ibm cloud logs used as the Authorization to get the iam token. |
> | `bootstrap_endpoints` | `str` | mandatory | Minimum Length 1 | The bootstrap endpoints is set of broker addresses that a Kafka client (producer or consumer) uses to connect . Sample Ex: - `broker-*******.cloud.ibm.com:1000, broker-*******.cloud.ibm.com:1001, broker-*******.cloud.ibm.com:1003` |
> | `auto_offset_reset` | `str` | optional | Minimum Length 1 | It is used to offset the kafka event streaming to `ealiest` or `latest`. If not provided `earliest` will be assumed. |
> | `request_period_in_seconds` | `int` | optional | Minimum Length 1 | Period in seconds used between each data pulling, default value is 60 seconds. |
> | `group_id` | `str` | optional | Minimum Length 5 | group_id which will override the default group_id for kafka config , if provided. Default Value of group_id is `input_id_value` |
> | `user_topic_name` | `array` | optional | Minimum Length 1 | Name of the topic to subscribe by the user in the config, if provided it will override the topic we get from api_call using `kafka_url`. |
> | `override_tag` | `str` | optional | A Devo tag | This value is used to override the tag of services. Ex: `my.app.devo.tracker`. |
> 
> > ℹ️ **Note**: Parameters marked as "Mandatory" are required for the collector's configuration. Optional parameters can be omitted or removed if not used, but they provide additional customization and control over the collector's behavior.
> 
> > 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://820192cf-c7e1-40f5-b425-aef3151fa6af)
> 
> > ⚠️ Replace `<product_name>` with the proper value.
> 
> ### Editing the config.yaml file
> 
> ```
> globals:
>   debug: false
>   id: not_used
>   name: ibm_cloud_logs_collector
>   persistence:
>     type: filesystem
>     config:
>       directory_name: state
> outputs:
>   devo_us_1:
>     type: devo_platform
>     config:
>       address: <devo_address>
>       port: 443
>       type: SSL
>       chain: <chain_filename>
>       cert: <cert_filename>
>       key: <key_filename>
> inputs:
>   ibm_cloud_logs:
>     id: <input_id_value>
>     enabled: true
>     kafka_admin_url: <kafka_admin_url>
>     credentials:
>       api_key: <api_key>
>     services:
>       activity_tracker:
>         bootstrap_endpoints: <bootstrap_endpoints>
>         auto_offset_reset: <auto_offset_reset>
>         override_tag: <override_tag>
>         group_id: <group_id>
>         user_topic_name: <user_topic_name>
>         request_period_in_seconds: <request_period_in_seconds>
> ```
> 
> > ℹ️ 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** |
> | `devo_address` | `str` | mandatory | `collector-us.devo.io `<br>`collector-eu.devo.io` | Use this parameter to identify the Devo Cloud where the events will be sent. |
> | `chain_filename` | `str` | mandatory | minimum length: 4<br>maximum length: 20 | Use this parameter to identify the chain.cert file downloaded from your Devo domain. Usually this file's name is: `chain.crt`. |
> | `cert_filename` | `str` | mandatory | minimum length: 4<br>maximum length: 20 | Use this parameter to identify the file.cert downloaded from your Devo domain. |
> | `key_filename` | `str` | mandatory | minimum length: 4<br>maximum length: 20 | Use this parameter to identify the file.key downloaded from your Devo domain. |
> | `input_id_value` | `int` | mandatory | minimum length: 5 | Use this parameter 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. |
> | `input_status` | `boolean` | mandatory | false / true | Use this param to enable or disable the given input logic when running the collector. If the value is true, the input will be run. If the value is false, it will be ignored. |
> | `kafka_admin_url` | `str` | mandatory | minimum length: 1 | Use this param to Provide kafka URL for API call to get the description topic about topic. |
> | `api_key` | `str` | mandatory | minimum length: 1 | The api key is your unique identifier for ibm cloud logs used as the Authorization to get the iam token. |
> | `bootstrap_endpoints` | `str` | mandatory | minimum length: 1 | The bootstrap endpoints is set of broker addresses that a Kafka client (producer or consumer) uses to connect . Sample Ex: - `broker-*******.cloud.ibm.com:1000, broker-*******.cloud.ibm.com:1001, broker-*******.cloud.ibm.com:1003` |
> | `auto_offset_reset` | `str` | optional | minimum length: 1 | It is used to offset the kafka event streaming to `ealiest` or `latest`. If not provided `earliest` will be assumed. |
> | `request_period_in_seconds&gt` | `int` | optional | minimum length: 1 | Period in seconds used between each data pulling, default value is 60 seconds. |
> | `group_id` | `str` | optional | minimum length: 5 | group_id which will override the default group_id for kafka config which is `input_id_value`, if provided. |
> | `user_topic_name` | `array` | optional | minimum length: 1 | Name of the topic to subscribe by the user in the config, if provided it will override the topic we get from api_call using `kafka_url`. |
> | `override_tag` | `str` | optional | Devo tag | This value is used to override the tag of services. Ex: `my.app.devo.tracker`. |
> 
> ### 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-ibm_cloud_activity_tracker_if-docker-image-2.0.1](https://drive.google.com/file/d/18J3gm-JN8njvCjpeHDw4gRNcv4KHBLJE/view?usp=sharing) | `da11f9fc6748cba1f364f185c325cfa727254f4269b234d8d03813f820505873` |
> 
> 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.

### Event service

<details>
<summary>activity_tracker</summary>

#### Verify data collection

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 an organized way and delivering the events via SDK. |

#### Setup output

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

```
2025-02-12T15:05:26.257    INFO InputProcess::MainThread -> LogCollectorPullerSetup(ibm_cloud_activity_tracker#123987,activity_tracker#predefined) -> Starting thread
2025-02-12T15:05:26.257    INFO InputProcess::MainThread -> LogCollectorPuller(ibm_cloud_activity_tracker#123987,activity_tracker#predefined) - Starting thread
2025-02-12T15:05:26.257 WARNING InputProcess::LogCollectorPullerSetup(ibm_cloud_activity_tracker#123987,activity_tracker#predefined) -> The token/header/authentication has not been created yet
2025-02-12T15:05:26.257    INFO OutputProcess::MainThread -> DevoSender(lookup_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/state/not_used/DevoSender;lookup_senders;devo_sender_0.json.gz
2025-02-12T15:05:26.257 WARNING InputProcess::LogCollectorPuller(ibm_cloud_activity_tracker#123987,activity_tracker#predefined) -> Waiting until setup will be executed
2025-02-12T15:05:26.258    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
2025-02-12T15:05:26.258    INFO OutputProcess::MainThread -> DevoSender(lookup_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/state/df8895fef2a509cbd87fcc9850dc0c81"
2025-02-12T15:05:26.258    INFO InputProcess::MainThread -> InputMetricsThread -> Started thread for updating metrics values (update_period=10.0)
2025-02-12T15:05:26.259    INFO OutputProcess::MainThread -> OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/state/not_used/OutputLookupConsumer;lookup_senders;0.json.gz
2025-02-12T15:05:26.259    INFO OutputProcess::MainThread -> OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2025-02-12T15:05:26.259    INFO OutputProcess::MainThread -> OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/state/865a79c1b99ad39b22becc235c9732cb"
2025-02-12T15:05:26.260    INFO OutputProcess::MainThread -> DevoSenderManager(internal_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/state/not_used/DevoSenderManager;internal_senders;devo_2.json.gz
2025-02-12T15:05:26.261    INFO OutputProcess::MainThread -> DevoSenderManager(internal_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2025-02-12T15:05:26.261    INFO OutputProcess::MainThread -> DevoSenderManager(internal_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/state/65227e92e07799e6e01b6ecd0bc0e76a"
2025-02-12T15:05:26.262    INFO OutputProcess::MainThread -> DevoSender(internal_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/state/not_used/DevoSender;internal_senders;devo_sender_0.json.gz
2025-02-12T15:05:26.263    INFO OutputProcess::MainThread -> DevoSender(internal_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2025-02-12T15:05:26.263    INFO OutputProcess::MainThread -> DevoSender(internal_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/state/4ff7b345dc444ac050cf75f93e5dcb3b"
2025-02-12T15:05:26.264    INFO OutputProcess::MainThread -> OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/state/not_used/OutputInternalConsumer;internal_senders;0.json.gz
2025-02-12T15:05:26.264    INFO OutputProcess::MainThread -> OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2025-02-12T15:05:26.264    INFO OutputProcess::MainThread -> OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/state/10dd360c86621afd5a28a029a0dddcf6"
2025-02-12T15:05:26.264    INFO OutputProcess::MainThread -> DevoSender(standard_senders,devo_sender_0) -> Starting thread
2025-02-12T15:05:26.265    INFO OutputProcess::MainThread -> DevoSenderManagerMonitor(standard_senders,devo_2) -> Starting thread (every 300 seconds)
2025-02-12T15:05:26.265    INFO OutputProcess::MainThread -> DevoSenderManager(standard_senders,manager,devo_2) -> Starting thread
2025-02-12T15:05:26.265    INFO OutputProcess::DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2025-02-12T15:05:26.265    INFO OutputProcess::OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2025-02-12T15:05:26.265    INFO OutputProcess::MainThread -> DevoSender(lookup_senders,devo_sender_0) -> Starting thread
2025-02-12T15:05:26.266    INFO OutputProcess::MainThread -> DevoSenderManagerMonitor(lookup_senders,devo_2) -> Starting thread (every 300 seconds)
2025-02-12T15:05:26.266    INFO OutputProcess::DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2025-02-12T15:05:26.266    INFO OutputProcess::DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.00
2025-02-12T15:05:26.266    INFO OutputProcess::MainThread -> DevoSenderManager(lookup_senders,manager,devo_2) -> Starting thread
2025-02-12T15:05:26.267    INFO OutputProcess::DevoSenderManager(lookup_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2025-02-12T15:05:26.267    INFO OutputProcess::OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2025-02-12T15:05:26.267    INFO OutputProcess::MainThread -> DevoSender(internal_senders,devo_sender_0) -> Starting thread
2025-02-12T15:05:26.267    INFO OutputProcess::OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2025-02-12T15:05:26.267    INFO OutputProcess::OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.00
2025-02-12T15:05:26.268    INFO OutputProcess::OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2025-02-12T15:05:26.268    INFO OutputProcess::OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.00
2025-02-12T15:05:26.268    INFO OutputProcess::DevoSenderManager(lookup_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2025-02-12T15:05:26.268    INFO OutputProcess::DevoSenderManager(lookup_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.00
2025-02-12T15:05:26.268    INFO OutputProcess::MainThread -> DevoSenderManagerMonitor(internal_senders,devo_2) -> Starting thread (every 300 seconds)
2025-02-12T15:05:26.269    INFO OutputProcess::MainThread -> DevoSenderManager(internal_senders,manager,devo_2) -> Starting thread
2025-02-12T15:05:26.269    INFO OutputProcess::DevoSenderManager(internal_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2025-02-12T15:05:26.269    INFO OutputProcess::OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2025-02-12T15:05:26.270    INFO OutputProcess::MainThread -> OutputMetricsThread -> Started thread for updating metrics values (update_period=10.0)
2025-02-12T15:05:26.270    INFO OutputProcess::DevoSenderManager(internal_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2025-02-12T15:05:26.270    INFO OutputProcess::DevoSenderManager(internal_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.00
2025-02-12T15:05:26.271    INFO OutputProcess::OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2025-02-12T15:05:26.271    INFO OutputProcess::OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.00
2025-02-12T15:05:26.272    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "msg_sent_counter" created: "Number of messages sent to the defined output", unit: "1"
2025-02-12T15:05:26.285    INFO InputProcess::MainThread -> [GC] global: 39.8% -> 39.8%, process: RSS(62.97MiB -> 63.47MiB), VMS(529.94MiB -> 529.94MiB)
2025-02-12T15:05:26.286    INFO InputProcess::LogCollectorPullerSetup(ibm_cloud_activity_tracker#123987,activity_tracker#predefined) -> First run of the collector. Generating new access token.
2025-02-12T15:05:26.286    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "vendor_requests" created: "Number of requests received from the vendor API", unit: "requests"
2025-02-12T15:05:26.287    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "msg_incoming_received" created: "Number of messages received from the vendor API", unit: "1"
2025-02-12T15:05:26.288    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "msg_incoming_removed" created: "Number of messages removed by the collector", unit: "1"
2025-02-12T15:05:26.288    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "msg_incoming_filtered" created: "Number of messages filtered by the collector", unit: "1"
2025-02-12T15:05:26.289    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "msg_enqueued_standard_counter" created: "Number of messages enqueued", unit: "1"
2025-02-12T15:05:26.289    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "msg_enqueued_standard_bytes" created: "Number of bytes enqueued", unit: "1"
2025-02-12T15:05:26.289    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "msg_enqueued_lookup_counter" created: "Number of messages enqueued", unit: "1"
2025-02-12T15:05:26.290    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "msg_enqueued_lookup_bytes" created: "Number of messages enqueued", unit: "1"
2025-02-12T15:05:26.290    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "msg_enqueued_internal_counter" created: "Number of messages enqueued in the queue", unit: "1"
2025-02-12T15:05:26.290    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "msg_enqueued_internal_bytes" created: "Number of messages enqueued in the queue", unit: "1"
2025-02-12T15:05:26.290    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Gauge "module_global_status" created: "Global status of current module", unit: "1"
2025-02-12T15:05:26.291 WARNING MainProcess::CollectorThread -> There is a process that now it doesn't exists (pid=17343)
2025-02-12T15:05:26.298    INFO OutputProcess::MainThread -> [GC] global: 39.8% -> 39.8%, process: RSS(62.71MiB -> 63.83MiB), VMS(1.08GiB -> 1.08GiB)
2025-02-12T15:05:26.298    INFO MainProcess::MetricsConsumerThread -> OpenTelemetryServer -> [METRIC] Counter "msg_sent_bytes" created: "Number of bytes sent to the defined output", unit: "1"
2025-02-12T15:05:26.830    INFO OutputProcess::DevoSender(internal_senders,devo_sender_0) -> Created a sender: {"name": "DevoSender(internal_senders,devo_sender_0)", "url": "collector-eu.devo.io:443", "chain_path": "/home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/certs/chain.crt", "cert_path": "/home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/certs/int-if-integrations-india.crt", "key_path": "/home/md_tausif/gitlab/devo-collector-ibm-cloud-activity-tracker/certs/int-if-integrations-india.key", "transport_layer_type": "SSL", "last_usage_timestamp": null, "socket_status": null}, hostname: "2023-apac-0046", session_id: "124978958779824"
2025-02-12T15:05:26.831    INFO OutputProcess::DevoSender(internal_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2025-02-12T15:05:30.444    INFO InputProcess::LogCollectorPullerSetup(ibm_cloud_activity_tracker#123987,activity_tracker#predefined) -> Setup for module <LogCollectorPuller> has been successfully executed
```

#### Puller output

```
2025-02-12T15:05:31.301    INFO InputProcess::LogCollectorPuller(ibm_cloud_activity_tracker#123987,activity_tracker#predefined) -> Pull Started
2025-02-12T15:05:32.903    INFO InputProcess::LogCollectorPuller(ibm_cloud_activity_tracker#123987,activity_tracker#predefined) -> (Partial) Statistics for this pull cycle (@devo_pulling_id=1739352931293):Number of requests made: 1; Number of events received: 0; Number of duplicated events filtered out: 0; Number of events generated and sent: 1; Average of events per second: 10.120.
2025-02-12T15:05:32.904    INFO InputProcess::LogCollectorPuller(ibm_cloud_activity_tracker#123987,activity_tracker#predefined) -> Statistics for this pull cycle (@devo_pulling_id=1739352931293):Number of requests made: 1; Number of events received: 0; Number of duplicated events filtered out: 0; Number of events generated and sent: 1; Average of events per second: 10.120.
2025-02-12T15:05:32.904    INFO InputProcess::LogCollectorPuller(ibm_cloud_activity_tracker#123987,activity_tracker#predefined) -> The data is up to date!
```

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

```
2025-02-12T15:05:32.903    INFO InputProcess::LogCollectorPuller(ibm_cloud_activity_tracker#123987,activity_tracker#predefined) -> (Partial) Statistics for this pull cycle (@devo_pulling_id=1739352931293):Number of requests made: 1; Number of events received: 0; Number of duplicated events filtered out: 0; Number of events generated and sent: 0; Average of events per second: 10.120.
```
</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 `group_id` 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** |
| --- | --- | --- | --- | --- |
| SetupError | 100 | Error while getting the access token summary {e}, details {e} | Error occurred while getting the access token | Check the credentials and ensure that it has the necessary permissions. If issue still persists, Contact the developer. |
| SetupError | 101 | Some error occurred while retrieving events from server. Error details: {e} | Generate auth token api failed. | Contact the developer with exact error message. |
| SetupError | 102 | Error while getting the topic name. Summary: {e} | Unable to get the topic description. | Please contact the developer. |
| SetupError | 103 | Some error occurred while retrieving topic from server. Error details {e} | Error occurred while retrieving topic. | Contact the developer when this error occurred. |
| SetupError | 104 | Error while checking the health from ibm cloud logs Error details {e} | Error while checking health. | Contact the developer when this error occurred. |
| PullError | 300 | Some Error Occurred: {details} | Some error Occurred. | Please contact the developer with exact msg. |
</details>

## Collector operations

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

<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`

```
2025-02-12T15:14:00.518    INFO OutputProcess::MainThread -> [GC] global: 41.1% -> 41.1%, process: RSS(66.28MiB -> 66.28MiB), VMS(1.08GiB -> 1.08GiB)
2025-02-12T15:05:37.969    INFO InputProcess::MainThread -> [GC] global: 39.7% -> 39.7%, process: RSS(72.47MiB -> 72.47MiB), VMS(1.11GiB -> 1.11GiB)
```

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>

## Change log

| **Release** | **Released on** | **Release type** | **Details** | **Recommendations** |
| --- | --- | --- | --- | --- |
| `v2.0.1` | 2/27/2025 | [IMPROVEMENT] |  | `Recommended version` |
| `v2.0.0` | 2/20/2025 | [IMPROVEMENT] | **Improvements**<br>- Using kafka for the event streaming.
- Migrated the collector to get the data from ibm cloud activity tracker to ibm cloud logs (Kafka- event streaming)
- Added Unit tests and added user_guide .
- Updated DCSDK base docker image 1.4.0 .
- Updated DCSDK from 1.10.0 to 1.14.0 | `Update` |
| `v1.0.0` | 11/3/2023 | [initial release] | **Features:**<br>- **Activity Tracker:** Enable the collection and, storage of information about the cloud activity in the IBM Cloud environment.<br>*Released with Devo Collector SDK v1.10.0* | `Update` |