Skip to content

Agent with Docker Compose

The agent repository ships a Compose file that runs the agent together with all three local stores — VictoriaMetrics, Loki, and Tempo — as containers. It is the fastest way to try the agent against a real tenant.

The Compose file bind-mounts sibling configuration files, so clone the repository first:

Terminal window
git clone https://github.com/LeanSignal/leansignal-agent && cd leansignal-agent
export LEANSIGNAL_ENDPOINT="<tenant>-grpc.eu11.leansignal.io:443"
export LEANSIGNAL_AGENT_KEY="<your-agent-key>"
export LEANSIGNAL_AGENT_NAME="<a-name-for-this-agent>"
export LEANSIGNAL_DATAPLANE_ENDPOINT="https://<tenant>-metrics-ingest.eu11.leansignal.io/api/v1/write"
export LEANSIGNAL_LOKI_ENDPOINT="https://<tenant>-logs-ingest.eu11.leansignal.io"
export LEANSIGNAL_TEMPO_ENDPOINT="https://<tenant>-traces-ingest.eu11.leansignal.io"
docker compose -f deploy/docker/docker-compose.yaml up -d

Three things the Compose trial does differently

Section titled “Three things the Compose trial does differently”

It needs explicit endpoints. Every other install derives its endpoints from the tenant name; Compose predates that and still requires LEANSIGNAL_ENDPOINT and LEANSIGNAL_DATAPLANE_ENDPOINT. eu11 is the EU region hosting all tenants today.

LEANSIGNAL_DATAPLANE_ENDPOINT is the full write URL here — ending in /api/v1/write — not the base origin the host installers take. Copying an endpoint between the two doubles or drops that path.

The logs and traces endpoints default to the agent’s own local stores (http://loki:3100, http://tempo:4318). Leave them unset and demanded logs and traces loop back locally and never reach LeanSignal — so export both, as above. Likewise set LEANSIGNAL_AGENT_NAME, or this agent’s telemetry is labeled docker-agent.

PortPurpose
4317 / 4318OTLP in — metrics, logs, traces
3500 / 3600Loki push in (HTTP / gRPC)
13133health check

Point your applications’ OTLP exporters at 4317 (gRPC) or 4318 (HTTP).

Terminal window
# status
docker compose -f deploy/docker/docker-compose.yaml ps
# logs, per service
docker compose -f deploy/docker/docker-compose.yaml logs -f agent
docker compose -f deploy/docker/docker-compose.yaml logs -f victoriametrics
docker compose -f deploy/docker/docker-compose.yaml logs -f loki
docker compose -f deploy/docker/docker-compose.yaml logs -f tempo
# what is actually being forwarded?
docker compose -f deploy/docker/docker-compose.yaml logs agent | grep 'demand filter' | tail -20
# restart just the collector
docker compose -f deploy/docker/docker-compose.yaml restart agent
# stop, keeping the named volumes (vmdata, lokidata, tempodata)
docker compose -f deploy/docker/docker-compose.yaml down

allowed=0 on a fresh agent is normal and correct — nothing is forwarded until a dashboard or alert demands it. The local stores keep receiving everything either way.

The local stores are reachable on the host at http://localhost:8428 (metrics), http://localhost:3100 (logs), and http://localhost:3200 (traces) — see Linux for queries that work against any of them.

Was this page helpful?