traefik/docs/content/observability/metrics/prometheus.md
Ludovic Fernandez 424e2a9439 Add internal provider
Co-authored-by: Julien Salleyron <julien.salleyron@gmail.com>
2019-11-14 16:40:05 +01:00

2.1 KiB

Prometheus

To enable the Prometheus:

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

buckets

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

Buckets for latency metrics.

[metrics]
  [metrics.prometheus]
    buckets = [0.1,0.3,1.2,5.0]
metrics:
  prometheus:
    buckets:
      - 0.1
      - 0.3
      - 1.2
      - 5.0
--metrics.prometheus.buckets=0.100000, 0.300000, 1.200000, 5.000000

addEntryPointsLabels

Optional, Default=true

Enable metrics on entry points.

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

addServicesLabels

Optional, Default=true

Enable metrics on services.

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

entryPoint

Optional, Default=traefik

Entry point used to expose metrics.

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

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

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]
  [metrics.prometheus]
    manualRouting = true
metrics:
  prometheus:
    manualRouting: true
--metrics.prometheus.manualrouting=true