Metrics

Traefik supports these metrics backends:

Global Metrics

MetricTypeDescription
Config reload totalCountThe total count of configuration reloads.
Config reload last successGaugeThe timestamp of the last configuration reload success.
TLS certificates not afterGaugeThe expiration date of certificates.

Prometheus

  1. traefik_config_reloads_total
  2. traefik_config_last_reload_success
  3. traefik_tls_certs_not_after

Datadog

  1. config.reload.total
  2. config.reload.lastSuccessTimestamp
  3. tls.certs.notAfterTimestamp

InfluxDB / InfluxDB2

  1. traefik.config.reload.total
  2. traefik.config.reload.lastSuccessTimestamp
  3. traefik.tls.certs.notAfterTimestamp

StatsD

  1. # Default prefix: "traefik"
  2. {prefix}.config.reload.total
  3. {prefix}.config.reload.lastSuccessTimestamp
  4. {prefix}.tls.certs.notAfterTimestamp

EntryPoint Metrics

MetricTypeLabelsDescription
Requests totalCountcode, method, protocol, entrypointThe total count of HTTP requests received by an entrypoint.
Requests TLS totalCounttls_version, tls_cipher, entrypointThe total count of HTTPS requests received by an entrypoint.
Request durationHistogramcode, method, protocol, entrypointRequest processing duration histogram on an entrypoint.
Open connectionsCountmethod, protocol, entrypointThe current count of open connections on an entrypoint.
Requests bytes totalCountcode, method, protocol, entrypointThe total size of HTTP requests in bytes handled by an entrypoint.
Responses bytes totalCountcode, method, protocol, entrypointThe total size of HTTP responses in bytes handled by an entrypoint.

Prometheus

  1. traefik_entrypoint_requests_total
  2. traefik_entrypoint_requests_tls_total
  3. traefik_entrypoint_request_duration_seconds
  4. traefik_entrypoint_open_connections
  5. traefik_entrypoint_requests_bytes_total
  6. traefik_entrypoint_responses_bytes_total

Datadog

  1. entrypoint.request.total
  2. entrypoint.request.tls.total
  3. entrypoint.request.duration
  4. entrypoint.connections.open
  5. entrypoint.requests.bytes.total
  6. entrypoint.responses.bytes.total

InfluxDB / InfluxDB2

  1. traefik.entrypoint.requests.total
  2. traefik.entrypoint.requests.tls.total
  3. traefik.entrypoint.request.duration
  4. traefik.entrypoint.connections.open
  5. traefik.entrypoint.requests.bytes.total
  6. traefik.entrypoint.responses.bytes.total

StatsD

  1. # Default prefix: "traefik"
  2. {prefix}.entrypoint.request.total
  3. {prefix}.entrypoint.request.tls.total
  4. {prefix}.entrypoint.request.duration
  5. {prefix}.entrypoint.connections.open
  6. {prefix}.entrypoint.requests.bytes.total
  7. {prefix}.entrypoint.responses.bytes.total

Router Metrics

MetricTypeLabelsDescription
Requests totalCountcode, method, protocol, router, serviceThe total count of HTTP requests handled by a router.
Requests TLS totalCounttls_version, tls_cipher, router, serviceThe total count of HTTPS requests handled by a router.
Request durationHistogramcode, method, protocol, router, serviceRequest processing duration histogram on a router.
Open connectionsCountmethod, protocol, router, serviceThe current count of open connections on a router.
Requests bytes totalCountcode, method, protocol, router, serviceThe total size of HTTP requests in bytes handled by a router.
Responses bytes totalCountcode, method, protocol, router, serviceThe total size of HTTP responses in bytes handled by a router.

Prometheus

  1. traefik_router_requests_total
  2. traefik_router_requests_tls_total
  3. traefik_router_request_duration_seconds
  4. traefik_router_open_connections
  5. traefik_router_requests_bytes_total
  6. traefik_router_responses_bytes_total

Datadog

  1. router.request.total
  2. router.request.tls.total
  3. router.request.duration
  4. router.connections.open
  5. router.requests.bytes.total
  6. router.responses.bytes.total

InfluxDB / InfluxDB2

  1. traefik.router.requests.total
  2. traefik.router.requests.tls.total
  3. traefik.router.request.duration
  4. traefik.router.connections.open
  5. traefik.router.requests.bytes.total
  6. traefik.router.responses.bytes.total

StatsD

  1. # Default prefix: "traefik"
  2. {prefix}.router.request.total
  3. {prefix}.router.request.tls.total
  4. {prefix}.router.request.duration
  5. {prefix}.router.connections.open
  6. {prefix}.router.requests.bytes.total
  7. {prefix}.router.responses.bytes.total

Service Metrics

MetricTypeLabelsDescription
Requests totalCountcode, method, protocol, serviceThe total count of HTTP requests processed on a service.
Requests TLS totalCounttls_version, tls_cipher, serviceThe total count of HTTPS requests processed on a service.
Request durationHistogramcode, method, protocol, serviceRequest processing duration histogram on a service.
Open connectionsCountmethod, protocol, serviceThe current count of open connections on a service.
Retries totalCountserviceThe count of requests retries on a service.
Server UPGaugeservice, urlCurrent service’s server status, 0 for a down or 1 for up.
Requests bytes totalCountcode, method, protocol, serviceThe total size of requests in bytes received by a service.
Responses bytes totalCountcode, method, protocol, serviceThe total size of responses in bytes returned by a service.

Prometheus

  1. traefik_service_requests_total
  2. traefik_service_requests_tls_total
  3. traefik_service_request_duration_seconds
  4. traefik_service_open_connections
  5. traefik_service_retries_total
  6. traefik_service_server_up
  7. traefik_service_requests_bytes_total
  8. traefik_service_responses_bytes_total

Datadog

  1. service.request.total
  2. router.service.tls.total
  3. service.request.duration
  4. service.connections.open
  5. service.retries.total
  6. service.server.up
  7. service.requests.bytes.total
  8. service.responses.bytes.total

InfluxDB / InfluxDB2

  1. traefik.service.requests.total
  2. traefik.service.requests.tls.total
  3. traefik.service.request.duration
  4. traefik.service.connections.open
  5. traefik.service.retries.total
  6. traefik.service.server.up
  7. traefik.service.requests.bytes.total
  8. traefik.service.responses.bytes.total

StatsD

  1. # Default prefix: "traefik"
  2. {prefix}.service.request.total
  3. {prefix}.service.request.tls.total
  4. {prefix}.service.request.duration
  5. {prefix}.service.connections.open
  6. {prefix}.service.retries.total
  7. {prefix}.service.server.up
  8. {prefix}.service.requests.bytes.total
  9. {prefix}.service.responses.bytes.total

Labels

Here is a comprehensive list of labels that are provided by the metrics:

LabelDescriptionexample
cnCertificate Common Name“example.com”
codeRequest code“200”
entrypointEntrypoint that handled the request“example_entrypoint”
methodRequest Method“GET”
protocolRequest protocol“http”
routerRouter that handled the request“example_router”
sansCertificate Subject Alternative NameS“example.com”
serialCertificate Serial Number“123…”
serviceService that handled the request“example_service@provider”
tls_cipherTLS cipher used for the request“TLS_FALLBACK_SCSV”
tls_versionTLS version used for the request“1.0”
urlService server urlhttp://example.com

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 or the PRI verb (for HTTP/2), then the value for the method label becomes EXTENSION_METHOD.