2019-07-18 19:36:05 +00:00
# Metrics
Traefik supports 4 metrics backends:
2019-09-02 10:18:04 +00:00
- [Datadog ](./datadog.md )
2019-07-18 19:36:05 +00:00
- [InfluxDB ](./influxdb.md )
- [Prometheus ](./prometheus.md )
- [StatsD ](./statsd.md )
2022-02-03 14:16:12 +00:00
## Global Metrics
2021-03-25 15:52:04 +00:00
| Metric | DataDog | InfluxDB | Prometheus | StatsD |
|-------------------------------------------------------------------------|---------|----------|------------|--------|
| [Configuration reloads ](#configuration-reloads ) | ✓ | ✓ | ✓ | ✓ |
| [Last Configuration Reload Success ](#last-configuration-reload-success ) | ✓ | ✓ | ✓ | ✓ |
2022-02-03 14:16:12 +00:00
| [TLS certificates expiration ](#tls-certificates-expiration ) | ✓ | ✓ | ✓ | ✓ |
2021-03-25 15:52:04 +00:00
### Configuration Reloads
2022-02-03 14:16:12 +00:00
2021-03-25 15:52:04 +00:00
The total count of configuration reloads.
```dd tab="Datadog"
config.reload.total
```
2022-01-21 08:54:07 +00:00
```influxdb tab="InfluxDB"
2021-03-25 15:52:04 +00:00
traefik.config.reload.total
```
```prom tab="Prometheus"
traefik_config_reloads_total
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.config.reload.total
```
### Last Configuration Reload Success
2022-02-03 14:16:12 +00:00
2021-03-25 15:52:04 +00:00
The timestamp of the last configuration reload success.
```dd tab="Datadog"
config.reload.lastSuccessTimestamp
```
2022-01-21 08:54:07 +00:00
```influxdb tab="InfluxDB"
2021-03-25 15:52:04 +00:00
traefik.config.reload.lastSuccessTimestamp
```
```prom tab="Prometheus"
traefik_config_last_reload_success
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.config.reload.lastSuccessTimestamp
```
2022-02-03 14:16:12 +00:00
### TLS certificates expiration
The expiration date of certificates.
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `cn` , `sans` , `serial` .
2021-03-25 15:52:04 +00:00
```dd tab="Datadog"
2022-02-03 14:16:12 +00:00
tls.certs.notAfterTimestamp
2021-03-25 15:52:04 +00:00
```
2022-01-21 08:54:07 +00:00
```influxdb tab="InfluxDB"
2022-02-03 14:16:12 +00:00
traefik.tls.certs.notAfterTimestamp
2021-03-25 15:52:04 +00:00
```
```prom tab="Prometheus"
2022-02-03 14:16:12 +00:00
traefik_tls_certs_not_after
2021-03-25 15:52:04 +00:00
```
```statsd tab="StatsD"
# Default prefix: "traefik"
2022-02-03 14:16:12 +00:00
{prefix}.tls.certs.notAfterTimestamp
2021-03-25 15:52:04 +00:00
```
## EntryPoint Metrics
| Metric | DataDog | InfluxDB | Prometheus | StatsD |
|-----------------------------------------------------------|---------|----------|------------|--------|
| [HTTP Requests Count ](#http-requests-count ) | ✓ | ✓ | ✓ | ✓ |
2022-02-03 14:16:12 +00:00
| [HTTPS Requests Count ](#https-requests-count ) | ✓ | ✓ | ✓ | ✓ |
2021-03-25 15:52:04 +00:00
| [Request Duration Histogram ](#request-duration-histogram ) | ✓ | ✓ | ✓ | ✓ |
| [Open Connections Count ](#open-connections-count ) | ✓ | ✓ | ✓ | ✓ |
### HTTP Requests Count
2022-02-03 14:16:12 +00:00
The total count of HTTP requests received by an entrypoint.
2021-03-25 15:52:04 +00:00
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `code` , `method` , `protocol` , `entrypoint` .
2021-03-25 15:52:04 +00:00
```dd tab="Datadog"
entrypoint.request.total
```
2022-01-21 08:54:07 +00:00
```influxdb tab="InfluxDB"
2021-03-25 15:52:04 +00:00
traefik.entrypoint.requests.total
```
```prom tab="Prometheus"
traefik_entrypoint_requests_total
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.entrypoint.request.total
```
### HTTPS Requests Count
2022-02-03 14:16:12 +00:00
The total count of HTTPS requests received by an entrypoint.
2021-03-25 15:52:04 +00:00
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `tls_version` , `tls_cipher` , `entrypoint` .
2021-03-25 15:52:04 +00:00
2022-02-03 14:16:12 +00:00
```dd tab="Datadog"
entrypoint.request.tls.total
```
```influxdb tab="InfluxDB"
traefik.entrypoint.requests.tls.total
```
2021-03-25 15:52:04 +00:00
```prom tab="Prometheus"
traefik_entrypoint_requests_tls_total
```
2022-02-03 14:16:12 +00:00
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.entrypoint.request.tls.total
```
2021-03-25 15:52:04 +00:00
### Request Duration Histogram
2022-02-03 14:16:12 +00:00
Request processing duration histogram on an entrypoint.
2021-03-25 15:52:04 +00:00
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `code` , `method` , `protocol` , `entrypoint` .
2021-03-25 15:52:04 +00:00
```dd tab="Datadog"
entrypoint.request.duration
```
2022-01-21 08:54:07 +00:00
```influxdb tab="InfluxDB"
2021-03-25 15:52:04 +00:00
traefik.entrypoint.request.duration
```
```prom tab="Prometheus"
traefik_entrypoint_request_duration_seconds
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.entrypoint.request.duration
```
### Open Connections Count
2022-02-03 14:16:12 +00:00
2021-03-25 15:52:04 +00:00
The current count of open connections on an entrypoint.
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `method` , `protocol` , `entrypoint` .
2021-03-25 15:52:04 +00:00
```dd tab="Datadog"
entrypoint.connections.open
```
2022-01-21 08:54:07 +00:00
```influxdb tab="InfluxDB"
2021-03-25 15:52:04 +00:00
traefik.entrypoint.connections.open
```
```prom tab="Prometheus"
traefik_entrypoint_open_connections
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.entrypoint.connections.open
```
2022-02-03 14:16:12 +00:00
## Router Metrics
2021-03-25 15:52:04 +00:00
| Metric | DataDog | InfluxDB | Prometheus | StatsD |
|-------------------------------------------------------------|---------|----------|------------|--------|
| [HTTP Requests Count ](#http-requests-count_1 ) | ✓ | ✓ | ✓ | ✓ |
2022-02-03 14:16:12 +00:00
| [HTTPS Requests Count ](#https-requests-count_1 ) | ✓ | ✓ | ✓ | ✓ |
2021-03-25 15:52:04 +00:00
| [Request Duration Histogram ](#request-duration-histogram_1 ) | ✓ | ✓ | ✓ | ✓ |
| [Open Connections Count ](#open-connections-count_1 ) | ✓ | ✓ | ✓ | ✓ |
2022-02-03 14:16:12 +00:00
### HTTP Requests Count
The total count of HTTP requests handled by a router.
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `code` , `method` , `protocol` , `router` , `service` .
2022-02-03 14:16:12 +00:00
```dd tab="Datadog"
router.request.total
```
```influxdb tab="InfluxDB"
traefik.router.requests.total
```
```prom tab="Prometheus"
traefik_router_requests_total
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.router.request.total
```
### HTTPS Requests Count
The total count of HTTPS requests handled by a router.
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `tls_version` , `tls_cipher` , `router` , `service` .
2022-02-03 14:16:12 +00:00
```dd tab="Datadog"
router.request.tls.total
```
```influxdb tab="InfluxDB"
traefik.router.requests.tls.total
```
```prom tab="Prometheus"
traefik_router_requests_tls_total
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.router.request.tls.total
```
### Request Duration Histogram
Request processing duration histogram on a router.
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `code` , `method` , `protocol` , `router` , `service` .
2022-02-03 14:16:12 +00:00
```dd tab="Datadog"
router.request.duration
```
```influxdb tab="InfluxDB"
traefik.router.request.duration
```
```prom tab="Prometheus"
traefik_router_request_duration_seconds
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.router.request.duration
```
### Open Connections Count
The current count of open connections on a router.
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `method` , `protocol` , `router` , `service` .
2022-02-03 14:16:12 +00:00
```dd tab="Datadog"
router.connections.open
```
```influxdb tab="InfluxDB"
traefik.router.connections.open
```
```prom tab="Prometheus"
traefik_router_open_connections
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.router.connections.open
```
## Service Metrics
| Metric | DataDog | InfluxDB | Prometheus | StatsD |
|-------------------------------------------------------------|---------|----------|------------|--------|
| [HTTP Requests Count ](#http-requests-count_2 ) | ✓ | ✓ | ✓ | ✓ |
| [HTTPS Requests Count ](#https-requests-count_2 ) | ✓ | ✓ | ✓ | ✓ |
| [Request Duration Histogram ](#request-duration-histogram_2 ) | ✓ | ✓ | ✓ | ✓ |
| [Open Connections Count ](#open-connections-count_2 ) | ✓ | ✓ | ✓ | ✓ |
2021-03-25 15:52:04 +00:00
| [Requests Retries Count ](#requests-retries-count ) | ✓ | ✓ | ✓ | ✓ |
| [Service Server UP ](#service-server-up ) | ✓ | ✓ | ✓ | ✓ |
### HTTP Requests Count
2022-02-03 14:16:12 +00:00
2021-03-25 15:52:04 +00:00
The total count of HTTP requests processed on a service.
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `code` , `method` , `protocol` , `service` .
2021-03-25 15:52:04 +00:00
```dd tab="Datadog"
service.request.total
```
2022-01-21 08:54:07 +00:00
```influxdb tab="InfluxDB"
2021-03-25 15:52:04 +00:00
traefik.service.requests.total
```
```prom tab="Prometheus"
traefik_service_requests_total
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.service.request.total
```
### HTTPS Requests Count
2022-02-03 14:16:12 +00:00
2021-03-25 15:52:04 +00:00
The total count of HTTPS requests processed on a service.
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `tls_version` , `tls_cipher` , `service` .
2021-03-25 15:52:04 +00:00
2022-02-03 14:16:12 +00:00
```dd tab="Datadog"
router.service.tls.total
```
```influxdb tab="InfluxDB"
traefik.service.requests.tls.total
```
2021-03-25 15:52:04 +00:00
```prom tab="Prometheus"
traefik_service_requests_tls_total
```
2022-02-03 14:16:12 +00:00
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.service.request.tls.total
```
2021-03-25 15:52:04 +00:00
### Request Duration Histogram
2022-02-03 14:16:12 +00:00
Request processing duration histogram on a service.
2021-03-25 15:52:04 +00:00
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `code` , `method` , `protocol` , `service` .
2021-03-25 15:52:04 +00:00
```dd tab="Datadog"
service.request.duration
```
2022-01-21 08:54:07 +00:00
```influxdb tab="InfluxDB"
2021-03-25 15:52:04 +00:00
traefik.service.request.duration
```
```prom tab="Prometheus"
traefik_service_request_duration_seconds
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.service.request.duration
```
### Open Connections Count
2022-02-03 14:16:12 +00:00
2021-03-25 15:52:04 +00:00
The current count of open connections on a service.
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `method` , `protocol` , `service` .
2021-03-25 15:52:04 +00:00
```dd tab="Datadog"
service.connections.open
```
2022-01-21 08:54:07 +00:00
```influxdb tab="InfluxDB"
2021-03-25 15:52:04 +00:00
traefik.service.connections.open
```
```prom tab="Prometheus"
traefik_service_open_connections
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.service.connections.open
```
### Requests Retries Count
2022-02-03 14:16:12 +00:00
2021-03-25 15:52:04 +00:00
The count of requests retries on a service.
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `service` .
2021-03-25 15:52:04 +00:00
```dd tab="Datadog"
service.retries.total
```
2022-01-21 08:54:07 +00:00
```influxdb tab="InfluxDB"
2021-03-25 15:52:04 +00:00
traefik.service.retries.total
```
```prom tab="Prometheus"
traefik_service_retries_total
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.service.retries.total
```
### Service Server UP
2022-02-03 14:16:12 +00:00
2021-03-25 15:52:04 +00:00
Current service's server status, described by a gauge with a value of 0 for a down server or a value of 1 for an up server.
2022-02-09 08:58:08 +00:00
[Labels ](#labels ): `service` , `url` .
2021-03-25 15:52:04 +00:00
```dd tab="Datadog"
service.server.up
```
2022-01-21 08:54:07 +00:00
```influxdb tab="InfluxDB"
2021-03-25 15:52:04 +00:00
traefik.service.server.up
```
```prom tab="Prometheus"
traefik_service_server_up
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.service.server.up
```
2022-02-09 08:58:08 +00:00
## Labels
Here is a comprehensive list of labels that are provided by the metrics:
| Label | Description | example |
|---------------|---------------------------------------|----------------------------|
| `cn` | Certificate Common Name | "example.com" |
| `code` | Request code | "200" |
| `entrypoint` | Entrypoint that handled the request | "example_entrypoint" |
| `method` | Request Method | "GET" |
| `protocol` | Request protocol | "http" |
| `router` | Router that handled the request | "example_router" |
| `sans` | Certificate Subject Alternative NameS | "example.com" |
| `serial` | Certificate Serial Number | "123..." |
| `service` | Service that handled the request | "example_service@provider" |
| `tls_cipher` | TLS cipher used for the request | "TLS_FALLBACK_SCSV" |
| `tls_version` | TLS version used for the request | "1.0" |
| `url` | Service server url | "http://example.com" |
!!! info "`method` label value"
If the HTTP method verb on a request is not one defined in the set of common methods for [`HTTP/1.1` ](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods )
or the [`PRI` ](https://datatracker.ietf.org/doc/html/rfc7540#section-11.6 ) verb (for `HTTP/2` ),
then the value for the method label becomes `EXTENSION_METHOD` .