---
title: "MuleSoft Anypoint collector"
canonical: "https://docs.devo.com/space/latest/525991966/MuleSoft%20Anypoint%20collector"
format: markdown
---
> Macro (toc)

## Overview

Devo Collector for MuleSoft Anypoint Platform service.

All collected data is extracted in JSON format using the [Audit Log Query API](https://anypoint.mulesoft.com/exchange/portals/anypoint-platform/f1e97bc6-315a-4490-82a7-23abe036327a.anypoint-platform/audit-log-query-api/minor/1.0/pages/home/) from MuleSoft and it is sent to the corresponding tag: `api.mulesoft.anypoint.audit`

## Devo collector features

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

## Data sources

The collector gets data from the following endpoints:

| **Service** | **Devo Table** | **Endpoint** | **Description** |
| --- | --- | --- | --- |
| MuleSoft Anypoint Audit events | `api.mulesoft.anypoint.audit` | `POST /audit/v2/organizations/{id}/query{mediaTypeExtension}` | Retrieves all the audit events since a `startDate` to the present moment.<br>Date is expressed in ISO 8601:<br>`YYYY-MM-DDTHH:mm:ssZ` |

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

## Vendor setup

To configure the MuleSoft Anypoint Collector Service, you have to follow the next steps to setup a [Connected App](https://docs.mulesoft.com/access-management/connected-apps-overview):

> Macro (rw-ui-steps-macro)
> 
> > Macro (rw-step)
> 
> In Anypoint Platform, navigate to **Access Management → Connected Apps** and click on **Create app**.
> 
> > Macro (rw-step)
> 
> Enter a name for the app, choose *"App acts on its own behalf (client credentials)"* and add the needed permissions.
> 
> ![image-20230223-102544.png](media://d090af72-20fc-44ea-89fa-e670c5f55a04)
> 
> ![image-20230223-102612.png](media://1c591794-bed8-4254-947c-87083d6583cf)
> 
> > Macro (rw-step)
> 
> Click on **Add Scopes**. A new window will show up. Select the scopes for the app and then click **Next**.
> 
> > Macro (rw-step)
> 
> Select the environments for the scopes you chose and then hit **Review**.
> 
> ![image-20230223-105231.png](media://48ba6726-16f3-4ed2-a100-2ce77eb1573a)
> 
> > Macro (rw-step)
> 
> Finally review your choices and click **Add Scopes** to exit the dialog and then click **Save**.
> 
> ![rtaImage.gif](media://8a30071d-0a18-4936-89e1-48ee73c90c04)
> 
> > Macro (rw-step)
> 
> Now, you can return to the Connected Apps screen from the first step. On the right-hand side of your app, click **Copy Id**. This will be the **client_id**.
> 
> > Macro (rw-step)
> 
> On the right-hand side of your app, click on **Copy Secret**. This will be the **client_secret**. Both **client_id** and **client_secret** are needed for the collector to work.

## 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** |
| --- | --- |
| `client_id` | User Client ID to authenticate to the service. |
| `client_secret` | User Secret Key to authenticate to the service. |

## 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
> 
> ```
> {
>   "inputs": {
>     "mulesoft_input": {
>       "id": "<input_id>",
>       "enabled": <input_status>,
>       "credentials": {
>         "client_id": "<client_id>",
>         "client_secret": "<client_secret>"
>       },
>       "services": {
>         "mulesoft_client_api": {
>           "last_configuration_timestamp": "<last_configuration_timestamp>",
>           "endpoints": {
>             "audit": {
>               "initial_lookback_period": "<initial_lookback_period>"
>             }
>           }
>         }
>       }
>     }
>   }
> }
> ```
> 
> > ℹ️ 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.
> 
> Please replace the placeholders with real world values following the description table below:
> 
> | **Parameter** | **Data type** | **Type** | **Value range / Format** | **Details** |
> | --- | --- | --- | --- | --- |
> | `input_id` | `int` | `Mandatory` | Minimum length: 1  
> Maximum length: 5 | Use this param to give a unique id to this input service. |
> | `input_status` | `bool` | `Mandatory` | false / true | If the value is true, the input definition will be executed. If the value is false, the service will be ignored. |
> | `client_id` | `str` | `Mandatory` | Any | Client_id for making endpoint requests. |
> | `client_secret` | `str` | `Mandatory` | Any | Client_secret for making endpoint requests. |
> | `last_configuration_timestamp` | `str` | `Mandatory` | string date with this format  
> `YYYY-MM-DDTHH:mm:ssZ` | Timestamp to start collecting data in the past. ex: `2025-01-01T01:01:43Z`.<br>> ℹ️ Collector will start collecting data from the provided timestamp.  
> > ℹ️ Don’t put timestamp |
> | `initial_lookback_period` | `str` | `Optional` | Timedelta format | Period of time to look back from the timestamp stated. |
> 
> > 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-20240229-095908.png](media://202ca029-cacb-4452-8266-0daa94197b05)
> 
> > ⚠️ Replace `<product_name>` with the proper value.
> 
> ### Editing the config.yaml file
> 
> ```
> globals:
>   debug: <debug>
>   id: <collector_id>
>   name: mulesoft.collector
>   persistence:
>     type: filesystem
>     config:
>       directory_name: state
> outputs:
>   devo_1:
>     type: devo_platform
>     config:
>       address: <address>
>       port: 443
>       type: SSL
>       chain: <chain_filenam>.crt
>       cert: <cert_filename>.crt
>       key: <key_filename>.key
> inputs:
>   mulesoft_input:
>     id: <input_id>
>     enabled: <input_status>
>     pageSize: 1000
>     credentials:
>       client_id: <client_id>
>       client_secret: <client_secret>
>     services:
>       mulesoft_client_api:
>         last_configuration_timestamp: <timestamp> # change this if you want to get your state changed!
>         endpoints:
>           audit:
>             initial_lookback_period: 0s
> ```
> 
> > ℹ️ 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** |
> | --- | --- | --- | --- | --- |
> | `collector_id` | `int` | `Mandatory` | Minimum length: 1  
> Maximum length: 5 | Unique id for this collector. |
> | `devo_address` | `str` | `Mandatory` | `collector-us.devo.io`  
> `collector-eu.devo.io` | Identify the Devo Cloud where the events will be sent. |
> | `chain_filename` | `str` | `Mandatory` | Any | Identify the chain.cert file downloaded from your Devo domain. Usually, this file's name is `chain.crt` |
> | `cert_filename` | `str` | `Mandatory` | Any | Identify the `file.cert` downloaded from your Devo domain. |
> | `key_filename` | `str` | `Mandatory` | Any | Identify the `file.key` downloaded from your Devo domain. |
> | `input_id` | `int` | `Mandatory` | Minimum length: 1  
> Maximum length: 5 | Unique id for this input service. |
> | `input_status` | `bool` | `Mandatory` | false / true | If the value is true, the input definition will be executed. If the value is false, the service will be ignored. |
> | `requests_per_second` | `int` | `Optional` | Minimum value: 1 | Customize the maximum number of API requests per second. If not used, the default setting will be used: `100000` requests/sec.<br>> 📝 This parameter can be left blank, removed or commented. |
> | `client_id` | `str` | `Mandatory` | Any | Client_id for making endpoint requests. |
> | `client_secret` | `str` | `Mandatory` | Any | Client_secret for making endpoint requests. |
> | `last_configuration_timestamp` | `str` | `Mandatory` | string date with this format  
> `YYYY-MM-DDTHH:mm:ssZ` | Timestamp to start collecting data in the past. |
> | `initial_lookback_period` | `str` | `Optional` | Timedelta format | Period of time to look back from the timestamp stated. Default value is 0 seconds. |
> 
> ### 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-mulesoft_if-docker-image-1.1.0](https://drive.google.com/file/d/1JTNDTEO87MNfzCvmiwMhlUuq-iY7c-Ol/view?usp=drive_link) | `ca1c90a240d35ecf4311002b81f3c72f8c277e5e32068268299ee0b7272ed53b` |
> 
> 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.

### Events 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-02-23T09:29:55.178    INFO InputProcess::CollectorMulesoftPullerSetup(unknown,mulesoft_input#23452,mulesoft_client_api#predefined) -> Setup for module <CollectorMulesoftPuller> has been successfully executed
2024-02-23T09:29:55.271    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Starting data collection every 60 seconds
2024-02-23T09:29:55.749    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Query data from 2024-02-22T21:28:18 to 2024-02-23T14:29:55
2024-02-23T09:29:55.749    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Total events received: 200
2024-02-23T09:29:55.759    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Total events sent: 199
2024-02-23T09:29:55.762    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Data collection completed. Elapsed time: 0.494 seconds. Waiting for 59.506 second(s) until the next one
```

#### 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-02-23T09:29:55.178    INFO InputProcess::CollectorMulesoftPullerSetup(unknown,mulesoft_input#23452,mulesoft_client_api#predefined) -> Setup for module <CollectorMulesoftPuller> has been successfully executed
2024-02-23T09:29:55.271    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Starting data collection every 60 seconds
2024-02-23T09:29:55.749    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Query data from 2024-02-22T21:28:18 to 2024-02-23T14:29:55
2024-02-23T09:29:55.749    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Total events received: 200
2024-02-23T09:29:55.759    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Total events sent: 199
2024-02-23T09:29:55.762    INFO InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Data collection completed. Elapsed time: 0.494 seconds. Waiting for 59.506 second(s) until the next one
```
</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 `last_configuration_timestamp` 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` | `Missing required "credentials"` | This error is raised when devo_tag property is not found in collector_definitions.yaml. | Check the credentials or contact developer with required message |
| InitVariablesError | `2` | `Time provided is in the future` | This error is raised when timestamp is in the future . | Please provide the correct timestamp |
| SetupError | `101` | `Some error occurred while checking the server health for Mulesoft Anypoint. Error detailsl {e}.` | Error on the Mulesoft Anypoint server. | Contact the developer with exact error message. |
| SetupError | `102` | `HTTP Error occurred while checking the server health for Mulesoft Anypoint: {error message}` | Error occurred while fetching the domains | Contact the developer with exact error message |
| ApiError | `400` | `Error related to HTTP, HTTP ERROR 429: "Too Many Requests: The user has sent too many requests in a given amount of time}` | This error happens when the collector tries to fetch the data from API. | API request has reached it limit please retry after some time and contact the developer if problem persists |
| ApiError | `401` | `Error related to HTTP, HTTP ERROR 429: "Too Many Requests: The user has sent too many requests in a given amount of time}` | This error happens when the collector tries to fetch the data from API. | API request has reached it limit please retry after some time and contact the developer if problem persists |
| ApiError | `402` | `Error related to HTTP, occurred while retrieving events from Mulesoft Anypoint server{summery} , {details}` | This error happens when the collector tries to fetch the data from API. | In this error you will find the HTTP error code as well as the summary and details. |
| ApiError | `403` | `HTTP ERROR 400: Bad request: The server could not understand the request` | A Bad request | Please reach out to the developer |
| ApiError | `404` | `Unauthorized: Authentication is required and has failed or has not been provided` | Authentication is failed. | Please check your credentials and contact the developer if problem persists |
| ApiError | `405` | `HTTP ERROR 500: Server Error: An error occurred on the server` | Internal server error from the server | Server error. Please contact the developer |
| ApiError | `406` | `Unauthorized access. User does not have the required license type to run this API` | This error happens when the collector tries to fetch the data from API. | User doesn't have the required access to the API |
| ApiError | `407` | `Request Error: Received status code` | This error happens when the collector tries to fetch the data from API. | In this error you'll get status code of the error |
</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-02-23T09:29:53.450    INFO MainProcess::MainThread -> Added "/Users/scottbronkema/collector/devo-collector-mulesoft" directory to the Python path
2024-02-23T09:29:53.450    INFO MainProcess::MainThread -> Added "/Users/scottbronkema/collector/devo-collector-mulesoft/config_internal" directory to the Python path
2024-02-23T09:29:53.450    INFO MainProcess::MainThread -> Added "/Users/scottbronkema/collector/devo-collector-mulesoft/schemas" directory to the Python path
2024-02-23T09:29:53.618    INFO MainProcess::MainThread -> Production mode: False, execute only setup and exit: False, Python version: "3.9.17 (main, Jun 20 2023, 17:20:08) [Clang 14.0.3 (clang-1403.0.22.14.1)]", DCSDK version: "1.11.0", External IP: "108.70.132.211", current dir: "/Users/scottbronkema/collector/devo-collector-mulesoft", exists "config" dir: True, exists "config_internal" dir: True, exists "certs" dir: True, exists "schemas" dir: True, exists "credentials" dir: True
2024-02-23T09:29:53.631    INFO MainProcess::MainThread -> Loading configuration using the following files: {"full_config": "config.yaml", "job_config_loc": null, "collector_config_loc": null}
2024-02-23T09:29:53.631    INFO MainProcess::MainThread -> Using the default location for "job_config_loc" file: "/etc/devo/job/job_config.json"
2024-02-23T09:29:53.631    INFO MainProcess::MainThread -> Using the default location for "collector_config_loc" file: "/etc/devo/collector/collector_config.json"
2024-02-23T09:29:53.633    INFO MainProcess::MainThread -> List of files in directory "/etc/devo/collector": []
2024-02-23T09:29:53.633    INFO MainProcess::MainThread -> Results of validation of config files parameters: {"config": "/Users/scottbronkema/collector/devo-collector-mulesoft/config/config.yaml", "config_validated": True, "job_config_loc": "/etc/devo/job/job_config.json", "job_config_loc_default": True, "job_config_loc_validated": True, "collector_config_loc": "/etc/devo/collector/collector_config.json", "collector_config_loc_default": True, "collector_config_loc_validated": False}
2024-02-23T09:29:53.639 WARNING MainProcess::MainThread -> [WARNING] Illegal global setting has been ignored -> multiprocessing: False
2024-02-23T09:29:53.640 WARNING MainProcess::MainThread -> [MAIN] Detected some not valid symbol in globals.name property, it will be replaced by "_" symbol. Original value: mulesoft.collector, final value: mulesoft_collector
2024-02-23T09:29:53.689    INFO MainProcess::MainThread -> Build time: "UNKNOWN", OS: "macOS-14.2.1-x86_64-i386-64bit", collector(name:version): "mulesoft.collector:1.0.0", owner: "integrationsfactory@devo.com", started at: "2024-02-23T14:29:53.644727Z"
2024-02-23T09:29:53.708    INFO MainProcess::MainThread -> Initialized all object from "MainProcess" process
2024-02-23T09:29:53.709    INFO MainProcess::MainThread -> OutputProcess - Starting thread (executing_period=120s)
2024-02-23T09:29:53.714    INFO MainProcess::MainThread -> InputProcess - Starting thread (executing_period=120s)
2024-02-23T09:29:53.722    INFO MainProcess::MainThread -> Started all object from "MainProcess" process
2024-02-23T09:29:54.164    INFO OutputProcess::MainThread -> Process started
2024-02-23T09:29:54.182    INFO InputProcess::MainThread -> Process Started
2024-02-23T09:29:54.241 WARNING InputProcess::MainThread -> A previous rate limiter with same "period_in_seconds" and "number_of requests" was already existing: "1/15"
2024-02-23T09:29:54.243 WARNING InputProcess::MainThread -> A previous rate limiter with same "period_in_seconds" and "number_of requests" was already existing: "1/15"
2024-02-23T09:29:54.255    INFO OutputProcess::MainThread -> ConsoleSender(standard_senders,console_sender_0) -> Starting thread
2024-02-23T09:29:54.256    INFO OutputProcess::MainThread -> ConsoleSenderManagerMonitor(standard_senders,console_1) -> Starting thread (every 300 seconds)
2024-02-23T09:29:54.256    INFO OutputProcess::MainThread -> ConsoleSenderManager(standard_senders,manager,console_1) -> Starting thread
2024-02-23T09:29:54.256    INFO OutputProcess::OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY PERSISTENCE SYSTEM] OutputStandardConsumer(standard_senders_consumer_0) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.256    INFO OutputProcess::ConsoleSenderManager(standard_senders,manager,console_1) -> [EMERGENCY PERSISTENCE SYSTEM] ConsoleSenderManager(standard_senders,manager,console_1) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.256    INFO OutputProcess::MainThread -> ConsoleSender(lookup_senders,console_sender_0) -> Starting thread
2024-02-23T09:29:54.257    INFO OutputProcess::MainThread -> ConsoleSenderManagerMonitor(lookup_senders,console_1) -> Starting thread (every 300 seconds)
2024-02-23T09:29:54.257    INFO OutputProcess::MainThread -> ConsoleSenderManager(lookup_senders,manager,console_1) -> Starting thread
2024-02-23T09:29:54.257    INFO OutputProcess::MainThread -> ConsoleSender(internal_senders,console_sender_0) -> Starting thread
2024-02-23T09:29:54.257    INFO OutputProcess::ConsoleSenderManager(lookup_senders,manager,console_1) -> [EMERGENCY PERSISTENCE SYSTEM] ConsoleSenderManager(lookup_senders,manager,console_1) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.257    INFO OutputProcess::MainThread -> ConsoleSenderManagerMonitor(internal_senders,console_1) -> Starting thread (every 300 seconds)
2024-02-23T09:29:54.257    INFO OutputProcess::MainThread -> ConsoleSenderManager(internal_senders,manager,console_1) -> Starting thread
2024-02-23T09:29:54.257    INFO OutputProcess::OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY PERSISTENCE SYSTEM] OutputLookupConsumer(lookup_senders_consumer_0) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.266    INFO InputProcess::MainThread -> InputThread(mulesoft_input,23452) - Starting thread (execution_period=60s)
2024-02-23T09:29:54.266    INFO InputProcess::MainThread -> ServiceThread(mulesoft_input,23452,mulesoft_client_api,predefined) - Starting thread (execution_period=60s)
2024-02-23T09:29:54.266    INFO InputProcess::MainThread -> CollectorMulesoftPullerSetup(unknown,mulesoft_input#23452,mulesoft_client_api#predefined) -> Starting thread
2024-02-23T09:29:54.266    INFO InputProcess::MainThread -> CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) - Starting thread
2024-02-23T09:29:54.267    INFO OutputProcess::ConsoleSenderManager(internal_senders,manager,console_1) -> [EMERGENCY PERSISTENCE SYSTEM] ConsoleSenderManager(internal_senders,manager,console_1) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.267 WARNING InputProcess::CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) -> Waiting until setup will be executed
2024-02-23T09:29:54.267    INFO OutputProcess::MainThread -> [GC] global: 66.2% -> 66.2%, process: RSS(39.45MiB -> 39.46MiB), VMS(32.82GiB -> 32.82GiB)
2024-02-23T09:29:54.268    INFO OutputProcess::OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY PERSISTENCE SYSTEM] OutputInternalConsumer(internal_senders_consumer_0) -> Nothing retrieved from the persistence.
2024-02-23T09:29:54.268    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:53.690", "message_tag": "devo.collectors.out.global.info", "message_content": "{\"msg\": \"Build time: \\\"UNKNOWN\\\", OS: \\\"macOS-14.2.1-x86_64-i386-64bit\\\", collector(name:version): \\\"mulesoft.collector:1.0.0\\\", owner: \\\"integrationsfactory@devo.com\\\", started at: \\\"2024-02-23T14:29:53.644727Z\\\"\", \"time\": \"2024-02-23T14:29:53.690096Z\", \"level\": \"info\", \"collector_name\": \"mulesoft.collector\", \"collector_version\": \"1.0.0\", \"collector_image\": null, \"shared_domain\": true}"}
2024-02-23T09:29:54.268    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:53.715", "message_tag": "devo.collectors.out.local.info", "message_content": "{\"msg\": \"InputProcess - Starting thread (executing_period=120s)\", \"time\": \"2024-02-23T14:29:53.715496Z\", \"level\": \"info\", \"collector_name\": \"mulesoft.collector\", \"collector_version\": \"1.0.0\", \"collector_image\": null}"}
2024-02-23T09:29:54.269    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:54.182", "message_tag": "devo.collectors.out.local.info", "message_content": "{\"msg\": \"Process Started\", \"time\": \"2024-02-23T14:29:54.182902Z\", \"level\": \"info\", \"collector_name\": \"unknown\", \"collector_version\": \"unknown\", \"collector_image\": null}"}
2024-02-23T09:29:54.269    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:54.266", "message_tag": "devo.collectors.out.local.info", "message_content": "{\"msg\": \"InputThread(mulesoft_input,23452) - Starting thread (execution_period=60s)\", \"time\": \"2024-02-23T14:29:54.266276Z\", \"level\": \"info\", \"collector_name\": \"unknown\", \"collector_version\": \"unknown\", \"collector_image\": null, \"input_name\": \"mulesoft_input\"}"}
2024-02-23T09:29:54.270    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:54.266", "message_tag": "devo.collectors.out.local.info", "message_content": "{\"msg\": \"ServiceThread(mulesoft_input,23452,mulesoft_client_api,predefined) - Starting thread (execution_period=60s)\", \"time\": \"2024-02-23T14:29:54.266539Z\", \"level\": \"info\", \"collector_name\": \"unknown\", \"collector_version\": \"unknown\", \"collector_image\": null, \"input_name\": \"mulesoft_input\", \"service_name\": \"mulesoft_client_api\"}"}
2024-02-23T09:29:54.270    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:54.267", "message_tag": "devo.collectors.out.local.info", "message_content": "{\"msg\": \"CollectorMulesoftPuller(mulesoft_input,23452,mulesoft_client_api,predefined) - Starting thread\", \"time\": \"2024-02-23T14:29:54.267032Z\", \"level\": \"info\", \"collector_name\": \"unknown\", \"collector_version\": \"unknown\", \"collector_image\": null, \"input_name\": \"mulesoft_input\", \"service_name\": \"mulesoft_client_api\", \"module_name\": \"CollectorMulesoftPuller\"}"}
2024-02-23T09:29:54.270    INFO OutputProcess::ConsoleSender(internal_senders,console_sender_0) -> {"message_timestamp": "2024-02-23 14:29:54.267", "message_tag": "devo.collectors.out.local.warning", "message_content": "{\"msg\": \"Waiting until setup will be executed\", \"time\": \"2024-02-23T14:29:54.267464Z\", \"level\": \"warning\", \"collector_name\": \"unknown\", \"collector_version\": \"unknown\", \"collector_image\": null, \"input_name\": \"mulesoft_input\", \"service_name\": \"mulesoft_client_api\", \"module_name\": \"CollectorMulesoftPuller\"}"}
2024-02-23T09:29:54.279    INFO InputProcess::MainThread -> [GC] global: 66.2% -> 66.2%, process: RSS(39.31MiB -> 39.32MiB), VMS(32.73GiB -> 32.73GiB)
```

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

```
INFO OutputProcess::SyslogSenderManagerMonitor(standard_senders,sidecar_0) -> Number of available senders: 1, sender manager internal queue size: 0
INFO OutputProcess::SyslogSenderManagerMonitor(standard_senders,sidecar_0) -> enqueued_elapsed_times_in_seconds_stats: {}
INFO OutputProcess::SyslogSenderManagerMonitor(standard_senders,sidecar_0) -> Sender: SyslogSender(standard_senders,syslog_sender_0), status: {"internal_queue_size": 0, "is_connection_open": True}
INFO OutputProcess::SyslogSenderManagerMonitor(standard_senders,sidecar_0) -> Standard - Total number of messages sent: 44, messages sent since "2022-06-28 10:39:22.511671+00:00": 44 (elapsed 0.007 seconds)
INFO OutputProcess::SyslogSenderManagerMonitor(internal_senders,sidecar_0) -> Number of available senders: 1, sender manager internal queue size: 0
INFO OutputProcess::SyslogSenderManagerMonitor(internal_senders,sidecar_0) -> enqueued_elapsed_times_in_seconds_stats: {}
INFO OutputProcess::SyslogSenderManagerMonitor(internal_senders,sidecar_0) -> Sender: SyslogSender(internal_senders,syslog_sender_0), status: {"internal_queue_size": 0, "is_connection_open": True}
INFO OutputProcess::SyslogSenderManagerMonitor(internal_senders,sidecar_0) -> Internal - Total number of messages sent: 1, messages sent since "2022-06-28 10:39:22.516313+00:00": 1 (elapsed 0.019 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

| **Release** | **Released on** | **Release type** | **Details** | **Recommendations** |
| --- | --- | --- | --- | --- |
| `v1.1.0` | 1/27/2025 | [Improvement] |  | `Recommended` |
| `v1.0.0` | 2/23/2024 | [FEATURE] | **Initial Release** | `Upgrade` |