InfluxDB

要启用InfluxDB:

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

address

必需,默认=" localhost:8089"

地址指示出口商在此地址将指标发送到influxdb.

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

protocol

必需,默认=" udp"

InfluxDB的地址协议(udp或http).

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

database

可选,默认值=""

协议为http时使用的InfluxDB数据库.

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

retentionPolicy

可选,默认值=""

协议为http时使用的InfluxDB保留策略.

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

username

可选,默认值=""

InfluxDB用户名(仅用于http).

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

password

可选,默认值=""

InfluxDB密码(仅适用于http).

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

addEntryPointsLabels

可选,默认= true

在入口点上启用指标.

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

addServicesLabels

可选,默认= true

启用服务指标.

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

pushInterval

可选,默认= 10s

导出器将指标推送到influxdb的时间间隔.

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