---
title: "Google Workspace Logs in BigQuery collector"
canonical: "https://docs.devo.com/space/latest/650018852/Google%20Workspace%20Logs%20in%20BigQuery%20collector"
format: markdown
---
> Macro (toc)

## Overview

Google Workspace allows users to export logs to BigQuery to gain insights into report activity and  
usage logs.

## Devo collector features

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

## Data sources

| **Data source** | **Description** | **API endpoint** | **Collector service name** | **Devo table** |
| --- | --- | --- | --- | --- |
| Activity Records | Activity records include activity data for various Google Workspace reports (e.g. "Accounts", "Admin", "Gmail", etc. | BigQuery search (partition query) | `activity_records` | Various (see service description mapping |

## Vendor setup

Supported editions for this feature include Frontline Standard, Enterprise Standard and Plus, Education Standard and Plus, and Enterprise Essentials Plus. [Compare your edition](https://support.google.com/a/answer/6043385).

### Set up a BigQuery project for reporting logs - Google Workspace Admin Help

Before you set up BigQuery logs in the Google Admin console, establish a BigQuery project for your reporting logs in the Google Cloud console.

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> In the [Google Cloud console](https://console.cloud.google.com/), create or open an active BigQuery project. For detailed instructions, visit [Creating and managing projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects).
> 
> > ⚠️ Billing must be enabled for each project you create.
> 
> > Macro (rw-step)
> 
> Go to the [IAM & Admin page](https://console.cloud.google.com/iam-admin/iam/) for your project.
> 
> > Macro (rw-step)
> 
> Add a Google Workspace administrator account as the project editor:
> 
> 1. At the top of the page, click **Add**.
> 2. In **New members**, enter the project editor's user ID.
> 3. In **Select a role**, choose **Project** then **Editor**.
> 4. Optionally, to assign the project owner role, click **Add Another Role** and select **Project**, then **Owner**.
> 5. Click **Save**.
> 
> > Macro (rw-step)
> 
> Add the `gapps-reports@system.gserviceaccount.com` account as an editor (repeat the steps above).

### Set up BigQuery logs in the Google Admin console

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> Sign in to your [Google Admin console](https://admin.google.com/).
> 
> > Macro (rw-step)
> 
> Navigate to **Menu → Reporting → Data integrations**.
> 
> > Macro (rw-step)
> 
> On the **BigQuery Export** card, click the pencil icon button (**Edit**). 
> 
> > Macro (rw-step)
> 
> Enable logs by checking **Enable Google Workspace data export to Google BigQuery**.
> 
> > Macro (rw-step)
> 
> Optionally, to export DLP rule logs, check **Allow export of sensitive content from DLP rule logs**. For more information, see [View content that triggers DLP rules](https://support.google.com/a/answer/14149036).
> 
> > Macro (rw-step)
> 
> Select your BigQuery project ID under which to store the logs, ensuring it has write access. See [Quickstart using the Google Cloud console](https://cloud.google.com/bigquery/docs/quickstarts/quickstart-web-ui) for setup details.
> 
> > Macro (rw-step)
> 
> Enter a unique dataset name under **New dataset within project**. For more on dataset creation, visit [Creating datasets](https://cloud.google.com/bigquery/docs/datasets). Save this dataset name for use in the collector configuration.
> 
> > Macro (rw-step)
> 
> Click **Save**. If issues arise, consider reconfiguring the dataset in Google Cloud console before saving again.

Logs are written to the dataset the following day, with the necessary service account permissions automatically configured.

### Create Google Service Account Credentials for BigQuery Access

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> Access the Google Cloud Console [here](https://console.cloud.google.com/).
> 
> > Macro (rw-step)
> 
> Select or create a project. Choose the project associated with your BigQuery setup.
> 
> > Macro (rw-step)
> 
> Navigate to** ****[IAM & Admin page](https://console.cloud.google.com/iam-admin/iam/)** and go to **Service Accounts**.
> 
> > Macro (rw-step)
> 
> Click **Create Service Account**, enter a name, description, and click **Create**.
> 
> > Macro (rw-step)
> 
> Assign the service account appropriate roles for BigQuery access (e.g., *BigQuery Admin*).
> 
> > Macro (rw-step)
> 
> Click **Create Key**, choose the key type (JSON recommended), and click **Create**. Download the key file. Save this key file JSON info for use in the collector configuration.

## 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** |
| --- | --- |
| `service_account_info` | The GCP service account (with BigQuery read/query access) credentials info |

## Accepted authentication methods

| **Authentication method** | **Customer ID** | **Client ID** | **Client secret** |
| --- | --- | --- | --- |
| Service Account Credentials | [REQUIRED] | [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.
> 
> 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:
> 
> ```
> {
>   "global_overrides": {
>     "debug": false
>   },
>   "inputs": {
>     "google_workspace_logs_in_bigquery": {
>       "id": "<short_unique_id>",
>       "enabled": true,
>       "credentials": {
>         "service_account_info": "<service_account_info_value>"
>       },
>       "dataset_id": "<dataset_id_value>",
>       "environment": "<environment_value>",
>       "services": {
>         "activity_records": {
>           "request_period_in_seconds": "<request_period_in_seconds_value>",
>           "start_time_in_utc": "<start_time_in_utc_value>",
>           "include_record_types": "<include_record_type_values>",
>           "exclude_record_types": "<exclude_record_type_values>",
>           "override_tag": "<override_tag_value>",
>           "override_table_id": "<override_table_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** | **Requirement** | **Value range / Format** | **Description** |
> | --- | --- | --- | --- | --- |
> | `short_unique_id` | `str` | Mandatory | Min length: 1, Max length: 5 | Short, unique ID for input service, used in persistence addressing. Avoid duplicates to prevent collisions. |
> | `service_account_info` | `json` | Mandatory | Min length: 1 | The service account credential info. This is a JSON block downloadable from Google upon creating a service account credential. The service account must have read access to the BigQuery dataset that stores the activity records. |
> | `environment_value` | `str` | Optional | Min length: 1 | Differentiates environments (e.g., dev, prod). Remove if unused. |
> | `dataset_id` | `str` | Optional | Min length: 1 | The BigQuery dataset ID that contains the activity data. |
> | `request_period_in_seconds_value` | `int` | Optional | Min: 60 | Custom period in seconds between data pulls, overriding default (300s). |
> | `start_time_in_utc_value` | `str` | Optional | UTC datetime format: `%Y-%m-%dT%H:%M:%SZ-` | Custom start date for data retrieval, for historical data download. Remove if unused. |
> | `include_record_types` | `list` | Optional | List of strings. E.g. `["gmail", "login"]` | If specified, the service will fetch *only* those record types defined in the list. The record types are present in the `record_type` field in the BigQuery table. |
> | `exclude_record_types` | `list` | Optional | List of strings. E.g. `["gmail", "login"]` | If specified, the service will exclude the record types defined in the list. The record types are present in the `record_type` field in the BigQuery table. |
> | `override_tag` | `str` | Optional | Min length: 1 | An optional tag to override the default tag for the Devo table. |
> | `override_table_id` | `str` | Optional | Min length: 1 | An optional override to support users whose activity data is stored in a table other than `activity`. |
> 
> > ℹ️ 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-20240624-105853.png](media://412ef203-ba47-45bd-a101-40acda58518a)
> 
> > ⚠️ Replace `<product_name>` with the proper value.
> 
> ### Editing the config.yaml file
> 
> ```
> globals:
>   debug: false
>   id: <collector_id_value>
>   name: <collector_name_value>
>   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:
>   google_workspace_logs_in_bigquery:
>     id: <short_unique_id>
>     enabled: true
>     credentials:
>       service_account_info: <service_account_info_value>
>     dataset_id: <dataset_id_value>
>     environment: <environment_value>
>     services:
>       activity_records:
>         request_period_in_seconds: <request_period_in_seconds_value>
>         start_time_in_utc: <start_time_in_utc_value>
>         include_record_types: <include_record_type_values>
>         exclude_record_types: <exclude_record_type_values>
>         override_tag: <override_tag_value>
>         override_table_id: <override_table_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** | **Requirement** | **Value range / Format** | **Description** |
> | `short_unique_id` | `str` | Mandatory | Min length: 1, Max length: 5 | Short, unique ID for input service, used in persistence addressing. Avoid duplicates to prevent collisions. |
> | `service_account_info` | `json` | Mandatory | Min length: 1 | The service account credential info. This is a JSON block downloadable from Google upon creating a service account credential. The service account must have read access to the BigQuery dataset that stores the activity records. |
> | `environment_value` | `str` | Optional | Min length: 1 | Differentiates environments (e.g., dev, prod). Remove if unused. |
> | `dataset_id` | `str` | Optional | Min length: 1 | The BigQuery dataset ID that contains the activity data. |
> | `request_period_in_seconds_value` | `int` | Optional | Min: 60 | Custom period in seconds between data pulls, overriding default (300s). |
> | `start_time_in_utc_value` | `str` | Optional | UTC datetime format: `%Y-%m-%dT%H:%M:%SZ-` | Custom start date for data retrieval, for historical data download. Remove if unused. |
> | `include_record_types` | `list` | Optional | List of strings. E.g. `["gmail", "login"]` | If specified, the service will fetch *only* those record types defined in the list. The record types are present in the `record_type` field in the BigQuery table. |
> | `exclude_record_types` | `list` | Optional | List of strings. E.g. `["gmail", "login"]` | If specified, the service will exclude the record types defined in the list. The record types are present in the `record_type` field in the BigQuery table. |
> | `override_tag` | `str` | Optional | Min length: 1 | An optional tag to override the default tag for the Devo table. |
> | `override_table_id` | `str` | Optional | Min length: 1 | An optional override to support users whose activity data is stored in a table other than `activity`. |
> 
> > ℹ️ 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.
> 
> ### 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-google_workspace_logs_in_bigquery-docker-image-1.0.0](https://drive.google.com/file/d/1sud9dchWpXv4lxkn2osfJOm8vftqfC2k/view?usp=drive_link) | `37f402945ba2fbb8385d9a8c010e676802a0b55687b21eed5753e9ffc7dce9e3` |
> 
> 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.

### Activity records (`activity_records`)

#### Internal process and deduplication method

All activity records are fetched continually based on the `time_usec` date time key via BigQuery queries. The collector utilizes the partitions to perform efficient queries. The collector stores the last `time_usec` value and the associated record IDs to ensure that no duplicate records are ingested into the Devo table.

#### Devo categorization and destination

Events are sent to Devo based on the `record_type`.

- `gmail` record type events are sent to the `cloud.gcp.bigquery.gmail` table
- All other record types are sent to `my.app.gsuite_activity.{record_type}`

### Setup output

```
2024-05-10T00:49:40.248    INFO InputProcess::MainThread -> BigQueryPullerSetup(unknown,google_workspace_logs_in_bigquery#100000,activity_records#predefined) -> Starting thread
2024-05-10T00:49:40.249    INFO InputProcess::BigQueryPullerSetup(unknown,google_workspace_logs_in_bigquery#100000,activity_records#predefined) -> Using service account info to authenticate
2024-05-10T00:49:40.262    INFO OutputProcess::MainThread -> DevoSender(standard_senders,devo_sender_0) -> Starting thread
2024-05-10T00:49:40.654    INFO InputProcess::BigQueryPullerSetup(unknown,google_workspace_logs_in_bigquery#100000,activity_records#predefined) -> Setup for module <BigQueryPuller> has been successfully executed
```

### Puller output

```
2024-05-10T00:49:41.324    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) Starting the execution of pre_pull()
2024-05-10T00:49:41.326    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Reading persisted data
2024-05-10T00:49:41.328    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Data retrieved from the persistence: {'@persistence_version': 1, 'start_time_in_utc': '2024-04-20T00:00:00.000000Z', 'last_event_time_in_utc': '2024-04-22T08:20:00.000000Z', 'last_ids': ['1991b279fb251ee850b64cc04f722b914b6504563a3dad18f40c09c4d1f8c0e5']}
2024-05-10T00:49:41.330    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Running the persistence upgrade steps
2024-05-10T00:49:41.331    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Running the persistence corrections steps
2024-05-10T00:49:41.331    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Running the persistence corrections steps
2024-05-10T00:49:41.333 WARNING InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Some changes have been detected and the persistence needs to be updated. Previous content: {'@persistence_version': 1, 'start_time_in_utc': '2024-04-20T00:00:00.000000Z', 'last_event_time_in_utc': '2024-04-22T08:20:00.000000Z', 'last_ids': ['1991b279fb251ee850b64cc04f722b914b6504563a3dad18f40c09c4d1f8c0e5']}. New content: {'@persistence_version': 1, 'start_time_in_utc': None, 'last_event_time_in_utc': '2024-05-10T04:49:36.324054Z', 'last_ids': []}
2024-05-10T00:49:41.338    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Updating the persistence
2024-05-10T00:49:41.340 WARNING InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Persistence has been updated successfully
2024-05-10T00:49:41.340    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) Finalizing the execution of pre_pull()
2024-05-10T00:49:41.340    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Starting data collection every 300 seconds
2024-05-10T00:49:41.341    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Pull Started
2024-05-10T00:49:41.342    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Fetching records via fetch_activity_data occurring between 2024-05-10T04:49:36.324054Z and 2024-05-10T04:49:36.324054Z
2024-05-10T00:49:43.406    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Pull completed up to the current time.
2024-05-10T00:49:43.410    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Updating the persistence
2024-05-10T00:49:43.411    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> (Partial) Statistics for this pull cycle (@devo_pulling_id=1715316581324):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: 0.000.
2024-05-10T00:49:43.411    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Statistics for this pull cycle (@devo_pulling_id=1715316581324):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: 0.000.
2024-05-10T00:49:43.411    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> The data is up to date!
2024-05-10T00:49:43.411    INFO InputProcess::BigQueryPuller(google_workspace_logs_in_bigquery,100000,activity_records,predefined) -> Data collection completed. Elapsed time: 2.087 seconds. Waiting for 297.913 second(s) until the next one
```

### Restart the persistence

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

### Troubleshooting ]

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 | Invalid `start_time_in_utc: {ini_start_str}`. Must be in parseable datetime format. | The configured `start_time_in_utc` parameter is a non-parseable format. | Update the `start_time_in_utc` value to have the recommended format as indicated in the guide. |
| `InitVariablesError` | 2 | Invalid `start_time_in_utc: {ini_start_str}`. Must be in the past. | The configured `start_time_in_utc` parameter is a future date. | Update the `start_time_in_utc` value to a past datetime. |
| `ApiError` | 401 | An error occurred while trying to authenticate with the Azure API. Exception: {e} | The collector is unable to authenticate with the Azure API. | Check the credentials and ensure that the collector has the necessary permissions to access the Azure API. |
| `ApiError` | 410 | An error occurred while trying to check if container `{container_name}` exists. Ensure that the blob storage account name or connection string is correct. Exception: `{e}` | The collector was unable to locate the specified blob storage container name. | Ensure the container exists and the credentials have READ access to the container |
| `ApiError` | 411 | An error occurred while trying to check if container `{container_name}` exists. Ensure that the application has necessary permissions to access the containers. Exception: `{e}` | The collector was unable to access the specified blob storage container name. | Ensure the container exists and the credentials have READ access to the container |
| `ApiError` | 412 | An error occurred while trying to create container `{container_name}`. Ensure that the application has necessary permissions to create containers. Exception: `{e}` | The collector was unable to create the container for the auto discover service and the user indicated to use Azure Blob Storage checkpointing. | Ensure the credentials have WRITE access to the container storage account. |
| `ApiError` | 420 | An error occurred while trying to get consumer group `{consumer_group_name}`. Exception: `{e}` | The collector was unable to access the specified consumer group name. | Ensure the consumer group exists and the credentials have READ access to the consumer group |
| `ApiError` | 421 | An error occurred while trying to create consumer group `{consumer_group_name}`. Ensure that the application has necessary permissions to create consumer groups. Exception: `{e}` | The collector was unable to create the consumer group for the auto discover service. | Ensure the credentials have WRITE access to the event hub namespace or use the `$Default` consumer group. |

##  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:

```
2023-01-10T15:22:57.146    INFO MainProcess::MainThread -> Loading configuration using the following files: {"full_config": "config-test-local.yaml", "job_config_loc": null, "collector_config_loc": null}
2023-01-10T15:22:57.146    INFO MainProcess::MainThread -> Using the default location for "job_config_loc" file: "/etc/devo/job/job_config.json"
2023-01-10T15:22:57.147    INFO MainProcess::MainThread -> "\etc\devo\job" does not exists
2023-01-10T15:22:57.147    INFO MainProcess::MainThread -> Using the default location for "collector_config_loc" file: "/etc/devo/collector/collector_config.json"
2023-01-10T15:22:57.148    INFO MainProcess::MainThread -> "\etc\devo\collector" does not exists
2023-01-10T15:22:57.148    INFO MainProcess::MainThread -> Results of validation of config files parameters: {"config": "C:\git\collectors2\devo-collector-<name>\config\config.yaml", "config_validated": True, "job_config_loc": "/etc/devo/job/job_config.json", "job_config_loc_default": True, "job_config_loc_validated": False, "collector_config_loc": "/etc/devo/collector/collector_config.json", "collector_config_loc_default": True, "collector_config_loc_validated": False}
2023-01-10T15:22:57.171 WARNING MainProcess::MainThread -> [WARNING] Illegal global setting has been ignored -> multiprocessing: False
```

### 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:

```
2023-01-10T15:23:00.788    INFO OutputProcess::MainThread -> DevoSender(standard_senders,devo_sender_0) -> Starting thread
2023-01-10T15:23:00.789    INFO OutputProcess::MainThread -> DevoSenderManagerMonitor(standard_senders,devo_1) -> Starting thread (every 300 seconds)
2023-01-10T15:23:00.790    INFO OutputProcess::MainThread -> DevoSenderManager(standard_senders,manager,devo_1) -> Starting thread
2023-01-10T15:23:00.842    INFO OutputProcess::MainThread -> global_status: {"output_process": {"process_id": 18804, "process_status": "running", "thread_counter": 21, "thread_names": ["MainThread", "pydevd.Writer", "pydevd.Reader", "pydevd.CommandThread", "pydevd.CheckAliveThread", "DevoSender(standard_senders,devo_sender_0)", "DevoSenderManagerMonitor(standard_senders,devo_1)", "DevoSenderManager(standard_senders,manager,devo_1)", "OutputStandardConsumer(standard_senders_consumer_0)",
```

> ℹ️ 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)` | Displays 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)
```
</details>

## Change log

| **Release** | **Released on** | **Release type** | **Details** | **Recommendations** |
| --- | --- | --- | --- | --- |
| `v1.0.0` | 6/6/2024 | [NEW COLLECTOR] | New collector | `-` |