---
title: "Menlo Security Collector"
canonical: "https://docs.devo.com/space/latest/1004666881/Menlo%20Security%20Collector"
format: markdown
---
> Macro (toc)

## Overview

This collector fetches logs from Menlo Security APIs.

## Devo collector features

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

## Data sources

| **Data source** | **Description** | **API endpoint** | **Collector service name** | **Devo table** | **Available from release** |
| --- | --- | --- | --- | --- | --- |
| Menlo Security API | Get all the web type logs | api/rep/v2/fetch/client_select | web | [rbi.menlo.web](http://rbi.menlo.web) | v1.2.0 |
| Menlo Security API | Get all the audit type logs | api/rep/v2/fetch/client_select | audit | rbi.menlo.audit | v1.2.0 |
| Menlo Security API | Get all the email type logs | api/rep/v2/fetch/client_select | email | rbi.menlo.email | v1.2.0 |
| Menlo Security API | Get all the smtp type logs | api/rep/v2/fetch/client_select | smtp | rbi.menlo.smtp | v1.2.0 |
| Menlo Security API | Get all the attachment type logs | api/rep/v2/fetch/client_select | attachment | rbi.menlo.attachment | v1.2.0 |

## Flattening preprocessing

| **Data source** | **Collector service** | **Optional** | **Flattening details** |
| --- | --- | --- | --- |
| Menlo Security API | All the services | - `yes` | not required |

## 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** |
| --- | --- |
| token | The Token for Menlo API. |

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

## Accepted authentication methods

| **Authentication method** | **token** |
| --- | --- |
| 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. If you want us to host this collector for you, [get in touch with us](https://devo.my.site.com/support/login?ec=302&startURL=%2Fsupport%2Fs%2F) and we will guide you through the configuration.
> 
> ### Running the Collector on the Cloud Collector
> 
> #### Editing JSON Config
> 
> config.json
> 
> ```
> {
>   "global_overrides": {
>     "debug": false
>   },
>   "inputs": {
>     "menlo": {
>       "id": "<short_unique_id>",
>       "enabled": true,
>       "credentials": {
>         "token": "<token_value>"
>       },
>       "services": {
>         "web": {
>           "initial_start_time_in_utc": "<optional_initial_start_time_in_utc_value>"
>         },
>         "audit": {
>           "initial_start_time_in_utc": "<optional_initial_start_time_in_utc_value>"
>         },
>         "email": {
>           "initial_start_time_in_utc": "<optional_initial_start_time_in_utc_value>"
>         },
>         "attachment": {
>           "initial_start_time_in_utc": "<optional_initial_start_time_in_utc_value>"
>         },
>         "smtp": {
>           "initial_start_time_in_utc": "<optional_initial_start_time_in_utc_value>"
>         }
>       }
>     }
>   }
> }
> ```
> 
> The following table outlines the parameters available for configuring the collector. Each parameter is categorized by its necessity (mandatory or optional), data type, acceptable values or formats, and a brief description.
> 
> | **Parameter** | **Data type** | **Type** | **Value range / Format** | **Details** |
> | --- | --- | --- | --- | --- |
> | <short_unique_id> | int | Mandatory | Minimum Length 5 | Use this 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. |
> | <input_status> | bool | 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. |
> | <token> | str | Mandatory | Minimum Length 1 | Token for accessing Menlo API. |
> | <override_dev_tag> | str | Optional | A devo tag | This parameter allows defining a custom devo tag. |
> | <initial_start_time_in_utc> | str | Optional | UTC format `Not more than 30 days old` from current date | Start date to pull data from Menlo API. |
> 
>  **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 customisation and control over the collector's behaviour.
> 
> > 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://7ccbabd8-0688-40d0-bc3a-5a6ffbb8ee44)
> 
> > ⚠️ Replace `<product_name>` with the proper value.
> 
> ### Editing the config.yaml file
> 
> ```
> globals:
>   debug: false
>   id: not_used
>   name: menlo_collector
>   persistence:
>     type: filesystem
>     config:
>       directory_name: state
> 
> outputs:
>   devo_1:
>     type: devo_platform
>     config:
>       address: collector-us.devo.io
>       port: 443
>       type: SSL
>       chain: chain.crt
>       cert: <devo_domain>.crt
>       key: <devo_domain>.key
> 
> inputs:
>   menlo:
>     id: <short_unique_id>
>     enabled: true
>     credentials:
>       token: <token_value>
>     services:
>       web:
>         initial_start_time_in_utc: <initial_start_time_in_utc_value>
>         override_tag: <override_tag_value>
>       audit:
>         initial_start_time_in_utc: <initial_start_time_in_utc_value>
>         override_tag: <override_tag_value>
>       email:
>         initial_start_time_in_utc: <initial_start_time_in_utc_value>
>         override_tag: <override_tag_value>
>       attachment:
>         initial_start_time_in_utc: <initial_start_time_in_utc_value>
>         override_tag: <override_tag_value>
>       smtp:
>         initial_start_time_in_utc: <initial_start_time_in_utc_value>
>         override_tag: <override_tag_value>
> ```
> 
> > ℹ️ All defined service entities will be executed by the collector. If you do not want to run any of them, just remove the entity from the `services` object.
> 
> Replace the placeholders with your required values following the description table below:
> 
> | **Parameter** | **Data type** | **Type** | **Value range / Format** | **Details** |
> | --- | --- | --- | --- | --- |
> | <short_unique_id> | int | Mandatory | Minimum Length 5 | Use this 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. |
> | <input_status> | bool | 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. |
> | <token> | str | Mandatory | Minimum Length 1 | Token for accessing Menlo API. |
> | <override_devo_tag> | str | Optional | A devo tag | This parameter allows defining a custom devo tag. |
> | <initial_start_time_in_utc> | str | Optional | UTC format `Not more than 30 days old` from current date | Start date to pull data from Menlo API in UTC format. |
> 
>  
> 
> ### 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-menlo_if-docker-image-1.4.0](https://drive.google.com/file/d/1ra1sVy-RwtBWWNz5hdllYNDkqCq7Tng-/view?usp=drive_link) | 63f869004bfe67ef2b7f262e414e7182bbb0b63a1eb6cdc41f26ffed0621fd6f |
> 
> 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.

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

 

#### Setup output

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

```
2024-10-30T13:58:32.249    INFO InputProcess::MainThread -> MenloPullerSetup(menlo_collector,menlo#12345,web#predefined) -> Starting thread
2024-10-30T13:58:32.257 WARNING InputProcess::MenloPuller(menlo#12345,web#predefined) -> Waiting until setup will be executed
2024-10-30T13:58:35.201    INFO InputProcess::MenloPullerSetup(menlo_collector,menlo#12345,web#predefined) -> Setup for module <MenloPuller> has been successfully executed
```

#### Puller output

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

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

```
2024-10-30T14:04:06.676    INFO InputProcess::MenloPuller(menlo#12345,web#predefined) -> Pull Started
2024-10-30T14:04:06.677    INFO InputProcess::MenloPuller(menlo#12345,web#predefined) -> Pulling data from 2024-10-30 08:32:03+00:00
2024-10-30T14:04:38.748    INFO InputProcess::MenloPuller(menlo#12345,web#predefined) -> Statistics for this pull cycle (@devo_pulling_id=1730277246659):Number of requests made: 11; Number of events received: 10279; Number of duplicated events filtered out: 0; Number of events generated and sent: 10279; Average of events per second: 320.496.
2024-10-30T14:04:38.749    INFO InputProcess::MenloPuller(menlo#12345,web#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:

```
2024-10-30T14:04:38.748    INFO InputProcess::MenloPuller(menlo#12345,web#predefined) -> Statistics for this pull cycle (@devo_pulling_id=1730277246659):Number of requests made: 11; Number of events received: 10279; Number of duplicated events filtered out: 0; Number of events generated and sent: 10279; Average of events per second: 320.496.
```

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

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

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

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

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

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

<details>
<summary>Troubleshooting</summary>

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

| Error Type | Error Id | Error Message | Cause | Solution |
| --- | --- | --- | --- | --- |
| InitVariablesError | 1 | initial_start_time_in_utc is not set as per the datetime_format : {datetime_format} | The date in config is not as per required format | Ensure the date format is correct. |
| InitVariablesError | 2 | Date {initial_start_time_str} is in the future" | The date in config is not in the required period | Ensure the date period is correct. |
| SetupError | 100 | Some error occurred while testing Menlo logs for log_type: {log_type}, error: {e} | Menlo API call is failing | Check the credentials and ensure that the collector has the necessary permissions to access the Menlo API. |
| PullError | 300 | Some error occurred while fetching Menlo logs for log_type: {log_type}, error: {e} | Menlo API call is failing | Contact the Developer with exact error message |
</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`

```
2024-10-24T09:51:15.357    INFO OutputProcess::MainThread -> [GC] global: 88.3% -> 88.3%, process: RSS(62.86MiB -> 62.98MiB), VMS(1.07GiB -> 1.07GiB)
```

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

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

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

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

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

## Change log for v1.x.x

| Release | - Released on | Release type | Details | Recommendations |
| --- | --- | --- | --- | --- |
| `v1.4.0` | 3/19/2025 | [IMPROVEMENT] | **Improvements**<br>- Refactored the code to use the latest DCSDK 1.15.0 .
- Updated the docker base image to 1.4.1.<br>**Fixes**<br>- Fixed the Setup Error bug for start date more than 30 days old. | `Recommended version` |
| `v1.3.0` | 2/28/2025 | [IMPROVEMENT] | **Improvements**<br>- Refactored the code to use the latest DCSDK 1.14.0 .
- Improved the persistence logic . | `Upgrade` |
| `v1.2.0` | 10/30/2024 | [Improvement]<br>[fixes] | **Improvements**<br>- Updated to DCSDK 1.13.1
- Update to Docker Image 1.3.1<br>**Fixes**<br>- Fixed the missing logs bug. | `Upgrade` |