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

## Overview

Imperva provides complete cyber security by protecting what really matters most—your data and applications—whether on-premises or in the 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` |
| Allowed source events obfuscation | `yes` |

## Data sources

| **Data source** | **Description** | **API endpoint** | **Collector service name** | **Devo table** |
| --- | --- | --- | --- | --- |
| Waf logs | Download log files from the Imperva storage repository | `https://logs1.incapsula.com/880_18226/` | `imperva_logs` | `waf.incapsula.siemintegration` |

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

## 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_id` | The API ID |
| `api_key` | The API key |
| `api_url` | The API URL |

## Accepted authentication methods 

|  |  |
| --- | --- |
| **Authentication method** | **Token** |
| Basic auth | [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": {
>     "imperva": {
>       "id": "<short_unique_id>",
>       "enabled": true,
>       "credentials": {
>         "api_id": "<api_id_value>",
>         "api_key": "<api_key_value>",
>         "base_url": "<api_url>"
>       },
>       "services": {
>         "imperva_logs": {
>           "override_tag": "<override_devo_tag_value>"
>         }
>       }
>     }
>   }
> }
> ```
> 
> Please replace the placeholders with real world values following the description table below:
> 
> |  |  |  |  |  |
> | --- | --- | --- | --- | --- |
> | **Parameter** | **Data type** | **Requirement** | **Value range / Format** | **Description** |
> | `short_unique_id` | `str` | Mandatory | Min length: 5, Max length: - | 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. |
> | `api_id` | `int` | Mandatory | Min length: 1 | The Imperva API ID. |
> | `api_key` | `str` | Mandatory | Min length: 1 | The Imperva API KEY. |
> | `api_url` | `str` | Mandatory | Min length: 1 | The Imperva API URL. |
> | `override_devo_tag_value` | `str` | optional | A Devo tag | This parameter allows defining a custom devo tag. |
> 
> > 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-20241007-103743.png](media://6f33fe68-3583-4f3c-8523-390ba9405470)
> 
> > ⚠️ 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
>   multiprocessing: false
>   queue_max_size_in_mb: 1024
>   queue_max_size_in_messages: 1000
>   queue_max_elapsed_time_in_sec: 60
>   queue_wrap_max_size_in_messages: 100
> #    type: redis
> #    config:
> #      host: host
> #      port: port
> #      password: password
> #      db: db
> outputs:
> #  devo_us_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
> #  devo_eu_1:
> #    type: devo_platform
> #    config:
> #      address: collector-eu.devo.io
> #      port: 443
> #      type: SSL
> #      chain: chain.crt
> #      cert: <devo_domain>.crt
> #      key: <devo_domain>.key
> #  relay_1:
> #    type: syslog
> #    config:
> #      address: 127.0.0.1
> #      port: 13000
> #      period_sender_stats_in_seconds: 60
> #      concurrent_connections: 2
> #  console_1:
> #    type: console
> 
> inputs:
>   imperva:
>     id: <short_unique_id>
>     enabled: true
>     credentials:
>       api_id: <api_id>
>       api_key: <api_key>
>       base_url: <api_url>
>     services:
>       imperva_logs:
>         "override_tag": <override_devo_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** | **Requirement** | **Value range / Format** | **Description** |
> | `collector_id_value` | `str` | Mandatory | Min length: 1, Max length: 5 | Unique identifier for the collector. |
> | `collector_name_value` | `str` | Mandatory | Min length: 1, Max length: 10 | Name assigned to the collector. |
> | `devo_address` | `str` | Mandatory | One of: `collector-us.devo.io`, `collector-eu.devo.io` | Devo Cloud destination for events. |
> | `chain_filename` | `str` | Mandatory | Min length: 4, Max length: 20 | Filename of the `chain.crt` file from your Devo domain. |
> | `cert_filename` | `str` | Mandatory | Min length: 4, Max length: 20 | Filename of the `file.cert` from your Devo domain. |
> | `key_filename` | `str` | Mandatory | Min length: 4, Max length: 20 | Filename of the `file.key` from your Devo domain. |
> | `short_unique_id` | `str` | Mandatory | Min length: 5, Max length: - | 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. |
> | `request_period_in_seconds_value` | `int` | optional | minimum length: 60 | Period in seconds used between each data pulling. This value will overwrite the default value (300 seconds). |
> | `api_id` | `int` | Mandatory | Min length: 1 | The API ID. |
> | `api_key` | `str` | Mandatory | Min length: 1 | The API KEY. |
> | `override_devo_tag_value` | `str` | optional | A devo tag | This parameter allows defining a custom devo tag. |
> 
> ### 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-imperva_collector_if-docker-image-1.2.0.tgz](https://drive.google.com/file/d/1twNrn5BCZCHKIldh20GGtL9k_Dtxfs_9/view?usp=drive_link) | `983e00617b58a33939fbd1c6f3e474838bf8bda786c3171b0c512d0e348d5e3b` |
> 
> 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.

### Services (`Services`)

#### Internal process and deduplication method

The collector will use the ID category for deduplication. The Ids will be stored in redis, and checked against.

#### Devo categorization and destination

All services when pulling the event will check the workload and append that workload to the tag.

#### Setup/puller output

```
2024-09-27T15:07:10.727    INFO InputProcess::MainThread -> ImpervaCommonPullerSetup(imperva,imperva#73922,imperva_logs#predefined) -> Starting thread
2024-09-27T15:07:10.727    INFO InputProcess::MainThread -> ImpervaDataPuller(imperva#73922,imperva_logs#predefined) - Starting thread
2024-09-27T15:07:10.727    INFO InputProcess::ImpervaCommonPullerSetup(imperva,imperva#73922,imperva_logs#predefined) -> Auth header created.
2024-09-27T15:07:10.732    INFO OutputProcess::MainThread -> DevoSenderManager(lookup_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2024-09-27T15:07:10.732 WARNING InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> Waiting until setup will be executed
2024-09-27T15:07:10.732    INFO OutputProcess::MainThread -> DevoSenderManager(lookup_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/pulkit/devo/collectors/devo-collector-imperva/state/8812b7237c673c4ed40c4adb7f5eaf01"
2024-09-27T15:07:10.739    INFO OutputProcess::MainThread -> DevoSender(lookup_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/pulkit/devo/collectors/devo-collector-imperva/state/not_used/DevoSender;lookup_senders;devo_sender_0.json.gz
2024-09-27T15:07:10.743    INFO OutputProcess::MainThread -> DevoSender(lookup_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] There is no data persisted with the latest format, any previous persisted data will be migrated
2024-09-27T15:07:10.743    INFO OutputProcess::MainThread -> DevoSender(lookup_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/pulkit/devo/collectors/devo-collector-imperva/state/df8895fef2a509cbd87fcc9850dc0c81"
2024-09-27T15:07:10.747    INFO OutputProcess::MainThread -> OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/pulkit/devo/collectors/devo-collector-imperva/state/not_used/OutputLookupConsumer;lookup_senders;0.json.gz
2024-09-27T15:07:10.750    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
2024-09-27T15:07:10.750    INFO OutputProcess::MainThread -> OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/pulkit/devo/collectors/devo-collector-imperva/state/865a79c1b99ad39b22becc235c9732cb"
2024-09-27T15:07:10.756    INFO OutputProcess::MainThread -> DevoSenderManager(internal_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/pulkit/devo/collectors/devo-collector-imperva/state/not_used/DevoSenderManager;internal_senders;devo_2.json.gz
2024-09-27T15:07:10.760    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
2024-09-27T15:07:10.760    INFO OutputProcess::MainThread -> DevoSenderManager(internal_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/pulkit/devo/collectors/devo-collector-imperva/state/65227e92e07799e6e01b6ecd0bc0e76a"
2024-09-27T15:07:10.771    INFO OutputProcess::MainThread -> DevoSender(internal_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/pulkit/devo/collectors/devo-collector-imperva/state/not_used/DevoSender;internal_senders;devo_sender_0.json.gz
2024-09-27T15:07:10.776    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
2024-09-27T15:07:10.776    INFO OutputProcess::MainThread -> DevoSender(internal_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/pulkit/devo/collectors/devo-collector-imperva/state/4ff7b345dc444ac050cf75f93e5dcb3b"
2024-09-27T15:07:10.780    INFO OutputProcess::MainThread -> OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Created persistence instance, filename_path: /home/pulkit/devo/collectors/devo-collector-imperva/state/not_used/OutputInternalConsumer;internal_senders;0.json.gz
2024-09-27T15:07:10.785    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
2024-09-27T15:07:10.785    INFO OutputProcess::MainThread -> OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] No previous persistence file exists to migrate (Version 1), filename_path: "/home/pulkit/devo/collectors/devo-collector-imperva/state/10dd360c86621afd5a28a029a0dddcf6"
2024-09-27T15:07:10.787    INFO OutputProcess::MainThread -> DevoSender(standard_senders,devo_sender_0) -> Starting thread
2024-09-27T15:07:10.788    INFO OutputProcess::MainThread -> DevoSenderManagerMonitor(standard_senders,devo_2) -> Starting thread (every 300 seconds)
2024-09-27T15:07:10.789    INFO OutputProcess::MainThread -> DevoSenderManager(standard_senders,manager,devo_2) -> Starting thread
2024-09-27T15:07:10.790    INFO OutputProcess::DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2024-09-27T15:07:10.791    INFO OutputProcess::OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2024-09-27T15:07:10.791    INFO OutputProcess::MainThread -> DevoSender(lookup_senders,devo_sender_0) -> Starting thread
2024-09-27T15:07:10.797    INFO OutputProcess::MainThread -> DevoSenderManagerMonitor(lookup_senders,devo_2) -> Starting thread (every 300 seconds)
2024-09-27T15:07:10.799    INFO OutputProcess::MainThread -> DevoSenderManager(lookup_senders,manager,devo_2) -> Starting thread
2024-09-27T15:07:10.800    INFO OutputProcess::DevoSenderManager(lookup_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2024-09-27T15:07:10.801    INFO InputProcess::MainThread -> [GC] global: 68.9% -> 69.0%, process: RSS(43.85MiB -> 43.97MiB), VMS(1.42GiB -> 1.42GiB)
2024-09-27T15:07:10.801    INFO OutputProcess::DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-09-27T15:07:10.801    INFO OutputProcess::DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.01
2024-09-27T15:07:10.802    INFO OutputProcess::OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2024-09-27T15:07:10.804    INFO OutputProcess::MainThread -> DevoSender(internal_senders,devo_sender_0) -> Starting thread
2024-09-27T15:07:10.805    INFO OutputProcess::MainThread -> DevoSenderManagerMonitor(internal_senders,devo_2) -> Starting thread (every 300 seconds)
2024-09-27T15:07:10.806    INFO OutputProcess::MainThread -> DevoSenderManager(internal_senders,manager,devo_2) -> Starting thread
2024-09-27T15:07:10.807    INFO OutputProcess::OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-09-27T15:07:10.807    INFO OutputProcess::OutputLookupConsumer(lookup_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.00
2024-09-27T15:07:10.807    INFO OutputProcess::DevoSenderManager(lookup_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-09-27T15:07:10.807    INFO OutputProcess::DevoSenderManager(lookup_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.01
2024-09-27T15:07:10.808    INFO OutputProcess::DevoSenderManager(internal_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2024-09-27T15:07:10.808    INFO OutputProcess::OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2024-09-27T15:07:10.811    INFO OutputProcess::OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-09-27T15:07:10.811    INFO OutputProcess::OutputInternalConsumer(internal_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.00
2024-09-27T15:07:10.811    INFO OutputProcess::OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-09-27T15:07:10.812    INFO OutputProcess::OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.02
2024-09-27T15:07:10.814    INFO OutputProcess::DevoSenderManager(internal_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-09-27T15:07:10.815    INFO OutputProcess::DevoSenderManager(internal_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Elapsed seconds: 0.01
2024-09-27T15:07:10.878    INFO OutputProcess::MainThread -> [GC] global: 69.0% -> 69.0%, process: RSS(43.20MiB -> 43.32MiB), VMS(1.91GiB -> 1.91GiB)
2024-09-27T15:07:11.465    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/pulkit/devo/collectors/devo-collector-imperva/certs/chain.crt", "cert_path": "/home/pulkit/devo/collectors/devo-collector-imperva/certs/int-if-integrations-india.crt", "key_path": "/home/pulkit/devo/collectors/devo-collector-imperva/certs/int-if-integrations-india.key", "transport_layer_type": "SSL", "last_usage_timestamp": null, "socket_status": null}, hostname: "2023-APAC-0049", session_id: "130027055775408"
2024-09-27T15:07:11.466    INFO OutputProcess::DevoSender(internal_senders,devo_sender_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Nothing available in the persistence system
2024-09-27T15:07:12.772    INFO InputProcess::ImpervaCommonPullerSetup(imperva,imperva#73922,imperva_logs#predefined) -> successfully received details from Imperva server
2024-09-27T15:07:12.772    INFO InputProcess::ImpervaCommonPullerSetup(imperva,imperva#73922,imperva_logs#predefined) -> Api_id and Api_key given - so service auth is valid (completed)
2024-09-27T15:07:12.773    INFO InputProcess::ImpervaCommonPullerSetup(imperva,imperva#73922,imperva_logs#predefined) -> Api_id and Api_key given - so service auth is valid (completed)
2024-09-27T15:07:12.773    INFO InputProcess::ImpervaCommonPullerSetup(imperva,imperva#73922,imperva_logs#predefined) -> Setup for module <ImpervaDataPuller> has been successfully executed
2024-09-27T15:07:12.802    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> ImpervaDataPuller(imperva#73922,imperva_logs#predefined) Starting the execution of pre_pull()
2024-09-27T15:07:12.803    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> Reading persisted data
2024-09-27T15:07:12.806    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> Data retrieved from the persistence: {'id_last_pull': '', '@persistence_version': 1}
2024-09-27T15:07:12.806    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> Running the persistence upgrade steps
2024-09-27T15:07:12.807    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> Running the persistence corrections steps
2024-09-27T15:07:12.807    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> Running the persistence corrections steps
2024-09-27T15:07:12.807    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> No changes were detected in the persistence
2024-09-27T15:07:12.808    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> ImpervaDataPuller(imperva#73922,imperva_logs#predefined) Finalizing the execution of pre_pull()
2024-09-27T15:07:12.808    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> Starting data collection every 60 seconds
2024-09-27T15:07:12.809    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> Pull Started
2024-09-27T15:07:14.985    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> successfully received details from Imperva server
2024-09-27T15:07:18.278    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> successfully received details from Imperva server
2024-09-27T15:07:18.613    INFO InputProcess::ImpervaDataPuller(imperva#73922,imperva_logs#predefined) -> (Partial) Statistics for this pull cycle (@devo_pulling_id=1727429832802):Number of requests made: 1; Number of events received: 7007; Number of duplicated events filtered out: 0; Number of events generated and sent: 0; Average of events per second: 0.000.
2024-09-27T15:07:18.868    INFO OutputProcess::DevoSender(standard_senders,devo_sender_0) -> Created a sender: {"name": "DevoSender(standard_senders,devo_sender_0)", "url": "collector-eu.devo.io:443", "chain_path": "/home/pulkit/devo/collectors/devo-collector-imperva/certs/chain.crt", "cert_path": "/home/pulkit/devo/collectors/devo-collector-imperva/certs/int-if-integrations-india.crt", "key_path": "/home/pulkit/devo/collectors/devo-collector-imperva/certs/int-if-integrations-india.key", "transport_layer_type": "SSL", "last_usage_timestamp": null, "socket_status": null}, hostname: "2023-APAC-0049", session_id: "130027054493360"
```

#### 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 `short_id` 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 | 101 | Cannot run both `latest_issues` and `issues_by_date_range` services - choose one or other | Can't have both | Pick one or the other |
| PullError | 301 | Error in the request itself - bad date perhaps? : {response.json()} | The date could be in the wrong format | Check the credentials. |
| PullError | 302 | access token has expired or invalid. status code: 401. Error message: {response.json()} | access token has expired or invalid | Check the credential. |
| PullError | 303 | The access token does not have valid permissions to perform this request. Add the required status code: 403. Error message: {response.json()} | The access token does not have valid permissions to perform this request | Check the credential. |
| PullError | 304 | The resource requested is not found. Resource Url: {request_url} status code: 404. Error message: {response.json()} | The resource requested is not found. | Read Stack trace and status code to determine |
| PullError | 305 | Unexpected error occurred at the Imperva server. status code: {response.status_code}. Error message: {response.json()} | Unexpected error occurred at the Imperva server. | Read Stack trace and status code to determine |
| SetupError | 100 | Unexpected error occurred at the Imperva server. status code: {response.status_code}. Error message: {response.json()} | Unexpected error occurred at the Imperva server. | Read Stack trace and status code to determine |

## Collector operations

### Verify collector operations

#### 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-09-27T15:07:10.586    INFO MainProcess::MainThread -> Using the default location for "job_config_loc" file: "/etc/devo/job/job_config.json"
2024-09-27T15:07:10.586    INFO MainProcess::MainThread -> "/etc/devo/job" does not exists
2024-09-27T15:07:10.586    INFO MainProcess::MainThread -> Using the default location for "collector_config_loc" file: "/etc/devo/collector/collector_config.json"
2024-09-27T15:07:10.586    INFO MainProcess::MainThread -> "/etc/devo/collector" does not exists
2024-09-27T15:07:10.586    INFO MainProcess::MainThread -> Results of validation of config files parameters: {"config": "/home/pulkit/devo/collectors/devo-collector-imperva/config/local_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}
2024-09-27T15:07:10.591 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:

```
2024-09-27T15:22:38.030    INFO OutputProcess::MainThread -> DevoSender(standard_senders,devo_sender_0) -> Starting thread
2024-09-27T15:22:38.030    INFO OutputProcess::MainThread -> DevoSenderManagerMonitor(standard_senders,devo_2) -> Starting thread (every 300 seconds)
2024-09-27T15:22:38.031    INFO OutputProcess::MainThread -> DevoSenderManager(standard_senders,manager,devo_2) -> Starting thread
2024-09-27T15:22:38.031    INFO OutputProcess::DevoSenderManager(standard_senders,manager,devo_2) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
2024-09-27T15:22:38.032    INFO OutputProcess::OutputStandardConsumer(standard_senders_consumer_0) -> [EMERGENCY_PERSISTENCE_SYSTEM] Recovering any available content from the persistence system
```

#### Sender services

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

|  |  |
| --- | --- |
| **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 the collector executed the pull logic. 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 were sent to Devo between the last UTC checkpoint and now.
- Those 21 events required 0.007 seconds to be delivered.
  By default these traces will be shown every 10 minutes. |

#### 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. |
| Standard - Total number of messages sent: 57, messages sent since "2023-01-10 16:09:16.116750+00:00": 0 (elapsed 0.000 seconds | Displays the number of events from the last time the collector executed the pull logic. 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 2023-01-10 16:09:16.116750+00:00.
- 21 events were sent to Devo between the last UTC checkpoint and now.
- Those 21 events required 0.00 seconds to be delivered. |

### Check memory usage

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-09-27T15:24:38.090    INFO InputProcess::MainThread -> [GC] global: 69.2% -> 69.2%, process: RSS(227.16MiB -> 227.16MiB), VMS(1.55GiB -> 1.55GiB)
2024-09-27T15:24:38.104    INFO OutputProcess::MainThread -> [GC] global: 69.2% -> 69.2%, process: RSS(66.07MiB -> 66.07MiB), VMS(1.91GiB -> 1.91GiB)
```

## Change log

| **Release** | **Released on** | **Release type** | **Details** | **Recommendations** |
| --- | --- | --- | --- | --- |
| `v1.2.0` | 7/15/2025 | [Improvement] | - Upgraded the DCSDK to v1.16.3
- Upgraded docker base image to 1.5.1 | `Recommended version` |
| `v1.1.1` | 2/18/2025 | [Bug fix] | - Implemented pull_pause to interrupt the 'pulling loop'. | `Upgrade` |
| `v1.1.0` | 10/25/2024 | [Bug fix]<br>[Improvement] | - Fixed Duplicate issue and Update DCSDK to 1.13.1. | `Upgrade` |
| `v1.0.1` | 10/15/2024 | [Bug fixing] | Fixed override tag issue. | `Upgrade` |
| `v1.0.0` | 10/4/2024 | [NEW COLLECTOR] | New collector | `-` |