Co-authored-by: OmarElawady <omarelawady1998@gmail.com> Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com> Co-authored-by: Romain <rtribotte@users.noreply.github.com>
16 KiB
title | description |
---|---|
Traefik Metrics Overview | Traefik Proxy supports four metrics backend systems: Datadog, InfluxDB, Prometheus, and StatsD. Read the full documentation to get started. |
Metrics
Traefik supports 4 metrics backends:
Global Metrics
Metric | DataDog | InfluxDB / InfluxDB2 | Prometheus | StatsD |
---|---|---|---|---|
Configuration reloads | ✓ | ✓ | ✓ | ✓ |
Last Configuration Reload Success | ✓ | ✓ | ✓ | ✓ |
TLS certificates expiration | ✓ | ✓ | ✓ | ✓ |
Configuration Reloads
The total count of configuration reloads.
config.reload.total
traefik.config.reload.total
traefik_config_reloads_total
# Default prefix: "traefik"
{prefix}.config.reload.total
Last Configuration Reload Success
The timestamp of the last configuration reload success.
config.reload.lastSuccessTimestamp
traefik.config.reload.lastSuccessTimestamp
traefik_config_last_reload_success
# Default prefix: "traefik"
{prefix}.config.reload.lastSuccessTimestamp
TLS certificates expiration
The expiration date of certificates.
Labels: cn
, sans
, serial
.
tls.certs.notAfterTimestamp
traefik.tls.certs.notAfterTimestamp
traefik_tls_certs_not_after
# Default prefix: "traefik"
{prefix}.tls.certs.notAfterTimestamp
EntryPoint Metrics
Metric | DataDog | InfluxDB / InfluxDB2 | Prometheus | StatsD |
---|---|---|---|---|
HTTP Requests Count | ✓ | ✓ | ✓ | ✓ |
HTTPS Requests Count | ✓ | ✓ | ✓ | ✓ |
Request Duration Histogram | ✓ | ✓ | ✓ | ✓ |
Open Connections Count | ✓ | ✓ | ✓ | ✓ |
Requests Bytes Count | ✓ | ✓ | ✓ | ✓ |
Responses Bytes Count | ✓ | ✓ | ✓ | ✓ |
HTTP Requests Count
The total count of HTTP requests received by an entrypoint.
Labels: code
, method
, protocol
, entrypoint
.
entrypoint.request.total
traefik.entrypoint.requests.total
traefik_entrypoint_requests_total
# Default prefix: "traefik"
{prefix}.entrypoint.request.total
HTTPS Requests Count
The total count of HTTPS requests received by an entrypoint.
Labels: tls_version
, tls_cipher
, entrypoint
.
entrypoint.request.tls.total
traefik.entrypoint.requests.tls.total
traefik_entrypoint_requests_tls_total
# Default prefix: "traefik"
{prefix}.entrypoint.request.tls.total
Request Duration Histogram
Request processing duration histogram on an entrypoint.
Labels: code
, method
, protocol
, entrypoint
.
entrypoint.request.duration
traefik.entrypoint.request.duration
traefik_entrypoint_request_duration_seconds
# Default prefix: "traefik"
{prefix}.entrypoint.request.duration
Open Connections Count
The current count of open connections on an entrypoint.
Labels: method
, protocol
, entrypoint
.
entrypoint.connections.open
traefik.entrypoint.connections.open
traefik_entrypoint_open_connections
# Default prefix: "traefik"
{prefix}.entrypoint.connections.open
Requests Bytes Count
The total size of HTTP requests in bytes handled by an entrypoint.
Labels: code
, method
, protocol
, entrypoint
.
entrypoint.requests.bytes.total
traefik.entrypoint.requests.bytes.total
traefik_entrypoint_requests_bytes_total
# Default prefix: "traefik"
{prefix}.entrypoint.requests.bytes.total
Responses Bytes Count
The total size of HTTP responses in bytes handled by an entrypoint.
Labels: code
, method
, protocol
, entrypoint
.
entrypoint.responses.bytes.total
traefik.entrypoint.responses.bytes.total
traefik_entrypoint_responses_bytes_total
# Default prefix: "traefik"
{prefix}.entrypoint.responses.bytes.total
Router Metrics
Metric | DataDog | InfluxDB / InfluxDB2 | Prometheus | StatsD |
---|---|---|---|---|
HTTP Requests Count | ✓ | ✓ | ✓ | ✓ |
HTTPS Requests Count | ✓ | ✓ | ✓ | ✓ |
Request Duration Histogram | ✓ | ✓ | ✓ | ✓ |
Open Connections Count | ✓ | ✓ | ✓ | ✓ |
Requests Bytes Count | ✓ | ✓ | ✓ | ✓ |
Responses Bytes Count | ✓ | ✓ | ✓ | ✓ |
HTTP Requests Count
The total count of HTTP requests handled by a router.
Labels: code
, method
, protocol
, router
, service
.
router.request.total
traefik.router.requests.total
traefik_router_requests_total
# Default prefix: "traefik"
{prefix}.router.request.total
HTTPS Requests Count
The total count of HTTPS requests handled by a router.
Labels: tls_version
, tls_cipher
, router
, service
.
router.request.tls.total
traefik.router.requests.tls.total
traefik_router_requests_tls_total
# Default prefix: "traefik"
{prefix}.router.request.tls.total
Request Duration Histogram
Request processing duration histogram on a router.
Labels: code
, method
, protocol
, router
, service
.
router.request.duration
traefik.router.request.duration
traefik_router_request_duration_seconds
# Default prefix: "traefik"
{prefix}.router.request.duration
Open Connections Count
The current count of open connections on a router.
Labels: method
, protocol
, router
, service
.
router.connections.open
traefik.router.connections.open
traefik_router_open_connections
# Default prefix: "traefik"
{prefix}.router.connections.open
Requests Bytes Count
The total size of HTTP requests in bytes handled by a router.
Labels: code
, method
, protocol
, router
, service
.
router.requests.bytes.total
traefik.router.requests.bytes.total
traefik_router_requests_bytes_total
# Default prefix: "traefik"
{prefix}.router.requests.bytes.total
Responses Bytes Count
The total size of HTTP responses in bytes handled by a router.
Labels: code
, method
, protocol
, router
, service
.
router.responses.bytes.total
traefik.router.responses.bytes.total
traefik_router_responses_bytes_total
# Default prefix: "traefik"
{prefix}.router.responses.bytes.total
Service Metrics
Metric | DataDog | InfluxDB / InfluxDB2 | Prometheus | StatsD |
---|---|---|---|---|
HTTP Requests Count | ✓ | ✓ | ✓ | ✓ |
HTTPS Requests Count | ✓ | ✓ | ✓ | ✓ |
Request Duration Histogram | ✓ | ✓ | ✓ | ✓ |
Open Connections Count | ✓ | ✓ | ✓ | ✓ |
Requests Retries Count | ✓ | ✓ | ✓ | ✓ |
Service Server UP | ✓ | ✓ | ✓ | ✓ |
Requests Bytes Count | ✓ | ✓ | ✓ | ✓ |
Responses outgoing traffic | ✓ | ✓ | ✓ | ✓ |
HTTP Requests Count
The total count of HTTP requests processed on a service.
Labels: code
, method
, protocol
, service
.
service.request.total
traefik.service.requests.total
traefik_service_requests_total
# Default prefix: "traefik"
{prefix}.service.request.total
HTTPS Requests Count
The total count of HTTPS requests processed on a service.
Labels: tls_version
, tls_cipher
, service
.
router.service.tls.total
traefik.service.requests.tls.total
traefik_service_requests_tls_total
# Default prefix: "traefik"
{prefix}.service.request.tls.total
Request Duration Histogram
Request processing duration histogram on a service.
Labels: code
, method
, protocol
, service
.
service.request.duration
traefik.service.request.duration
traefik_service_request_duration_seconds
# Default prefix: "traefik"
{prefix}.service.request.duration
Open Connections Count
The current count of open connections on a service.
Labels: method
, protocol
, service
.
service.connections.open
traefik.service.connections.open
traefik_service_open_connections
# Default prefix: "traefik"
{prefix}.service.connections.open
Requests Retries Count
The count of requests retries on a service.
Labels: service
.
service.retries.total
traefik.service.retries.total
traefik_service_retries_total
# Default prefix: "traefik"
{prefix}.service.retries.total
Service Server UP
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.
Labels: service
, url
.
service.server.up
traefik.service.server.up
traefik_service_server_up
# Default prefix: "traefik"
{prefix}.service.server.up
Requests Bytes Count
The total size of requests in bytes received by a service.
Labels: code
, method
, protocol
, service
.
service.requests.bytes.total
traefik.service.requests.bytes.total
traefik_service_requests_bytes_total
# Default prefix: "traefik"
{prefix}.service.requests.bytes.total
Responses Bytes Count
The total size of responses in bytes returned by a service.
Labels: code
, method
, protocol
, service
.
service.responses.bytes.total
traefik.service.responses.bytes.total
traefik_service_responses_bytes_total
# Default prefix: "traefik"
{prefix}.service.responses.bytes.total
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`.