Better Stack Traefik logging

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. Expose metrics from Traefik

Add metrics entrypoint to your traefik.yaml configuration file.

Add metrics entrypoint to your traefik.yaml
entryPoints:
  metrics:
    address: ":8082"

metrics:
  prometheus:
    entryPoint: metrics
Restart Traefik
traefik --configFile=traefik.yaml

2. Set up Vector

Select your platform:

Install and configure Vector on Ubuntu or Debian:

Set up Vector
curl -sSL https://telemetry.betterstack.com/setup-vector/traefik_with_metrics/$SOURCE_TOKEN \
  -o /tmp/setup-vector.sh && \
  bash /tmp/setup-vector.sh

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.

Select your platform:

Install and configure Vector on Ubuntu or Debian:

Set up Vector
curl -sSL https://telemetry.betterstack.com/setup-vector/traefik/$SOURCE_TOKEN \
  -o /tmp/setup-vector.sh && \
  bash /tmp/setup-vector.sh

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 β†’ Logs & traces.

Need help?

Please let us know at hello@betterstack.com.
We're happy to help! πŸ™