Docs
Search…
Docker
You can send logs from Docker, Docker Cloud, Amazon Elastic Container Service (ECS), and other Docker-based platforms to SignalFlex. They can be transformed and then forwarded to other tools.

Docker

Below are two ways of forwarding your Docker logs to SignalFlex.

Option 1

The SignalFlex logspout container lets you send logs from Docker, Docker Cloud, Amazon Elastic Container Service (ECS), and other Docker-based platforms. The container automatically collects logs generated by other containers running on the host and sends them to SignalFlex. The container is based on Logspout.
To log a standard Docker deployment, deploy an instance of the SignalFlex logspout container. Make sure to replace the following values (these also apply to all of the following deployment methods):
    SIGNALFLEX_KEY: Required. Your SignalFlex API key
    SIGNALFLEX_PIPELINE_ID: Required. Your SignalFlex pipeline to process logs.
    FILTER_NAME: Optional. The name of the specific container to monitor.
    FILTER_LABELS: Optional. A comma-separated list of labels to use to filter specific containers.
    HOSTNAME: Optional. An alternate hostname other than the one detected by the container.
    TAGS: Optional. A comma-separated list of tags to apply to logs processed by this container.
1
sudo docker run --name="signalflex" --restart=always \
2
-d -v=/var/run/docker.sock:/var/run/docker.sock \
3
-e SIGNALFLEX_KEY="YOUR-SIGNALFLEX-KEY" \
4
-e SIGNALFLEX_PIPELINE_ID="SIGNALFLEX-PIPELINE-PROCESS-YOUR-LOGS"
5
-e FILTER_NAME="CONTAINER-NAME" \
6
-e FILTER_LABELS="COMMA-SEPARATED-LABELS" \
7
-e HOSTNAME="ALTERNATIVE-HOSTNAME" \
8
-e TAGS="COMMA-SEPARATED-TAGS" \
9
signalflex/logspout:latest
Copied!

Option 2

Use Vector and use Docker source in Vector configuration file.
Step 1. Create Vector configuration file vector.toml, add the following:
Replace container_id pipeline_id, and api_key accordingly
1
data_dir = "/vector"
2
3
[sources.in]
4
type = "docker"
5
include_containers = [${container_id}]
6
7
[sinks.out]
8
inputs = ["in"]
9
type = "http"
10
encoding.codec = "text"
11
headers.pipeline = $SIGNALFLEX_PIPELINE_ID
12
headers.api_key = $SIGNALFLEX_KEY
13
uri = "http://localhost:8080/batch"
Copied!
Step 2. Start vector
1
$vector --config vector.toml
Copied!
After above steps are finished, your logs will be collected by Vector and sent to SignalFlex.
Last modified 1yr ago
Copy link