Fix mixups in metrics documentation

This commit is contained in:
Tom Moulard 2022-02-03 15:16:12 +01:00 committed by GitHub
parent 3ac755bd2f
commit 6742dd8454
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 194 additions and 73 deletions

View file

@ -118,7 +118,7 @@ metrics:
```toml tab="File (TOML)" ```toml tab="File (TOML)"
[metrics] [metrics]
[metrics.datadog] [metrics.datadog]
pushInterval = 10s pushInterval = "10s"
``` ```
```bash tab="CLI" ```bash tab="CLI"
@ -144,5 +144,5 @@ metrics:
``` ```
```bash tab="CLI" ```bash tab="CLI"
--metrics.datadog.prefix="traefik" --metrics.datadog.prefix=traefik
``` ```

View file

@ -69,7 +69,7 @@ InfluxDB database used when protocol is http.
```yaml tab="File (YAML)" ```yaml tab="File (YAML)"
metrics: metrics:
influxDB: influxDB:
database: "db" database: db
``` ```
```toml tab="File (TOML)" ```toml tab="File (TOML)"
@ -91,7 +91,7 @@ InfluxDB retention policy used when protocol is http.
```yaml tab="File (YAML)" ```yaml tab="File (YAML)"
metrics: metrics:
influxDB: influxDB:
retentionPolicy: "two_hours" retentionPolicy: two_hours
``` ```
```toml tab="File (TOML)" ```toml tab="File (TOML)"
@ -113,7 +113,7 @@ InfluxDB username (only with http).
```yaml tab="File (YAML)" ```yaml tab="File (YAML)"
metrics: metrics:
influxDB: influxDB:
username: "john" username: john
``` ```
```toml tab="File (TOML)" ```toml tab="File (TOML)"
@ -135,7 +135,7 @@ InfluxDB password (only with http).
```yaml tab="File (YAML)" ```yaml tab="File (YAML)"
metrics: metrics:
influxDB: influxDB:
password: "secret" password: secret
``` ```
```toml tab="File (TOML)" ```toml tab="File (TOML)"
@ -176,18 +176,18 @@ _Optional, Default=false_
Enable metrics on routers. Enable metrics on routers.
```toml tab="File (TOML)"
[metrics]
[metrics.influxDB]
addRoutersLabels = true
```
```yaml tab="File (YAML)" ```yaml tab="File (YAML)"
metrics: metrics:
influxDB: influxDB:
addRoutersLabels: true addRoutersLabels: true
``` ```
```toml tab="File (TOML)"
[metrics]
[metrics.influxDB]
addRoutersLabels = true
```
```bash tab="CLI" ```bash tab="CLI"
--metrics.influxdb.addrouterslabels=true --metrics.influxdb.addrouterslabels=true
``` ```
@ -229,7 +229,7 @@ metrics:
```toml tab="File (TOML)" ```toml tab="File (TOML)"
[metrics] [metrics]
[metrics.influxDB] [metrics.influxDB]
pushInterval = 10s pushInterval = "10s"
``` ```
```bash tab="CLI" ```bash tab="CLI"
@ -242,14 +242,6 @@ _Optional, Default={}_
Additional labels (influxdb tags) on all metrics. Additional labels (influxdb tags) on all metrics.
```toml tab="File (TOML)"
[metrics]
[metrics.influxDB]
[metrics.influxDB.additionalLabels]
host = "example.com"
environment = "production"
```
```yaml tab="File (YAML)" ```yaml tab="File (YAML)"
metrics: metrics:
influxDB: influxDB:
@ -258,6 +250,14 @@ metrics:
environment: production environment: production
``` ```
```toml tab="File (TOML)"
[metrics]
[metrics.influxDB]
[metrics.influxDB.additionalLabels]
host = "example.com"
environment = "production"
```
```bash tab="CLI" ```bash tab="CLI"
--metrics.influxdb.additionallabels.host=example.com --metrics.influxdb.additionallabels.environment=production --metrics.influxdb.additionallabels.host=example.com --metrics.influxdb.additionallabels.environment=production
``` ```

View file

@ -7,16 +7,16 @@ Traefik supports 4 metrics backends:
- [Prometheus](./prometheus.md) - [Prometheus](./prometheus.md)
- [StatsD](./statsd.md) - [StatsD](./statsd.md)
## Server Metrics ## Global Metrics
| Metric | DataDog | InfluxDB | Prometheus | StatsD | | Metric | DataDog | InfluxDB | Prometheus | StatsD |
|-------------------------------------------------------------------------|---------|----------|------------|--------| |-------------------------------------------------------------------------|---------|----------|------------|--------|
| [Configuration reloads](#configuration-reloads) | ✓ | ✓ | ✓ | ✓ | | [Configuration reloads](#configuration-reloads) | ✓ | ✓ | ✓ | ✓ |
| [Configuration reload failures](#configuration-reload-failures) | ✓ | ✓ | ✓ | ✓ |
| [Last Configuration Reload Success](#last-configuration-reload-success) | ✓ | ✓ | ✓ | ✓ | | [Last Configuration Reload Success](#last-configuration-reload-success) | ✓ | ✓ | ✓ | ✓ |
| [Last Configuration Reload Failure](#last-configuration-reload-failure) | ✓ | ✓ | ✓ | ✓ | | [TLS certificates expiration](#tls-certificates-expiration) | ✓ | ✓ | ✓ | ✓ |
### Configuration Reloads ### Configuration Reloads
The total count of configuration reloads. The total count of configuration reloads.
```dd tab="Datadog" ```dd tab="Datadog"
@ -36,27 +36,8 @@ traefik_config_reloads_total
{prefix}.config.reload.total {prefix}.config.reload.total
``` ```
### Configuration Reload Failures
The total count of configuration reload failures.
```dd tab="Datadog"
config.reload.total (with tag "failure" to true)
```
```influxdb tab="InfluxDB"
traefik.config.reload.total.failure
```
```prom tab="Prometheus"
traefik_config_reloads_failure_total
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.config.reload.total.failure
```
### Last Configuration Reload Success ### Last Configuration Reload Success
The timestamp of the last configuration reload success. The timestamp of the last configuration reload success.
```dd tab="Datadog" ```dd tab="Datadog"
@ -76,24 +57,27 @@ traefik_config_last_reload_success
{prefix}.config.reload.lastSuccessTimestamp {prefix}.config.reload.lastSuccessTimestamp
``` ```
### Last Configuration Reload Failure ### TLS certificates expiration
The timestamp of the last configuration reload failure.
The expiration date of certificates.
Available labels: `cn`, `sans`, `serial`.
```dd tab="Datadog" ```dd tab="Datadog"
config.reload.lastFailureTimestamp tls.certs.notAfterTimestamp
``` ```
```influxdb tab="InfluxDB" ```influxdb tab="InfluxDB"
traefik.config.reload.lastFailureTimestamp traefik.tls.certs.notAfterTimestamp
``` ```
```prom tab="Prometheus" ```prom tab="Prometheus"
traefik_config_last_reload_failure traefik_tls_certs_not_after
``` ```
```statsd tab="StatsD" ```statsd tab="StatsD"
# Default prefix: "traefik" # Default prefix: "traefik"
{prefix}.config.reload.lastFailureTimestamp {prefix}.tls.certs.notAfterTimestamp
``` ```
## EntryPoint Metrics ## EntryPoint Metrics
@ -101,12 +85,13 @@ traefik_config_last_reload_failure
| Metric | DataDog | InfluxDB | Prometheus | StatsD | | Metric | DataDog | InfluxDB | Prometheus | StatsD |
|-----------------------------------------------------------|---------|----------|------------|--------| |-----------------------------------------------------------|---------|----------|------------|--------|
| [HTTP Requests Count](#http-requests-count) | ✓ | ✓ | ✓ | ✓ | | [HTTP Requests Count](#http-requests-count) | ✓ | ✓ | ✓ | ✓ |
| [HTTPS Requests Count](#https-requests-count) | | | ✓ | | | [HTTPS Requests Count](#https-requests-count) | ✓ | ✓ | ✓ | ✓ |
| [Request Duration Histogram](#request-duration-histogram) | ✓ | ✓ | ✓ | ✓ | | [Request Duration Histogram](#request-duration-histogram) | ✓ | ✓ | ✓ | ✓ |
| [Open Connections Count](#open-connections-count) | ✓ | ✓ | ✓ | ✓ | | [Open Connections Count](#open-connections-count) | ✓ | ✓ | ✓ | ✓ |
### HTTP Requests Count ### HTTP Requests Count
The total count of HTTP requests processed on an entrypoint.
The total count of HTTP requests received by an entrypoint.
Available labels: `code`, `method`, `protocol`, `entrypoint`. Available labels: `code`, `method`, `protocol`, `entrypoint`.
@ -128,16 +113,31 @@ traefik_entrypoint_requests_total
``` ```
### HTTPS Requests Count ### HTTPS Requests Count
The total count of HTTPS requests processed on an entrypoint.
The total count of HTTPS requests received by an entrypoint.
Available labels: `tls_version`, `tls_cipher`, `entrypoint`. Available labels: `tls_version`, `tls_cipher`, `entrypoint`.
```dd tab="Datadog"
entrypoint.request.tls.total
```
```influxdb tab="InfluxDB"
traefik.entrypoint.requests.tls.total
```
```prom tab="Prometheus" ```prom tab="Prometheus"
traefik_entrypoint_requests_tls_total traefik_entrypoint_requests_tls_total
``` ```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.entrypoint.request.tls.total
```
### Request Duration Histogram ### Request Duration Histogram
Request process time duration histogram on an entrypoint.
Request processing duration histogram on an entrypoint.
Available labels: `code`, `method`, `protocol`, `entrypoint`. Available labels: `code`, `method`, `protocol`, `entrypoint`.
@ -159,6 +159,7 @@ traefik_entrypoint_request_duration_seconds
``` ```
### Open Connections Count ### Open Connections Count
The current count of open connections on an entrypoint. The current count of open connections on an entrypoint.
Available labels: `method`, `protocol`, `entrypoint`. Available labels: `method`, `protocol`, `entrypoint`.
@ -180,18 +181,120 @@ traefik_entrypoint_open_connections
{prefix}.entrypoint.connections.open {prefix}.entrypoint.connections.open
``` ```
## Service Metrics ## Router Metrics
| Metric | DataDog | InfluxDB | Prometheus | StatsD | | Metric | DataDog | InfluxDB | Prometheus | StatsD |
|-------------------------------------------------------------|---------|----------|------------|--------| |-------------------------------------------------------------|---------|----------|------------|--------|
| [HTTP Requests Count](#http-requests-count_1) | ✓ | ✓ | ✓ | ✓ | | [HTTP Requests Count](#http-requests-count_1) | ✓ | ✓ | ✓ | ✓ |
| [HTTPS Requests Count](#https-requests-count_1) | | | ✓ | | | [HTTPS Requests Count](#https-requests-count_1) | ✓ | ✓ | ✓ | ✓ |
| [Request Duration Histogram](#request-duration-histogram_1) | ✓ | ✓ | ✓ | ✓ | | [Request Duration Histogram](#request-duration-histogram_1) | ✓ | ✓ | ✓ | ✓ |
| [Open Connections Count](#open-connections-count_1) | ✓ | ✓ | ✓ | ✓ | | [Open Connections Count](#open-connections-count_1) | ✓ | ✓ | ✓ | ✓ |
### HTTP Requests Count
The total count of HTTP requests handled by a router.
Available labels: `code`, `method`, `protocol`, `router`, `service`.
```dd tab="Datadog"
router.request.total
```
```influxdb tab="InfluxDB"
traefik.router.requests.total
```
```prom tab="Prometheus"
traefik_router_requests_total
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.router.request.total
```
### HTTPS Requests Count
The total count of HTTPS requests handled by a router.
Available labels: `tls_version`, `tls_cipher`, `router`, `service`.
```dd tab="Datadog"
router.request.tls.total
```
```influxdb tab="InfluxDB"
traefik.router.requests.tls.total
```
```prom tab="Prometheus"
traefik_router_requests_tls_total
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.router.request.tls.total
```
### Request Duration Histogram
Request processing duration histogram on a router.
Available labels: `code`, `method`, `protocol`, `router`, `service`.
```dd tab="Datadog"
router.request.duration
```
```influxdb tab="InfluxDB"
traefik.router.request.duration
```
```prom tab="Prometheus"
traefik_router_request_duration_seconds
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.router.request.duration
```
### Open Connections Count
The current count of open connections on a router.
Available labels: `method`, `protocol`, `router`, `service`.
```dd tab="Datadog"
router.connections.open
```
```influxdb tab="InfluxDB"
traefik.router.connections.open
```
```prom tab="Prometheus"
traefik_router_open_connections
```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.router.connections.open
```
## 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) | ✓ | ✓ | ✓ | ✓ | | [Requests Retries Count](#requests-retries-count) | ✓ | ✓ | ✓ | ✓ |
| [Service Server UP](#service-server-up) | ✓ | ✓ | ✓ | ✓ | | [Service Server UP](#service-server-up) | ✓ | ✓ | ✓ | ✓ |
### HTTP Requests Count ### HTTP Requests Count
The total count of HTTP requests processed on a service. The total count of HTTP requests processed on a service.
Available labels: `code`, `method`, `protocol`, `service`. Available labels: `code`, `method`, `protocol`, `service`.
@ -214,16 +317,31 @@ traefik_service_requests_total
``` ```
### HTTPS Requests Count ### HTTPS Requests Count
The total count of HTTPS requests processed on a service. The total count of HTTPS requests processed on a service.
Available labels: `tls_version`, `tls_cipher`, `service`. Available labels: `tls_version`, `tls_cipher`, `service`.
```dd tab="Datadog"
router.service.tls.total
```
```influxdb tab="InfluxDB"
traefik.service.requests.tls.total
```
```prom tab="Prometheus" ```prom tab="Prometheus"
traefik_service_requests_tls_total traefik_service_requests_tls_total
``` ```
```statsd tab="StatsD"
# Default prefix: "traefik"
{prefix}.service.request.tls.total
```
### Request Duration Histogram ### Request Duration Histogram
Request process time duration histogram on a service.
Request processing duration histogram on a service.
Available labels: `code`, `method`, `protocol`, `service`. Available labels: `code`, `method`, `protocol`, `service`.
@ -245,6 +363,7 @@ traefik_service_request_duration_seconds
``` ```
### Open Connections Count ### Open Connections Count
The current count of open connections on a service. The current count of open connections on a service.
Available labels: `method`, `protocol`, `service`. Available labels: `method`, `protocol`, `service`.
@ -267,6 +386,7 @@ traefik_service_open_connections
``` ```
### Requests Retries Count ### Requests Retries Count
The count of requests retries on a service. The count of requests retries on a service.
Available labels: `service`. Available labels: `service`.
@ -289,6 +409,7 @@ traefik_service_retries_total
``` ```
### Service Server UP ### Service Server UP
Current service's server status, described by a gauge with a value of 0 for a down server or a value of 1 for an up server. Current service's server status, described by a gauge with a value of 0 for a down server or a value of 1 for an up server.
Available labels: `service`, `url`. Available labels: `service`, `url`.

View file

@ -39,7 +39,7 @@ metrics:
``` ```
```bash tab="CLI" ```bash tab="CLI"
--metrics.prometheus.buckets=0.100000, 0.300000, 1.200000, 5.000000 --metrics.prometheus.buckets=0.1,0.3,1.2,5.0
``` ```
#### `addEntryPointsLabels` #### `addEntryPointsLabels`
@ -70,18 +70,18 @@ _Optional, Default=false_
Enable metrics on routers. Enable metrics on routers.
```toml tab="File (TOML)"
[metrics]
[metrics.prometheus]
addRoutersLabels = true
```
```yaml tab="File (YAML)" ```yaml tab="File (YAML)"
metrics: metrics:
prometheus: prometheus:
addRoutersLabels: true addRoutersLabels: true
``` ```
```toml tab="File (TOML)"
[metrics]
[metrics.prometheus]
addRoutersLabels = true
```
```bash tab="CLI" ```bash tab="CLI"
--metrics.prometheus.addrouterslabels=true --metrics.prometheus.addrouterslabels=true
``` ```
@ -117,7 +117,7 @@ Entry point used to expose metrics.
```yaml tab="File (YAML)" ```yaml tab="File (YAML)"
entryPoints: entryPoints:
metrics: metrics:
address: ":8082" address: :8082
metrics: metrics:
prometheus: prometheus:

View file

@ -66,18 +66,18 @@ _Optional, Default=false_
Enable metrics on entry points. Enable metrics on entry points.
```toml tab="File (TOML)"
[metrics]
[metrics.statsD]
addRoutersLabels = true
```
```yaml tab="File (YAML)" ```yaml tab="File (YAML)"
metrics: metrics:
statsD: statsD:
addRoutersLabels: true addRoutersLabels: true
``` ```
```toml tab="File (TOML)"
[metrics]
[metrics.statsD]
addRoutersLabels = true
```
```bash tab="CLI" ```bash tab="CLI"
--metrics.statsd.addrouterslabels=true --metrics.statsd.addrouterslabels=true
``` ```
@ -119,7 +119,7 @@ metrics:
```toml tab="File (TOML)" ```toml tab="File (TOML)"
[metrics] [metrics]
[metrics.statsD] [metrics.statsD]
pushInterval = 10s pushInterval = "10s"
``` ```
```bash tab="CLI" ```bash tab="CLI"
@ -145,5 +145,5 @@ metrics:
``` ```
```bash tab="CLI" ```bash tab="CLI"
--metrics.statsd.prefix="traefik" --metrics.statsd.prefix=traefik
``` ```