traefik/docs/content/observability/metrics/prometheus.md
2022-04-15 15:44:08 +02:00

2.6 KiB

title description
Traefik Prometheus Documentation Traefik supports several metrics backends, including Prometheus. Learn how to implement it for observability in Traefik Proxy. Read the technical documentation.

Prometheus

To enable the Prometheus:

metrics:
  prometheus: {}
[metrics]
  [metrics.prometheus]
--metrics.prometheus=true

buckets

Optional, Default="0.100000, 0.300000, 1.200000, 5.000000"

Buckets for latency metrics.

metrics:
  prometheus:
    buckets:
      - 0.1
      - 0.3
      - 1.2
      - 5.0
[metrics]
  [metrics.prometheus]
    buckets = [0.1,0.3,1.2,5.0]
--metrics.prometheus.buckets=0.1,0.3,1.2,5.0

addEntryPointsLabels

Optional, Default=true

Enable metrics on entry points.

metrics:
  prometheus:
    addEntryPointsLabels: true
[metrics]
  [metrics.prometheus]
    addEntryPointsLabels = true
--metrics.prometheus.addEntryPointsLabels=true

addRoutersLabels

Optional, Default=false

Enable metrics on routers.

metrics:
  prometheus:
    addRoutersLabels: true
[metrics]
  [metrics.prometheus]
    addRoutersLabels = true
--metrics.prometheus.addrouterslabels=true

addServicesLabels

Optional, Default=true

Enable metrics on services.

metrics:
  prometheus:
    addServicesLabels: true
[metrics]
  [metrics.prometheus]
    addServicesLabels = true
--metrics.prometheus.addServicesLabels=true

entryPoint

Optional, Default=traefik

Entry point used to expose metrics.

entryPoints:
  metrics:
    address: :8082

metrics:
  prometheus:
    entryPoint: metrics
[entryPoints]
  [entryPoints.metrics]
    address = ":8082"

[metrics]
  [metrics.prometheus]
    entryPoint = "metrics"
--entryPoints.metrics.address=:8082
--metrics.prometheus.entryPoint=metrics

manualRouting

Optional, Default=false

If manualRouting is true, it disables the default internal router in order to allow one to create a custom router for the prometheus@internal service.

metrics:
  prometheus:
    manualRouting: true
[metrics]
  [metrics.prometheus]
    manualRouting = true
--metrics.prometheus.manualrouting=true