We use a piece of software called Collector Server to host and manage all our available collectors. To enable the collector for a customer: In the Collector Server GUI, access the domain in which you want this instance to be created Click Add Collector and find the one you wish to add. In the Version field, select the latest value. In the Collector Name field, set the value you prefer (this name must be unique inside the same Collector Server domain). 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 . In the Parameters section, establish the Collector Parameters as follows below:
Info |
---|
Replace the placeholders <short_unique_identifier> , <url> , <x_api_key> , <authentication_basic> and <token_expire_at_ts> with the values obtained in previous sections of this document, except the <short_unique_identifier> that can have the value you choose. |
Editing the JSON configuration Code Block |
---|
{
"sophos_central": {
"id": "<short_unique_identifier>",
"enabled": true,
"requests_per_second": 4,
"autoconfig": {
"enabled": true,
"refresh_interval_in_seconds": 600
},
"credentials": {
"url": "<url>",
"x_api_key": "<x_api_key>",
"authentication_basic": "<authentication_basic>",
"token_expire_at_ts": "<token_expire_at_ts>"
},
"services": {
"alerts": {
"request_period_in_seconds": 60
},
"events": {
"request_period_in_seconds": 60
}
}
}
} |
Info |
---|
The value chosen for the id field will be used internally for having independent persistence areas. | Image Added Rw tab |
---|
title | On-premise collector |
---|
|
StructureThe following directory structure should be created for use when running the Sophos Central collector: Code Block |
---|
<any_directory>
└── devo-collectors/
└── sophos-central/
├── certs/
│ ├── chain.crt
│ ├── <your_domain>.key
│ └── <your_domain>.crt
└── config/
└── config-sophos-central.yaml |
Devo credentialsIn Devo, go to Administration → Credentials → X.509 Certificates, download the Certificate, Private key and Chain CA and save them in <any directory>/devo-collectors/sophos-central/certs . Learn more about security credentials in Devo here. Editing the config-sophos-central.yaml fileIn the config-sophos-central.yaml file, replace <url> , <x_api_key> , <authentication_basic> , and <token_expire_at_ts> with the values that you got in the previous steps. The <short_unique_identifier> can have any value you choose. Code Block |
---|
globals:
debug: false # Setup as True or False for debugging mode
id: not_used
name: sophos
persistence: # Persistence setup filesystem
type: filesystem
config:
directory_name: state # Persistence directory
outputs:
devo_1:
type: devo_platform
config:
address: collector-us.devo.io # Devo platform address EU (for US use: collector-us.devo.io)
port: 443
type: SSL
chain: chain.crt
cert: your_domain.crt
key: your_domain.key
inputs:
sophos_central:
id: <short_unique_identifier> # The value of this field will be used internally for having independent persistence areas
enabled: true
requests_per_second: 5 # Setting up requests per second. 5 recommended.
autoconfig:
enabled: true
refresh_interval_in_seconds: 600
credentials: # Sophos Central API access URL. i.e. api3.central.sophos.com/gateway
url: <url> # Sophos Central API key
x_api_key: <x_api_key> # Sophos Central Authentication Basic
authentication_basic: <authentication_basic> # Sophos Central token expire at. Accepted format YYYY-MM-DDTHH:MM:SS.ssssssZ or Mon DD, YYYY
token_expire_at_ts: <token_expire_at_ts>
services:
alerts:
request_period_in_seconds: 60 # Setting up request period in seconds.
events:
request_period_in_seconds: 60 |
Download the Docker imageThe 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: Use the following command to add the Docker image to the system: Code Block |
---|
$ gunzip -c collector-sophos-docker-image-<version>.tgz | docker load |
Info |
---|
Once the Docker image is imported, it will show the real name of the Docker image (including version info). Replace "<version> " with the proper value. |
The Docker image can be deployed on the following services: DockerExecute the following command on the root directory <any_directory>/devo-collectors/sophos-central/ Code Block |
---|
docker run \
--name collector-sophos-central \
--volume $PWD/certs:/devo-collector/certs \
--volume $PWD/config:/devo-collector/config \
--volume $PWD/state:/devo-collector/state \
--env CONFIG_FILE=config-sophos-central.yaml \
--rm -it docker.devo.internal/collector/sophos-central:<version> |
Note |
---|
Replace <version> with the proper value. |
Docker ComposeThe following Docker Compose file can be used to execute the Docker container. It must be created in the <any_directory>/devo-collectors/sophos-central/ directory. Code Block |
---|
version: '3'
services:
collector-sophos-central:
build:
context: .
dockerfile: Dockerfile
image: docker.devo.internal/collector/sophos-central:${IMAGE_VERSION:-latest}
container_name: sophos-central-collector
volumes:
- ./certs:/devo-collector/certs
- ./config:/devo-collector/config
- ./state:/devo-collector/state
environment:
- CONFIG_FILE=${CONFIG_FILE:-config-sophos-central.yaml} |
To run the container using docker-compose, execute the following command from the <any_directory>/devo-collectors/sophos-central directory: Code Block |
---|
IMAGE_VERSION=<version> docker-compose up -d |
Note |
---|
Replace <version> with the proper value. |
|