Agent Check Agent Check

Linux Mac OS Windows OS Supported


This integration collects data from Traefik in order to check its health and monitor:

  • Errors logs (4xx codes, 5xx codes)
  • Number of requests
  • Number of bytes exchanged


The Traefik check is not included in the Datadog Agent package, so you need to install it.


For Agent v7.21+ / v6.21+, follow the instructions below to install the Traefik check on your host. See Use Community Integrations to install with the Docker Agent or earlier versions of the Agent.

  1. Run the following command to install the Agent integration:

    datadog-agent integration install -t datadog-traefik==<INTEGRATION_VERSION>
  2. Configure your integration similar to core integrations.


  1. Edit the traefik.d/conf.yaml file in the conf.d/ folder at the root of your Agent’s configuration directory to start collecting your Traefik metrics or logs. See the sample traefik.d/conf.yaml for all available configuration options.

  2. Restart the Agent.

Metric collection

Add this configuration setup to your traefik.yaml file to start gathering your metrics:


  - host:
    port: "8080"
    path: "/health"
    scheme: "http"

Configuration Options:

  • host: Traefik endpoint to query. Required
  • port: API listener of Traefik endpoint. Default value 8080. Optional
  • path: Path of Traefik health check endpoint. Default /health. Optional
  • scheme: Scheme of Traefik health check endpoint. Default http. Optional

Restart the Agent to begin sending Traefik metrics to Datadog.

Log collection

Available for Agent >6.0

By default Traefik logs are sent to stdout. This should not be changed for containerized version, as the Datadog Agent is able to collect logs directly from container stdout/stderr.

To configure Traefik to log to a file, add the following in the Traefik configuration file:

  filePath = "/path/to/traefik.log"

The common Apache Access format is used by default and is supported by this integration.

  1. Collecting logs is disabled by default in the Datadog Agent. Enable it in your datadog.yaml file with:

    logs_enabled: true
  2. Add this configuration block to your traefik.d/conf.yaml file at the root of your Agent’s configuration directory to start collecting your Traefik logs:

      - type: file
        path: /path/to/traefik.log
        source: traefik
        service: traefik

    Change the path and service parameter values and configure them for your environment.

  3. Restart the Agent


Run the Agent’s status subcommand and look for traefik under the Checks section.


The check is compatible with all major platforms.

Data Collected


total count for each returned status code
count total number of requests


The Traefik check does not include any events.

Service Checks

Returns ok if the Traefik is up, critical when down and unknown when unknown exception occurred.
Statuses: ok, critical, unknown


Need help? Contact Datadog support.