Support InfluxDB v2 metrics backend
This commit is contained in:
parent
5780dc2b15
commit
ca55dfe1c6
16 changed files with 681 additions and 49 deletions
219
docs/content/observability/metrics/influxdb2.md
Normal file
219
docs/content/observability/metrics/influxdb2.md
Normal file
|
@ -0,0 +1,219 @@
|
|||
# InfluxDB v2
|
||||
|
||||
To enable the InfluxDB2:
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB2: {}
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB2]
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb2=true
|
||||
```
|
||||
|
||||
#### `address`
|
||||
|
||||
_Required, Default="http://localhost:8086"_
|
||||
|
||||
Address of the InfluxDB v2 instance.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB2:
|
||||
address: http://localhost:8086
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB2]
|
||||
address = "http://localhost:8086"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb2.address=http://localhost:8086
|
||||
```
|
||||
|
||||
#### `token`
|
||||
|
||||
_Required, Default=""_
|
||||
|
||||
Token with which to connect to InfluxDB v2.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB2:
|
||||
token: secret
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB2]
|
||||
token = "secret"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb2.token=secret
|
||||
```
|
||||
|
||||
#### `org`
|
||||
|
||||
_Required, Default=""_
|
||||
|
||||
Organisation where metrics will be stored.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB2:
|
||||
org: my-org
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB2]
|
||||
org = "my-org"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb2.org=my-org
|
||||
```
|
||||
|
||||
#### `bucket`
|
||||
|
||||
_Required, Default=""_
|
||||
|
||||
Bucket where metrics will be stored.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB2:
|
||||
bucket: my-bucket
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB2]
|
||||
bucket = "my-bucket"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb2.bucket=my-bucket
|
||||
```
|
||||
|
||||
#### `addEntryPointsLabels`
|
||||
|
||||
_Optional, Default=true_
|
||||
|
||||
Enable metrics on entry points.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB2:
|
||||
addEntryPointsLabels: true
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB2]
|
||||
addEntryPointsLabels = true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb2.addEntryPointsLabels=true
|
||||
```
|
||||
|
||||
#### `addRoutersLabels`
|
||||
|
||||
_Optional, Default=false_
|
||||
|
||||
Enable metrics on routers.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB2:
|
||||
addRoutersLabels: true
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB2]
|
||||
addRoutersLabels = true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb2.addrouterslabels=true
|
||||
```
|
||||
|
||||
#### `addServicesLabels`
|
||||
|
||||
_Optional, Default=true_
|
||||
|
||||
Enable metrics on services.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB2:
|
||||
addServicesLabels: true
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB2]
|
||||
addServicesLabels = true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb2.addServicesLabels=true
|
||||
```
|
||||
|
||||
#### `pushInterval`
|
||||
|
||||
_Optional, Default=10s_
|
||||
|
||||
The interval used by the exporter to push metrics to InfluxDB server.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB2:
|
||||
pushInterval: 10s
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB2]
|
||||
pushInterval = "10s"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb2.pushInterval=10s
|
||||
```
|
||||
|
||||
#### `additionalLabels`
|
||||
|
||||
_Optional, Default={}_
|
||||
|
||||
Additional labels (InfluxDB tags) on all metrics.
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
metrics:
|
||||
influxDB2:
|
||||
additionalLabels:
|
||||
host: example.com
|
||||
environment: production
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[metrics]
|
||||
[metrics.influxDB2]
|
||||
[metrics.influxDB2.additionalLabels]
|
||||
host = "example.com"
|
||||
environment = "production"
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--metrics.influxdb2.additionallabels.host=example.com --metrics.influxdb2.additionallabels.environment=production
|
||||
```
|
|
@ -4,16 +4,17 @@ Traefik supports 4 metrics backends:
|
|||
|
||||
- [Datadog](./datadog.md)
|
||||
- [InfluxDB](./influxdb.md)
|
||||
- [InfluxDB2](./influxdb2.md)
|
||||
- [Prometheus](./prometheus.md)
|
||||
- [StatsD](./statsd.md)
|
||||
|
||||
## Global Metrics
|
||||
|
||||
| Metric | DataDog | InfluxDB | Prometheus | StatsD |
|
||||
|-------------------------------------------------------------------------|---------|----------|------------|--------|
|
||||
| [Configuration reloads](#configuration-reloads) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Last Configuration Reload Success](#last-configuration-reload-success) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [TLS certificates expiration](#tls-certificates-expiration) | ✓ | ✓ | ✓ | ✓ |
|
||||
| Metric | DataDog | InfluxDB / InfluxDB2 | Prometheus | StatsD |
|
||||
|-------------------------------------------------------------------------|---------|----------------------|------------|--------|
|
||||
| [Configuration reloads](#configuration-reloads) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Last Configuration Reload Success](#last-configuration-reload-success) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [TLS certificates expiration](#tls-certificates-expiration) | ✓ | ✓ | ✓ | ✓ |
|
||||
|
||||
### Configuration Reloads
|
||||
|
||||
|
@ -23,7 +24,7 @@ The total count of configuration reloads.
|
|||
config.reload.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.config.reload.total
|
||||
```
|
||||
|
||||
|
@ -44,7 +45,7 @@ The timestamp of the last configuration reload success.
|
|||
config.reload.lastSuccessTimestamp
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.config.reload.lastSuccessTimestamp
|
||||
```
|
||||
|
||||
|
@ -67,7 +68,7 @@ Available labels: `cn`, `sans`, `serial`.
|
|||
tls.certs.notAfterTimestamp
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.tls.certs.notAfterTimestamp
|
||||
```
|
||||
|
||||
|
@ -82,12 +83,12 @@ traefik_tls_certs_not_after
|
|||
|
||||
## EntryPoint Metrics
|
||||
|
||||
| Metric | DataDog | InfluxDB | Prometheus | StatsD |
|
||||
|-----------------------------------------------------------|---------|----------|------------|--------|
|
||||
| [HTTP Requests Count](#http-requests-count) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [HTTPS Requests Count](#https-requests-count) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Request Duration Histogram](#request-duration-histogram) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Open Connections Count](#open-connections-count) | ✓ | ✓ | ✓ | ✓ |
|
||||
| Metric | DataDog | InfluxDB / InfluxDB2 | Prometheus | StatsD |
|
||||
|-----------------------------------------------------------|---------|----------------------|------------|--------|
|
||||
| [HTTP Requests Count](#http-requests-count) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [HTTPS Requests Count](#https-requests-count) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Request Duration Histogram](#request-duration-histogram) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Open Connections Count](#open-connections-count) | ✓ | ✓ | ✓ | ✓ |
|
||||
|
||||
### HTTP Requests Count
|
||||
|
||||
|
@ -99,7 +100,7 @@ Available labels: `code`, `method`, `protocol`, `entrypoint`.
|
|||
entrypoint.request.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.entrypoint.requests.total
|
||||
```
|
||||
|
||||
|
@ -122,7 +123,7 @@ Available labels: `tls_version`, `tls_cipher`, `entrypoint`.
|
|||
entrypoint.request.tls.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.entrypoint.requests.tls.total
|
||||
```
|
||||
|
||||
|
@ -145,7 +146,7 @@ Available labels: `code`, `method`, `protocol`, `entrypoint`.
|
|||
entrypoint.request.duration
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.entrypoint.request.duration
|
||||
```
|
||||
|
||||
|
@ -168,7 +169,7 @@ Available labels: `method`, `protocol`, `entrypoint`.
|
|||
entrypoint.connections.open
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.entrypoint.connections.open
|
||||
```
|
||||
|
||||
|
@ -183,12 +184,12 @@ traefik_entrypoint_open_connections
|
|||
|
||||
## Router Metrics
|
||||
|
||||
| Metric | DataDog | InfluxDB | Prometheus | StatsD |
|
||||
|-------------------------------------------------------------|---------|----------|------------|--------|
|
||||
| [HTTP Requests Count](#http-requests-count_1) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [HTTPS Requests Count](#https-requests-count_1) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Request Duration Histogram](#request-duration-histogram_1) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Open Connections Count](#open-connections-count_1) | ✓ | ✓ | ✓ | ✓ |
|
||||
| Metric | DataDog | InfluxDB / InfluxDB2 | Prometheus | StatsD |
|
||||
|-------------------------------------------------------------|---------|----------------------|------------|--------|
|
||||
| [HTTP Requests Count](#http-requests-count_1) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [HTTPS Requests Count](#https-requests-count_1) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Request Duration Histogram](#request-duration-histogram_1) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Open Connections Count](#open-connections-count_1) | ✓ | ✓ | ✓ | ✓ |
|
||||
|
||||
### HTTP Requests Count
|
||||
|
||||
|
@ -200,7 +201,7 @@ Available labels: `code`, `method`, `protocol`, `router`, `service`.
|
|||
router.request.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.router.requests.total
|
||||
```
|
||||
|
||||
|
@ -223,7 +224,7 @@ Available labels: `tls_version`, `tls_cipher`, `router`, `service`.
|
|||
router.request.tls.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.router.requests.tls.total
|
||||
```
|
||||
|
||||
|
@ -246,7 +247,7 @@ Available labels: `code`, `method`, `protocol`, `router`, `service`.
|
|||
router.request.duration
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.router.request.duration
|
||||
```
|
||||
|
||||
|
@ -269,7 +270,7 @@ Available labels: `method`, `protocol`, `router`, `service`.
|
|||
router.connections.open
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.router.connections.open
|
||||
```
|
||||
|
||||
|
@ -284,14 +285,14 @@ traefik_router_open_connections
|
|||
|
||||
## Service Metrics
|
||||
|
||||
| Metric | DataDog | InfluxDB | Prometheus | StatsD |
|
||||
|-------------------------------------------------------------|---------|----------|------------|--------|
|
||||
| [HTTP Requests Count](#http-requests-count_2) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [HTTPS Requests Count](#https-requests-count_2) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Request Duration Histogram](#request-duration-histogram_2) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Open Connections Count](#open-connections-count_2) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Requests Retries Count](#requests-retries-count) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Service Server UP](#service-server-up) | ✓ | ✓ | ✓ | ✓ |
|
||||
| Metric | DataDog | InfluxDB / InfluxDB2 | Prometheus | StatsD |
|
||||
|-------------------------------------------------------------|---------|----------------------|------------|--------|
|
||||
| [HTTP Requests Count](#http-requests-count_2) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [HTTPS Requests Count](#https-requests-count_2) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Request Duration Histogram](#request-duration-histogram_2) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Open Connections Count](#open-connections-count_2) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Requests Retries Count](#requests-retries-count) | ✓ | ✓ | ✓ | ✓ |
|
||||
| [Service Server UP](#service-server-up) | ✓ | ✓ | ✓ | ✓ |
|
||||
|
||||
### HTTP Requests Count
|
||||
|
||||
|
@ -303,7 +304,7 @@ Available labels: `code`, `method`, `protocol`, `service`.
|
|||
service.request.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.service.requests.total
|
||||
```
|
||||
|
||||
|
@ -326,7 +327,7 @@ Available labels: `tls_version`, `tls_cipher`, `service`.
|
|||
router.service.tls.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.service.requests.tls.total
|
||||
```
|
||||
|
||||
|
@ -349,7 +350,7 @@ Available labels: `code`, `method`, `protocol`, `service`.
|
|||
service.request.duration
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.service.request.duration
|
||||
```
|
||||
|
||||
|
@ -372,7 +373,7 @@ Available labels: `method`, `protocol`, `service`.
|
|||
service.connections.open
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.service.connections.open
|
||||
```
|
||||
|
||||
|
@ -395,7 +396,7 @@ Available labels: `service`.
|
|||
service.retries.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.service.retries.total
|
||||
```
|
||||
|
||||
|
@ -418,7 +419,7 @@ Available labels: `service`, `url`.
|
|||
service.server.up
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB"
|
||||
```influxdb tab="InfluxDB / InfluxDB2"
|
||||
traefik.service.server.up
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue