Prometheus

要启用Prometheus:

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

buckets

可选,默认值=" 0.100000,0.300000,1.200000,5.000000"

延迟指标的存储桶.

[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

可选,默认= true

在入口点上启用指标.

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

addServicesLabels

可选,默认= true

启用服务指标.

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

entryPoint

可选,默认= traefik

用于公开指标的入口点.

[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

可选,默认= false

如果manualRoutingtrue ,它将禁用默认的内部路由器,以便允许一个人为[email protected]服务创建自定义路由器.

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