Integration
Traefik
Requests by entry point, router and service, status codes, request time, server health and every access log line.
- Category: Web servers
- How data is sent: Logthread Agent
- Runs on: Linux
- Status: Beta
How it works#
- Answer a few questions. They only fill in the setup steps. Nothing on this page connects to your servers: Logthread never reaches into your network.
- Run one command on the Traefik machine. The next page shows the command with this connector's ingest key filled in. It downloads the Logthread Agent from downloads.logthread.com and installs it as a service (Linux, as root with sudo). No other download.
- Data arrives. Everything is collected inside your environment. It is sent over outbound HTTPS (port 443) to ingest.logthread.com. Nothing is opened to the internet: no inbound ports, VPN or public access to your servers. The connection page shows what has arrived and turns Active with the first record.
What you answer#
| Question | Answer | Notes |
|---|---|---|
| Metrics address (optional) | Text | Default: 127.0.0.1:8082. The entry point that serves the Prometheus metrics. |
| Log folder (optional) | Text | Default: /var/log/traefik. |
| Labels (optional) | Text | To find and group servers on the Agents page, for example env=prod. |
| Manage this agent from Logthread | Yes or no | Change what it sends later from the Agents page, without signing in to the server. Default: Yes. |
Setup#
These are the steps for the default answers. In the app, they follow your answers, and the connector's ingest key replaces YOUR_INGEST_KEY.
Step 1. Turn on metrics and file logs. Traefik writes its access log to standard output unless it has a file path. JSON is the format the parser reads. With the command line, the same settings are --metrics.prometheus, --accesslog.filepath, --accesslog.format=json and --log.filepath.
traefik.yml:
# Static configuration (traefik.yml). Metrics on a local-only entry point:
entryPoints:
metrics:
address: "127.0.0.1:8082"
metrics:
prometheus:
entryPoint: metrics
accessLog:
filePath: /var/log/traefik/access.log
format: json
log:
filePath: /var/log/traefik/traefik.log
format: json
# then restart Traefik: sudo systemctl restart traefikStep 2. Install the Logthread Agent. On the Traefik host: it installs the agent with the Traefik and Linux host profiles. It scrapes 127.0.0.1:8082/metrics and reads access.log and traefik.log from /var/log/traefik.
curl -sSL https://downloads.logthread.com/agent/install.sh | sudo sh -s -- \
--key YOUR_INGEST_KEY --profiles linux-host,traefik --fleetStep 3. Parse the access log. Once lines arrive, attach the Traefik parser (Then add, below) so status, method, path, router, backend and duration_ms are fields. traefik.log is JSON as well, and the JSON parser reads it.
Step 4. If it runs in a container. The agent reads a log file and a metrics address on the host. Mount the log folder from the host into the container and publish the metrics port to the host on loopback only, "-p 127.0.0.1:PORT:PORT" (set the metrics address above to it). Never publish an admin or metrics port on a public interface. For Traefik: -v /var/log/traefik:/var/log/traefik, the metrics entry point address ":8082" inside the container and -p 127.0.0.1:8082:8082. In Kubernetes, the Kubernetes connector reads the pod log. Instead of a file, the Docker connector reads the container output: the parser applies to those lines, but they arrive as service "docker", so this integration's dashboard and alert filters (service:<name>) do not see them until you edit those filters. Mounting the log folder is the recommended way.
Check that it works#
The connection page under Integrations counts what has arrived and turns Active with the first record. In Explore, search service:traefik.
Then add#
Each is one click on the connection page and opens with your data, so you can check it before saving.
- Dashboard: Traefik: Requests by entry point, status code and service, request time, open connections and server health from the Prometheus metrics, and the JSON access log (with the traefik-access parser). Logs read by the Docker connector arrive as service docker: mount the log folder instead, or edit the filters of the log panels.
- Parser: traefik-access (Pipelines → Library)
- Alert: Traefik 5xx responses:
service:traefik status>=500, at least 20 in 10 minutes
Price#
The integration itself has no charge. What it sends is billed as data ingested, ₹85 ($0.90) per GB on every plan, like any other data; parsing, detections and the dashboard add nothing. See Prices.
Set it up under Integrations in the app, or from an AI agent with MCP (add_integration). All integrations: Integrations guide. Next: find what it sends in Explore and live tail.