Better Stack Traefik logging
Running Docker or Kubernetes?
The Better Stack collector discovers Traefik by itself. Enable its Prometheus metrics and they arrive with a ready-made dashboard. This page sets up Vector for a Traefik source.
Start logging in 2 minutes
What you would like to collect from your Traefik?
Collect logs & metrics
Collect logs and metrics from your Traefik using Vector.
1. Configure Traefik
Add a metrics entrypoint to your traefik.yaml configuration file and write the logs to /var/log/traefik, where Vector reads them.
List the entrypoints that serve your traffic next to metrics. Defining entryPoints replaces Traefik's default http entrypoint on port 80.
2. Set up Vector
Select your platform:
Install and configure Vector on Ubuntu or Debian:
Curious about what the script does?
- Installs Vector using official package.
- Configures Vector for your Better Stack source.
- Enables and restarts Vector.
The script will ask for confirmation before making any changes.
You should see your logs in Better Stack → Live tail.
Collect only logs
Collect logs from your Traefik using Vector.
1. Write logs to files
Add this to your traefik.yaml configuration file to write the logs to /var/log/traefik, where Vector reads them.
2. Set up Vector
Select your platform:
Install and configure Vector on Ubuntu or Debian:
Curious about what the script does?
- Installs Vector using official package.
- Configures Vector for your Better Stack source.
- Enables and restarts Vector.
The script will ask for confirmation before making any changes.
You should see your logs in Better Stack → Live tail.
Need help?
Please let us know at hello@betterstack.com.
We're happy to help! 🙏