1
0
mirror of https://github.com/containous/traefik.git synced 2024-12-24 21:34:39 +03:00
traefik/docs/content/observability/metrics/influxdb.md
2021-09-17 09:08:07 +02:00

3.8 KiB

InfluxDB

To enable the InfluxDB:

metrics:
  influxDB: {}
[metrics]
  [metrics.influxDB]
--metrics.influxdb=true

address

Required, Default="localhost:8089"

Address instructs exporter to send metrics to influxdb at this address.

metrics:
  influxDB:
    address: localhost:8089
[metrics]
  [metrics.influxDB]
    address = "localhost:8089"
--metrics.influxdb.address=localhost:8089

protocol

Required, Default="udp"

InfluxDB's address protocol (udp or http).

metrics:
  influxDB:
    protocol: udp
[metrics]
  [metrics.influxDB]
    protocol = "udp"
--metrics.influxdb.protocol=udp

database

Optional, Default=""

InfluxDB database used when protocol is http.

metrics:
  influxDB:
    database: "db"
[metrics]
  [metrics.influxDB]
    database = "db"
--metrics.influxdb.database=db

retentionPolicy

Optional, Default=""

InfluxDB retention policy used when protocol is http.

metrics:
  influxDB:
    retentionPolicy: "two_hours"
[metrics]
  [metrics.influxDB]
    retentionPolicy = "two_hours"
--metrics.influxdb.retentionPolicy=two_hours

username

Optional, Default=""

InfluxDB username (only with http).

metrics:
  influxDB:
    username: "john"
[metrics]
  [metrics.influxDB]
    username = "john"
--metrics.influxdb.username=john

password

Optional, Default=""

InfluxDB password (only with http).

metrics:
  influxDB:
    password: "secret"
[metrics]
  [metrics.influxDB]
    password = "secret"
--metrics.influxdb.password=secret

addEntryPointsLabels

Optional, Default=true

Enable metrics on entry points.

metrics:
  influxDB:
    addEntryPointsLabels: true
[metrics]
  [metrics.influxDB]
    addEntryPointsLabels = true
--metrics.influxdb.addEntryPointsLabels=true

AddRoutersLabels

Optional, Default=false

Enable metrics on routers.

[metrics]
  [metrics.influxDB]
    addRoutersLabels = true
metrics:
  influxDB:
    addRoutersLabels: true
--metrics.influxdb.addrouterslabels=true

addServicesLabels

Optional, Default=true

Enable metrics on services.

metrics:
  influxDB:
    addServicesLabels: true
[metrics]
  [metrics.influxDB]
    addServicesLabels = true
--metrics.influxdb.addServicesLabels=true

pushInterval

Optional, Default=10s

The interval used by the exporter to push metrics to influxdb.

metrics:
  influxDB:
    pushInterval: 10s
[metrics]
  [metrics.influxDB]
    pushInterval = 10s
--metrics.influxdb.pushInterval=10s

additionalLabels

Optional, Default={}

Additional labels (influxdb tags) on all metrics.

[metrics]
  [metrics.influxDB]
    [metrics.influxDB.additionalLabels]
      host = "example.com"
      environment = "production"
metrics:
  influxDB:
    additionalLabels:
      host: example.com
      environment: production
--metrics.influxdb.additionallabels.host=example.com --metrics.influxdb.additionallabels.environment=production