This integration collects data from Traefik in order to check its health and monitor:
If you are using Agent v6.8+ follow the instructions below to install the Traefik check on your host. See our dedicated Agent guide for installing community integrations to install checks with the Agent prior v6.8 or the Docker Agent:
Install the developer toolkit.
Clone the integrations-extras repository:
git clone https://github.com/DataDog/integrations-extras.git.
ddev config with the
ddev config set extras ./integrations-extras
To build the
traefik package, run:
ddev -e release build traefik
Run the following command to install the integrations wheel with the Agent:
datadog-agent integration install -w <PATH_OF_TRAEFIK_ARTIFACT_>/<TRAEFIK_ARTIFACT_NAME>.whl
Configure your integration like any other packaged integration.
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.
Add this configuration setup to your
traefik.yaml file to start gathering your metrics:
init_config: instances: - host: 10.1.2.3 port: "8080" path: "/health" scheme: "http"
Restart the Agent to begin sending Traefik metrics to Datadog.
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
To configure Traefik to log to a file, add the following in the Traefik configuration file:
[traefikLog] filePath = "/path/to/traefik.log"
The common Apache Access format is used by default and is supported by this integration.
Collecting logs is disabled by default in the Datadog Agent. Enable it in your
datadog.yaml file with:
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:
logs: - type: file path: /path/to/traefik.log source: traefik service: traefik
service parameter values and configure them for your environment.
Run the Agent’s
status subcommand and look for
traefik under the Checks section.
The check is compatible with all major platforms.
|total count for each returned status code|
|count total number of requests|
The Traefik check does not include any events.
Query Traefik and expect
200 as return status code.
Refer to the main documentation for more details about how to test and develop Agent based integrations.