Skip to content

Agent configuration

The LeanSignal Agent is configured through three connection values plus a standard OpenTelemetry Collector configuration file. The installers set all of this up for you — this page is the reference for what each value means.

VariableRequiredDescription
LEANSIGNAL_TENANTYour tenant name — the <short-name> in <short-name>.leansignal.io. The agent derives every endpoint from it (see below).
LEANSIGNAL_AGENT_KEYAuthenticates the agent to your tenant — on the control stream and on all three ingest paths. Create it in the LeanSignal app under Agents.
LEANSIGNAL_AGENT_NAMELabels every metric, log, and trace from this agent with leansignal_agent_name — the label dashboards’ Instance filters commonly use. Independent of the agent record’s name in the LeanSignal app. The installers require it (--agent-name); Docker Compose defaults it to docker-agent.

How endpoints are derived. At startup the agent makes one HTTPS call to the LeanSignal control center (cc.leansignal.io) to look up which region hosts your tenant, then derives everything from the tenant name — the gRPC control host (<tenant>-grpc.<region>:443) and one ingest host per signal: <tenant>-metrics-ingest.<region>, <tenant>-logs-ingest.<region>, and <tenant>-traces-ingest.<region>. There is nothing else to configure, and moving an agent to another tenant means changing LEANSIGNAL_TENANT and restarting.

Every derived value can be overridden. Pins are useful for air-gapped DNS, private ingress, or removing the startup dependency on the control center — an agent with everything pinned (or the region pinned via LEANSIGNAL_DOMAIN) never calls it.

VariableOverridesFormat
LEANSIGNAL_DOMAINthe region lookup onlyregion domain, e.g. eu11.leansignal.io — hosts are still derived from the tenant name
LEANSIGNAL_ENDPOINTgRPC control hosthost:port, no scheme
LEANSIGNAL_DATAPLANE_ENDPOINTmetrics ingestbase origin, e.g. https://<tenant>-metrics-ingest.eu11.leansignal.io — the agent appends /api/v1/write
LEANSIGNAL_LOKI_ENDPOINTlogs ingestbase origin — the agent appends /otlp/v1/logs
LEANSIGNAL_TEMPO_ENDPOINTtraces ingestbase origin — the agent appends /v1/traces

The Linux installer takes these as --domain, --endpoint, --dataplane-endpoint, --loki-endpoint, and --tempo-endpoint; the Helm chart as leansignal.domain, leansignal.endpoint, dataplane.endpoint, logs.tenantEndpoint, and traces.tenantEndpoint.

Where the values live per install — each guide covers editing and restarting:

InstallLocation
Linux/etc/leansignal-agent/agent.env (mode 0600)
macOSEnvironmentVariables in /Library/LaunchDaemons/com.leansignal.agent.plist — launchd does not read agent.env
Windowsthe Environment registry value on the LeanSignalAgent service
Kubernetesleansignal.* Helm values; the key from leansignal.agentKey.value or an existing Secret
Docker Composeenvironment variables on the agent service
PortDirectionProtocolPurpose
4317inboundOTLP/gRPCmetrics, logs, and traces from your workloads
4318inboundOTLP/HTTPmetrics, logs, and traces from your workloads
3500 / 3600inboundLoki push (HTTP / gRPC)logs from Promtail/Alloy-style shippers
13133inbound (loopback)HTTPhealth check — curl -sf http://127.0.0.1:13133/
8428inbound (loopback)HTTPco-located VictoriaMetrics (local metrics store)
3100inbound (loopback)HTTPco-located Loki (local log store, ~1h window)
3200 / 4328inbound (loopback)HTTPco-located Tempo (local trace store, ~1h window): query / OTLP ingest. Host installs use 4328 because the collector owns 4317/4318; in Kubernetes, Tempo runs in its own pod and takes OTLP on 4318
443outboundgRPC + HTTPS, TLScontrol stream and demanded metrics, logs, and traces to LeanSignal

The agent dials out only — LeanSignal never connects in, so no inbound firewall rules are required for the control plane.

The OTLP receivers bind to 0.0.0.0 (all interfaces) on every install, so workloads on other hosts can forward telemetry to the agent — the gateway topology used by the integrations. They are unauthenticated by design, so keep the agent on a trusted or internal network, or firewall 4317/4318. To accept only local traffic, set the otlp receiver’s endpoint in the collector configuration to 127.0.0.1:4317 / 127.0.0.1:4318 and restart the agent.

The agent writes everything it receives to a co-located local store per signal. These buffers are what power discovery and edit-mode previews — the Available source on the Metrics, Logs, and Traces pages. Long-term storage happens in your central dataplane, which receives only the demanded subset.

SignalStoreWindow
MetricsVictoriaMetrics1 day, exact (--retentionPeriod=1d)
LogsLoki1 hour, exact (max_query_lookback: 1h)
TracesTempo~1 hour, approximate — deletion is compaction-driven, so queries may see a little more

None of these windows is configurable through the agent; change one by editing that store’s own configuration or service definition.

See Architecture.

The agent is an OpenTelemetry Collector distribution, so its pipeline is a regular collector configuration file. The shipped configuration receives OTLP and host metrics, indexes every timeseries, applies the demand filter, and exports to both the local store and the dataplane.

You can extend it with any receiver from the OpenTelemetry Collector Contrib set — the distribution bundles it in full, including the prometheus, mysql, and postgresql receivers used by the integrations. Each integration page shows a ready-made receiver configuration.

Where the file lives and how to reload it after editing: Linux · macOS · Windows · Kubernetes (Helm values, not a file).

You don’t have to SSH in to change a collector configuration. Admins can read and edit the file the agent is actually running from the LeanSignal app — Agents, open the agent, Configuration tab — or with leanctl agent config get|apply. Both reach the file on the agent host over the agent’s own control stream, so they work wherever the agent does; the agent must be Connected.

The agent validates every write before applying it — a YAML parse plus a full collector dry-run of the merged configuration. A rejected write changes nothing on the host and comes back with the validator’s own message. An accepted one keeps the previous contents as <path>.bak, writes atomically, and then restarts the agent to apply — expect a few seconds of downtime on the OTLP receivers. The service manager brings it back automatically: systemd and launchd installs restart on exit, the Windows service does too, and the shipped Docker Compose file carries restart: unless-stopped — keep that policy if you run the container your own way.

A configuration mounted read-only — typically a Kubernetes ConfigMap — is shown read-only in the app: a write to it could not stick (GitOps would revert it on the next sync). Change those through their Helm values or ConfigMap instead.

Configure your application’s OpenTelemetry SDK (or a local collector) to export OTLP to the agent:

Terminal window
export OTEL_EXPORTER_OTLP_ENDPOINT="http://<agent-host>:4317" # gRPC, or :4318 for HTTP
export OTEL_SERVICE_NAME="my-service"

The integration pages cover per-language setup, including the instrumentation packages and the metric names each runtime emits.

Was this page helpful?