Merge branch v3.0 into master
This commit is contained in:
commit
7fdb1ff8af
77 changed files with 2210 additions and 673 deletions
BIN
docs/content/assets/img/middleware/ipwhitelist.png
Normal file
BIN
docs/content/assets/img/middleware/ipwhitelist.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
|
@ -44,7 +44,7 @@ Traefik can be installed in Kubernetes using the Helm chart from <https://github
|
|||
|
||||
Ensure that the following requirements are met:
|
||||
|
||||
* Kubernetes 1.16+
|
||||
* Kubernetes 1.22+
|
||||
* Helm version 3.9+ is [installed](https://helm.sh/docs/intro/install/)
|
||||
|
||||
Add Traefik Labs chart repository to Helm:
|
||||
|
|
|
@ -300,7 +300,7 @@ labels:
|
|||
```
|
||||
|
||||
```yaml tab="Kubernetes"
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: Middleware
|
||||
metadata:
|
||||
name: test-auth
|
||||
|
@ -316,13 +316,6 @@ spec:
|
|||
- "traefik.http.middlewares.test-auth.forwardauth.addAuthCookiesToResponse=Session-Cookie,State-Cookie"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[http.middlewares]
|
||||
[http.middlewares.test-auth.forwardAuth]
|
||||
address = "https://example.com/auth"
|
||||
addAuthCookiesToResponse = ["Session-Cookie", "State-Cookie"]
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
http:
|
||||
middlewares:
|
||||
|
@ -334,6 +327,13 @@ http:
|
|||
- "State-Cookie"
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[http.middlewares]
|
||||
[http.middlewares.test-auth.forwardAuth]
|
||||
address = "https://example.com/auth"
|
||||
addAuthCookiesToResponse = ["Session-Cookie", "State-Cookie"]
|
||||
```
|
||||
|
||||
### `tls`
|
||||
|
||||
_Optional_
|
||||
|
|
|
@ -35,18 +35,6 @@ spec:
|
|||
- "traefik.http.middlewares.test-ipallowlist.ipallowlist.sourcerange=127.0.0.1/32, 192.168.1.7"
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.http.middlewares.test-ipallowlist.ipallowlist.sourcerange": "127.0.0.1/32,192.168.1.7"
|
||||
}
|
||||
```
|
||||
|
||||
```yaml tab="Rancher"
|
||||
# Accepts request from defined IP
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-ipallowlist.ipallowlist.sourcerange=127.0.0.1/32, 192.168.1.7"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
# Accepts request from defined IP
|
||||
http:
|
||||
|
@ -125,20 +113,6 @@ spec:
|
|||
- "traefik.http.middlewares.test-ipallowlist.ipallowlist.ipstrategy.depth=2"
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.http.middlewares.test-ipallowlist.ipallowlist.sourcerange": "127.0.0.1/32, 192.168.1.7",
|
||||
"traefik.http.middlewares.test-ipallowlist.ipallowlist.ipstrategy.depth": "2"
|
||||
}
|
||||
```
|
||||
|
||||
```yaml tab="Rancher"
|
||||
# Whitelisting Based on `X-Forwarded-For` with `depth=2`
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-ipallowlist.ipallowlist.sourcerange=127.0.0.1/32, 192.168.1.7"
|
||||
- "traefik.http.middlewares.test-ipallowlist.ipallowlist.ipstrategy.depth=2"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
# Allowlisting Based on `X-Forwarded-For` with `depth=2`
|
||||
http:
|
||||
|
@ -207,20 +181,6 @@ spec:
|
|||
- "traefik.http.middlewares.test-ipallowlist.ipallowlist.ipstrategy.excludedips=127.0.0.1/32, 192.168.1.7"
|
||||
```
|
||||
|
||||
```json tab="Marathon"
|
||||
"labels": {
|
||||
"traefik.http.middlewares.test-ipallowlist.ipallowlist.sourceRange=127.0.0.1/32, 192.168.1.0/24"
|
||||
"traefik.http.middlewares.test-ipallowlist.ipallowlist.ipstrategy.excludedips": "127.0.0.1/32, 192.168.1.7"
|
||||
}
|
||||
```
|
||||
|
||||
```yaml tab="Rancher"
|
||||
# Exclude from `X-Forwarded-For`
|
||||
labels:
|
||||
- "traefik.http.middlewares.test-ipallowlist.ipallowlist.sourceRange=127.0.0.1/32, 192.168.1.0/24"
|
||||
- "traefik.http.middlewares.test-ipallowlist.ipallowlist.ipstrategy.excludedips=127.0.0.1/32, 192.168.1.7"
|
||||
```
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
# Exclude from `X-Forwarded-For`
|
||||
http:
|
||||
|
|
|
@ -147,6 +147,7 @@ It is now unsupported and would prevent Traefik to start.
|
|||
##### Remediation
|
||||
|
||||
The `http3` option should be removed from the static configuration experimental section.
|
||||
To configure `http3`, please checkout the [entrypoint configuration documentation](https://doc.traefik.io/traefik/v3.0/routing/entrypoints/#http3_1).
|
||||
|
||||
### Consul provider
|
||||
|
||||
|
|
|
@ -513,7 +513,7 @@ In `v2.10`, the Kubernetes CRDs API Group `traefik.containo.us` is deprecated, a
|
|||
As the Kubernetes CRD provider still works with both API Versions (`traefik.io/v1alpha1` and `traefik.containo.us/v1alpha1`),
|
||||
it means that for the same kind, namespace and name, the provider will only keep the `traefik.io/v1alpha1` resource.
|
||||
|
||||
In addition, the Kubernetes CRDs API Version `traefik.io/v1alpha1` will not be supported in Traefik v3 itself.
|
||||
In addition, the Kubernetes CRDs API Version `traefik.containo.us/v1alpha1` will not be supported in Traefik v3 itself.
|
||||
|
||||
Please note that it is a requirement to update the CRDs and the RBAC in the cluster before upgrading Traefik.
|
||||
To do so, please apply the required [CRDs](https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml) and [RBAC](https://raw.githubusercontent.com/traefik/traefik/v2.10/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml) manifests for v2.10:
|
||||
|
|
|
@ -169,14 +169,14 @@ The default is not to perform compression.
|
|||
|
||||
```yaml tab="File (YAML)"
|
||||
log:
|
||||
compress: 3
|
||||
compress: true
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[log]
|
||||
compress = 3
|
||||
compress = true
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--log.compress=3
|
||||
--log.compress=true
|
||||
```
|
||||
|
|
|
@ -5,7 +5,7 @@ description: "Traefik Proxy supports these metrics backend systems: Datadog, Inf
|
|||
|
||||
# Metrics
|
||||
|
||||
Traefik supports these metrics backends:
|
||||
Traefik provides metrics in the [OpenTelemetry](./opentelemetry.md) format as well as the following vendor specific backends:
|
||||
|
||||
- [Datadog](./datadog.md)
|
||||
- [InfluxDB2](./influxdb2.md)
|
||||
|
@ -46,6 +46,13 @@ addInternals = true
|
|||
| Open connections | Gauge | `entrypoint`, `protocol` | The current count of open connections, by entrypoint and protocol. |
|
||||
| TLS certificates not after | Gauge | | The expiration date of certificates. |
|
||||
|
||||
```opentelemetry tab="OpenTelemetry"
|
||||
traefik_config_reloads_total
|
||||
traefik_config_last_reload_success
|
||||
traefik_open_connections
|
||||
traefik_tls_certs_not_after
|
||||
```
|
||||
|
||||
```prom tab="Prometheus"
|
||||
traefik_config_reloads_total
|
||||
traefik_config_last_reload_success
|
||||
|
@ -75,13 +82,6 @@ traefik.tls.certs.notAfterTimestamp
|
|||
{prefix}.tls.certs.notAfterTimestamp
|
||||
```
|
||||
|
||||
```opentelemetry tab="OpenTelemetry"
|
||||
traefik_config_reloads_total
|
||||
traefik_config_last_reload_success
|
||||
traefik_open_connections
|
||||
traefik_tls_certs_not_after
|
||||
```
|
||||
|
||||
### Labels
|
||||
|
||||
Here is a comprehensive list of labels that are provided by the global metrics:
|
||||
|
@ -91,201 +91,9 @@ Here is a comprehensive list of labels that are provided by the global metrics:
|
|||
| `entrypoint` | Entrypoint that handled the connection | "example_entrypoint" |
|
||||
| `protocol` | Connection protocol | "TCP" |
|
||||
|
||||
## HTTP Metrics
|
||||
## OpenTelemetry Semantic Conventions
|
||||
|
||||
### EntryPoint Metrics
|
||||
|
||||
| Metric | Type | [Labels](#labels) | Description |
|
||||
|-----------------------|-----------|--------------------------------------------|---------------------------------------------------------------------|
|
||||
| Requests total | Count | `code`, `method`, `protocol`, `entrypoint` | The total count of HTTP requests received by an entrypoint. |
|
||||
| Requests TLS total | Count | `tls_version`, `tls_cipher`, `entrypoint` | The total count of HTTPS requests received by an entrypoint. |
|
||||
| Request duration | Histogram | `code`, `method`, `protocol`, `entrypoint` | Request processing duration histogram on an entrypoint. |
|
||||
| Requests bytes total | Count | `code`, `method`, `protocol`, `entrypoint` | The total size of HTTP requests in bytes handled by an entrypoint. |
|
||||
| Responses bytes total | Count | `code`, `method`, `protocol`, `entrypoint` | The total size of HTTP responses in bytes handled by an entrypoint. |
|
||||
|
||||
```prom tab="Prometheus"
|
||||
traefik_entrypoint_requests_total
|
||||
traefik_entrypoint_requests_tls_total
|
||||
traefik_entrypoint_request_duration_seconds
|
||||
traefik_entrypoint_requests_bytes_total
|
||||
traefik_entrypoint_responses_bytes_total
|
||||
```
|
||||
|
||||
```dd tab="Datadog"
|
||||
entrypoint.request.total
|
||||
entrypoint.request.tls.total
|
||||
entrypoint.request.duration
|
||||
entrypoint.requests.bytes.total
|
||||
entrypoint.responses.bytes.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB2"
|
||||
traefik.entrypoint.requests.total
|
||||
traefik.entrypoint.requests.tls.total
|
||||
traefik.entrypoint.request.duration
|
||||
traefik.entrypoint.requests.bytes.total
|
||||
traefik.entrypoint.responses.bytes.total
|
||||
```
|
||||
|
||||
```statsd tab="StatsD"
|
||||
# Default prefix: "traefik"
|
||||
{prefix}.entrypoint.request.total
|
||||
{prefix}.entrypoint.request.tls.total
|
||||
{prefix}.entrypoint.request.duration
|
||||
{prefix}.entrypoint.requests.bytes.total
|
||||
{prefix}.entrypoint.responses.bytes.total
|
||||
```
|
||||
|
||||
```opentelemetry tab="OpenTelemetry"
|
||||
traefik_entrypoint_requests_total
|
||||
traefik_entrypoint_requests_tls_total
|
||||
traefik_entrypoint_request_duration_seconds
|
||||
traefik_entrypoint_requests_bytes_total
|
||||
traefik_entrypoint_responses_bytes_total
|
||||
```
|
||||
|
||||
### Router Metrics
|
||||
|
||||
| Metric | Type | [Labels](#labels) | Description |
|
||||
|-----------------------|-----------|---------------------------------------------------|----------------------------------------------------------------|
|
||||
| Requests total | Count | `code`, `method`, `protocol`, `router`, `service` | The total count of HTTP requests handled by a router. |
|
||||
| Requests TLS total | Count | `tls_version`, `tls_cipher`, `router`, `service` | The total count of HTTPS requests handled by a router. |
|
||||
| Request duration | Histogram | `code`, `method`, `protocol`, `router`, `service` | Request processing duration histogram on a router. |
|
||||
| Requests bytes total | Count | `code`, `method`, `protocol`, `router`, `service` | The total size of HTTP requests in bytes handled by a router. |
|
||||
| Responses bytes total | Count | `code`, `method`, `protocol`, `router`, `service` | The total size of HTTP responses in bytes handled by a router. |
|
||||
|
||||
```prom tab="Prometheus"
|
||||
traefik_router_requests_total
|
||||
traefik_router_requests_tls_total
|
||||
traefik_router_request_duration_seconds
|
||||
traefik_router_requests_bytes_total
|
||||
traefik_router_responses_bytes_total
|
||||
```
|
||||
|
||||
```dd tab="Datadog"
|
||||
router.request.total
|
||||
router.request.tls.total
|
||||
router.request.duration
|
||||
router.requests.bytes.total
|
||||
router.responses.bytes.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB2"
|
||||
traefik.router.requests.total
|
||||
traefik.router.requests.tls.total
|
||||
traefik.router.request.duration
|
||||
traefik.router.requests.bytes.total
|
||||
traefik.router.responses.bytes.total
|
||||
```
|
||||
|
||||
```statsd tab="StatsD"
|
||||
# Default prefix: "traefik"
|
||||
{prefix}.router.request.total
|
||||
{prefix}.router.request.tls.total
|
||||
{prefix}.router.request.duration
|
||||
{prefix}.router.requests.bytes.total
|
||||
{prefix}.router.responses.bytes.total
|
||||
```
|
||||
|
||||
```opentelemetry tab="OpenTelemetry"
|
||||
traefik_router_requests_total
|
||||
traefik_router_requests_tls_total
|
||||
traefik_router_request_duration_seconds
|
||||
traefik_router_requests_bytes_total
|
||||
traefik_router_responses_bytes_total
|
||||
```
|
||||
|
||||
### Service Metrics
|
||||
|
||||
| Metric | Type | Labels | Description |
|
||||
|-----------------------|-----------|-----------------------------------------|-------------------------------------------------------------|
|
||||
| Requests total | Count | `code`, `method`, `protocol`, `service` | The total count of HTTP requests processed on a service. |
|
||||
| Requests TLS total | Count | `tls_version`, `tls_cipher`, `service` | The total count of HTTPS requests processed on a service. |
|
||||
| Request duration | Histogram | `code`, `method`, `protocol`, `service` | Request processing duration histogram on a service. |
|
||||
| Retries total | Count | `service` | The count of requests retries on a service. |
|
||||
| Server UP | Gauge | `service`, `url` | Current service's server status, 0 for a down or 1 for up. |
|
||||
| Requests bytes total | Count | `code`, `method`, `protocol`, `service` | The total size of requests in bytes received by a service. |
|
||||
| Responses bytes total | Count | `code`, `method`, `protocol`, `service` | The total size of responses in bytes returned by a service. |
|
||||
|
||||
```prom tab="Prometheus"
|
||||
traefik_service_requests_total
|
||||
traefik_service_requests_tls_total
|
||||
traefik_service_request_duration_seconds
|
||||
traefik_service_retries_total
|
||||
traefik_service_server_up
|
||||
traefik_service_requests_bytes_total
|
||||
traefik_service_responses_bytes_total
|
||||
```
|
||||
|
||||
```dd tab="Datadog"
|
||||
service.request.total
|
||||
router.service.tls.total
|
||||
service.request.duration
|
||||
service.retries.total
|
||||
service.server.up
|
||||
service.requests.bytes.total
|
||||
service.responses.bytes.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB2"
|
||||
traefik.service.requests.total
|
||||
traefik.service.requests.tls.total
|
||||
traefik.service.request.duration
|
||||
traefik.service.retries.total
|
||||
traefik.service.server.up
|
||||
traefik.service.requests.bytes.total
|
||||
traefik.service.responses.bytes.total
|
||||
```
|
||||
|
||||
```statsd tab="StatsD"
|
||||
# Default prefix: "traefik"
|
||||
{prefix}.service.request.total
|
||||
{prefix}.service.request.tls.total
|
||||
{prefix}.service.request.duration
|
||||
{prefix}.service.retries.total
|
||||
{prefix}.service.server.up
|
||||
{prefix}.service.requests.bytes.total
|
||||
{prefix}.service.responses.bytes.total
|
||||
```
|
||||
|
||||
```opentelemetry tab="OpenTelemetry"
|
||||
traefik_service_requests_total
|
||||
traefik_service_requests_tls_total
|
||||
traefik_service_request_duration_seconds
|
||||
traefik_service_retries_total
|
||||
traefik_service_server_up
|
||||
traefik_service_requests_bytes_total
|
||||
traefik_service_responses_bytes_total
|
||||
```
|
||||
|
||||
### Labels
|
||||
|
||||
Here is a comprehensive list of labels that are provided by the metrics:
|
||||
|
||||
| Label | Description | example |
|
||||
|---------------|---------------------------------------|----------------------------|
|
||||
| `cn` | Certificate Common Name | "example.com" |
|
||||
| `code` | Request code | "200" |
|
||||
| `entrypoint` | Entrypoint that handled the request | "example_entrypoint" |
|
||||
| `method` | Request Method | "GET" |
|
||||
| `protocol` | Request protocol | "http" |
|
||||
| `router` | Router that handled the request | "example_router" |
|
||||
| `sans` | Certificate Subject Alternative NameS | "example.com" |
|
||||
| `serial` | Certificate Serial Number | "123..." |
|
||||
| `service` | Service that handled the request | "example_service@provider" |
|
||||
| `tls_cipher` | TLS cipher used for the request | "TLS_FALLBACK_SCSV" |
|
||||
| `tls_version` | TLS version used for the request | "1.0" |
|
||||
| `url` | Service server url | "http://example.com" |
|
||||
|
||||
!!! info "`method` label value"
|
||||
|
||||
If the HTTP method verb on a request is not one defined in the set of common methods for [`HTTP/1.1`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods)
|
||||
or the [`PRI`](https://datatracker.ietf.org/doc/html/rfc7540#section-11.6) verb (for `HTTP/2`),
|
||||
then the value for the method label becomes `EXTENSION_METHOD`.
|
||||
|
||||
## Semantic Conventions for HTTP Metrics
|
||||
|
||||
Traefik Proxy follows [official OTLP semantic conventions v1.23.1](https://github.com/open-telemetry/semantic-conventions/blob/v1.23.1/docs/http/http-metrics.md).
|
||||
Traefik Proxy follows [official OpenTelemetry semantic conventions v1.23.1](https://github.com/open-telemetry/semantic-conventions/blob/v1.23.1/docs/http/http-metrics.md).
|
||||
|
||||
### HTTP Server
|
||||
|
||||
|
@ -328,3 +136,197 @@ Here is a comprehensive list of labels that are provided by the metrics:
|
|||
| `server.address` | Name of the local HTTP server that received the request | "example.com" |
|
||||
| `server.port` | Port of the local HTTP server that received the request | "80" |
|
||||
| `url.scheme` | The URI scheme component identifying the used protocol | "http" |
|
||||
|
||||
## HTTP Metrics
|
||||
|
||||
On top of the official OpenTelemetry semantic conventions, Traefik provides its own metrics to monitor the incoming traffic.
|
||||
|
||||
### EntryPoint Metrics
|
||||
|
||||
| Metric | Type | [Labels](#labels) | Description |
|
||||
|-----------------------|-----------|--------------------------------------------|---------------------------------------------------------------------|
|
||||
| Requests total | Count | `code`, `method`, `protocol`, `entrypoint` | The total count of HTTP requests received by an entrypoint. |
|
||||
| Requests TLS total | Count | `tls_version`, `tls_cipher`, `entrypoint` | The total count of HTTPS requests received by an entrypoint. |
|
||||
| Request duration | Histogram | `code`, `method`, `protocol`, `entrypoint` | Request processing duration histogram on an entrypoint. |
|
||||
| Requests bytes total | Count | `code`, `method`, `protocol`, `entrypoint` | The total size of HTTP requests in bytes handled by an entrypoint. |
|
||||
| Responses bytes total | Count | `code`, `method`, `protocol`, `entrypoint` | The total size of HTTP responses in bytes handled by an entrypoint. |
|
||||
|
||||
```opentelemetry tab="OpenTelemetry"
|
||||
traefik_entrypoint_requests_total
|
||||
traefik_entrypoint_requests_tls_total
|
||||
traefik_entrypoint_request_duration_seconds
|
||||
traefik_entrypoint_requests_bytes_total
|
||||
traefik_entrypoint_responses_bytes_total
|
||||
```
|
||||
|
||||
```prom tab="Prometheus"
|
||||
traefik_entrypoint_requests_total
|
||||
traefik_entrypoint_requests_tls_total
|
||||
traefik_entrypoint_request_duration_seconds
|
||||
traefik_entrypoint_requests_bytes_total
|
||||
traefik_entrypoint_responses_bytes_total
|
||||
```
|
||||
|
||||
```dd tab="Datadog"
|
||||
entrypoint.request.total
|
||||
entrypoint.request.tls.total
|
||||
entrypoint.request.duration
|
||||
entrypoint.requests.bytes.total
|
||||
entrypoint.responses.bytes.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB2"
|
||||
traefik.entrypoint.requests.total
|
||||
traefik.entrypoint.requests.tls.total
|
||||
traefik.entrypoint.request.duration
|
||||
traefik.entrypoint.requests.bytes.total
|
||||
traefik.entrypoint.responses.bytes.total
|
||||
```
|
||||
|
||||
```statsd tab="StatsD"
|
||||
# Default prefix: "traefik"
|
||||
{prefix}.entrypoint.request.total
|
||||
{prefix}.entrypoint.request.tls.total
|
||||
{prefix}.entrypoint.request.duration
|
||||
{prefix}.entrypoint.requests.bytes.total
|
||||
{prefix}.entrypoint.responses.bytes.total
|
||||
```
|
||||
|
||||
### Router Metrics
|
||||
|
||||
| Metric | Type | [Labels](#labels) | Description |
|
||||
|-----------------------|-----------|---------------------------------------------------|----------------------------------------------------------------|
|
||||
| Requests total | Count | `code`, `method`, `protocol`, `router`, `service` | The total count of HTTP requests handled by a router. |
|
||||
| Requests TLS total | Count | `tls_version`, `tls_cipher`, `router`, `service` | The total count of HTTPS requests handled by a router. |
|
||||
| Request duration | Histogram | `code`, `method`, `protocol`, `router`, `service` | Request processing duration histogram on a router. |
|
||||
| Requests bytes total | Count | `code`, `method`, `protocol`, `router`, `service` | The total size of HTTP requests in bytes handled by a router. |
|
||||
| Responses bytes total | Count | `code`, `method`, `protocol`, `router`, `service` | The total size of HTTP responses in bytes handled by a router. |
|
||||
|
||||
```opentelemetry tab="OpenTelemetry"
|
||||
traefik_router_requests_total
|
||||
traefik_router_requests_tls_total
|
||||
traefik_router_request_duration_seconds
|
||||
traefik_router_requests_bytes_total
|
||||
traefik_router_responses_bytes_total
|
||||
```
|
||||
|
||||
```prom tab="Prometheus"
|
||||
traefik_router_requests_total
|
||||
traefik_router_requests_tls_total
|
||||
traefik_router_request_duration_seconds
|
||||
traefik_router_requests_bytes_total
|
||||
traefik_router_responses_bytes_total
|
||||
```
|
||||
|
||||
```dd tab="Datadog"
|
||||
router.request.total
|
||||
router.request.tls.total
|
||||
router.request.duration
|
||||
router.requests.bytes.total
|
||||
router.responses.bytes.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB2"
|
||||
traefik.router.requests.total
|
||||
traefik.router.requests.tls.total
|
||||
traefik.router.request.duration
|
||||
traefik.router.requests.bytes.total
|
||||
traefik.router.responses.bytes.total
|
||||
```
|
||||
|
||||
```statsd tab="StatsD"
|
||||
# Default prefix: "traefik"
|
||||
{prefix}.router.request.total
|
||||
{prefix}.router.request.tls.total
|
||||
{prefix}.router.request.duration
|
||||
{prefix}.router.requests.bytes.total
|
||||
{prefix}.router.responses.bytes.total
|
||||
```
|
||||
|
||||
### Service Metrics
|
||||
|
||||
| Metric | Type | Labels | Description |
|
||||
|-----------------------|-----------|-----------------------------------------|-------------------------------------------------------------|
|
||||
| Requests total | Count | `code`, `method`, `protocol`, `service` | The total count of HTTP requests processed on a service. |
|
||||
| Requests TLS total | Count | `tls_version`, `tls_cipher`, `service` | The total count of HTTPS requests processed on a service. |
|
||||
| Request duration | Histogram | `code`, `method`, `protocol`, `service` | Request processing duration histogram on a service. |
|
||||
| Retries total | Count | `service` | The count of requests retries on a service. |
|
||||
| Server UP | Gauge | `service`, `url` | Current service's server status, 0 for a down or 1 for up. |
|
||||
| Requests bytes total | Count | `code`, `method`, `protocol`, `service` | The total size of requests in bytes received by a service. |
|
||||
| Responses bytes total | Count | `code`, `method`, `protocol`, `service` | The total size of responses in bytes returned by a service. |
|
||||
|
||||
```opentelemetry tab="OpenTelemetry"
|
||||
traefik_service_requests_total
|
||||
traefik_service_requests_tls_total
|
||||
traefik_service_request_duration_seconds
|
||||
traefik_service_retries_total
|
||||
traefik_service_server_up
|
||||
traefik_service_requests_bytes_total
|
||||
traefik_service_responses_bytes_total
|
||||
```
|
||||
|
||||
```prom tab="Prometheus"
|
||||
traefik_service_requests_total
|
||||
traefik_service_requests_tls_total
|
||||
traefik_service_request_duration_seconds
|
||||
traefik_service_retries_total
|
||||
traefik_service_server_up
|
||||
traefik_service_requests_bytes_total
|
||||
traefik_service_responses_bytes_total
|
||||
```
|
||||
|
||||
```dd tab="Datadog"
|
||||
service.request.total
|
||||
router.service.tls.total
|
||||
service.request.duration
|
||||
service.retries.total
|
||||
service.server.up
|
||||
service.requests.bytes.total
|
||||
service.responses.bytes.total
|
||||
```
|
||||
|
||||
```influxdb tab="InfluxDB2"
|
||||
traefik.service.requests.total
|
||||
traefik.service.requests.tls.total
|
||||
traefik.service.request.duration
|
||||
traefik.service.retries.total
|
||||
traefik.service.server.up
|
||||
traefik.service.requests.bytes.total
|
||||
traefik.service.responses.bytes.total
|
||||
```
|
||||
|
||||
```statsd tab="StatsD"
|
||||
# Default prefix: "traefik"
|
||||
{prefix}.service.request.total
|
||||
{prefix}.service.request.tls.total
|
||||
{prefix}.service.request.duration
|
||||
{prefix}.service.retries.total
|
||||
{prefix}.service.server.up
|
||||
{prefix}.service.requests.bytes.total
|
||||
{prefix}.service.responses.bytes.total
|
||||
```
|
||||
|
||||
### Labels
|
||||
|
||||
Here is a comprehensive list of labels that are provided by the metrics:
|
||||
|
||||
| Label | Description | example |
|
||||
|---------------|---------------------------------------|----------------------------|
|
||||
| `cn` | Certificate Common Name | "example.com" |
|
||||
| `code` | Request code | "200" |
|
||||
| `entrypoint` | Entrypoint that handled the request | "example_entrypoint" |
|
||||
| `method` | Request Method | "GET" |
|
||||
| `protocol` | Request protocol | "http" |
|
||||
| `router` | Router that handled the request | "example_router" |
|
||||
| `sans` | Certificate Subject Alternative NameS | "example.com" |
|
||||
| `serial` | Certificate Serial Number | "123..." |
|
||||
| `service` | Service that handled the request | "example_service@provider" |
|
||||
| `tls_cipher` | TLS cipher used for the request | "TLS_FALLBACK_SCSV" |
|
||||
| `tls_version` | TLS version used for the request | "1.0" |
|
||||
| `url` | Service server url | "http://example.com" |
|
||||
|
||||
!!! info "`method` label value"
|
||||
|
||||
If the HTTP method verb on a request is not one defined in the set of common methods for [`HTTP/1.1`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods)
|
||||
or the [`PRI`](https://datatracker.ietf.org/doc/html/rfc7540#section-11.6) verb (for `HTTP/2`),
|
||||
then the value for the method label becomes `EXTENSION_METHOD`.
|
||||
|
|
|
@ -29,7 +29,7 @@ Read the [Access Logs documentation](./access-logs.md) to learn how to configure
|
|||
Traefik offers a metrics feature that provides valuable insights about the performance and usage.
|
||||
These metrics include the number of requests received, the requests duration, and more.
|
||||
|
||||
Traefik supports these metrics systems: Prometheus, Datadog, InfluxDB 2.X, and StatsD.
|
||||
On top of supporting metrics in the OpenTelemetry format, Traefik supports the following vendor specific metrics systems: Prometheus, Datadog, InfluxDB 2.X, and StatsD.
|
||||
|
||||
Read the [Metrics documentation](./metrics/overview.md) to learn how to configure it.
|
||||
|
||||
|
@ -37,6 +37,6 @@ Read the [Metrics documentation](./metrics/overview.md) to learn how to configur
|
|||
|
||||
The Traefik tracing system allows developers to gain deep visibility into the flow of requests through their infrastructure.
|
||||
|
||||
Traefik supports these tracing with OpenTelemetry.
|
||||
Traefik provides tracing information in the OpenTelemery format.
|
||||
|
||||
Read the [Tracing documentation](./tracing/overview.md) to learn how to configure it.
|
||||
|
|
|
@ -337,6 +337,30 @@ providers:
|
|||
--providers.kubernetescrd.allowexternalnameservices=true
|
||||
```
|
||||
|
||||
### `nativeLBByDefault`
|
||||
|
||||
_Optional, Default: false_
|
||||
|
||||
Defines whether to use Native Kubernetes load-balancing mode by default.
|
||||
For more information, please check out the IngressRoute `nativeLB` option [documentation](../routing/providers/kubernetes-crd.md#load-balancing).
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesCRD:
|
||||
nativeLBByDefault: true
|
||||
# ...
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.kubernetesCRD]
|
||||
nativeLBByDefault = true
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.kubernetescrd.nativeLBByDefault=true
|
||||
```
|
||||
|
||||
## Full Example
|
||||
|
||||
For additional information, refer to the [full example](../user-guides/crd-acme/index.md) with Let's Encrypt.
|
||||
|
|
|
@ -467,6 +467,30 @@ providers:
|
|||
--providers.kubernetesingress.allowexternalnameservices=true
|
||||
```
|
||||
|
||||
### `nativeLBByDefault`
|
||||
|
||||
_Optional, Default: false_
|
||||
|
||||
Defines whether to use Native Kubernetes load-balancing mode by default.
|
||||
For more information, please check out the `traefik.ingress.kubernetes.io/service.nativelb` [service annotation documentation](../routing/providers/kubernetes-ingress.md#on-service).
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
providers:
|
||||
kubernetesIngress:
|
||||
nativeLBByDefault: true
|
||||
# ...
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[providers.kubernetesIngress]
|
||||
nativeLBByDefault = true
|
||||
# ...
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--providers.kubernetesingress.nativeLBByDefault=true
|
||||
```
|
||||
|
||||
### Further
|
||||
|
||||
To learn more about the various aspects of the Ingress specification that Traefik supports,
|
||||
|
|
|
@ -339,6 +339,9 @@ Enable metrics on services. (Default: ```true```)
|
|||
`--metrics.otlp.explicitboundaries`:
|
||||
Boundaries for latency metrics. (Default: ```0.005000, 0.010000, 0.025000, 0.050000, 0.075000, 0.100000, 0.250000, 0.500000, 0.750000, 1.000000, 2.500000, 5.000000, 7.500000, 10.000000```)
|
||||
|
||||
`--metrics.otlp.grpc`:
|
||||
gRPC configuration for the OpenTelemetry collector. (Default: ```false```)
|
||||
|
||||
`--metrics.otlp.grpc.endpoint`:
|
||||
Sets the gRPC endpoint (host:port) of the collector. (Default: ```localhost:4317```)
|
||||
|
||||
|
@ -360,6 +363,9 @@ TLS insecure skip verify (Default: ```false```)
|
|||
`--metrics.otlp.grpc.tls.key`:
|
||||
TLS key
|
||||
|
||||
`--metrics.otlp.http`:
|
||||
HTTP configuration for the OpenTelemetry collector. (Default: ```false```)
|
||||
|
||||
`--metrics.otlp.http.endpoint`:
|
||||
Sets the HTTP endpoint (scheme://host:port/path) of the collector. (Default: ```https://localhost:4318```)
|
||||
|
||||
|
@ -714,6 +720,9 @@ Kubernetes label selector to use.
|
|||
`--providers.kubernetescrd.namespaces`:
|
||||
Kubernetes namespaces.
|
||||
|
||||
`--providers.kubernetescrd.nativelbbydefault`:
|
||||
Defines whether to use Native Kubernetes load-balancing mode by default. (Default: ```false```)
|
||||
|
||||
`--providers.kubernetescrd.throttleduration`:
|
||||
Ingress refresh throttle duration (Default: ```0```)
|
||||
|
||||
|
@ -795,6 +804,9 @@ Kubernetes Ingress label selector to use.
|
|||
`--providers.kubernetesingress.namespaces`:
|
||||
Kubernetes namespaces.
|
||||
|
||||
`--providers.kubernetesingress.nativelbbydefault`:
|
||||
Defines whether to use Native Kubernetes load-balancing mode by default. (Default: ```false```)
|
||||
|
||||
`--providers.kubernetesingress.throttleduration`:
|
||||
Ingress refresh throttle duration (Default: ```0```)
|
||||
|
||||
|
@ -1050,6 +1062,9 @@ Defines additional attributes (key:value) on all spans.
|
|||
`--tracing.otlp`:
|
||||
Settings for OpenTelemetry. (Default: ```false```)
|
||||
|
||||
`--tracing.otlp.grpc`:
|
||||
gRPC configuration for the OpenTelemetry collector. (Default: ```false```)
|
||||
|
||||
`--tracing.otlp.grpc.endpoint`:
|
||||
Sets the gRPC endpoint (host:port) of the collector. (Default: ```localhost:4317```)
|
||||
|
||||
|
@ -1071,6 +1086,9 @@ TLS insecure skip verify (Default: ```false```)
|
|||
`--tracing.otlp.grpc.tls.key`:
|
||||
TLS key
|
||||
|
||||
`--tracing.otlp.http`:
|
||||
HTTP configuration for the OpenTelemetry collector. (Default: ```false```)
|
||||
|
||||
`--tracing.otlp.http.endpoint`:
|
||||
Sets the HTTP endpoint (scheme://host:port/path) of the collector. (Default: ```https://localhost:4318```)
|
||||
|
||||
|
|
|
@ -339,6 +339,9 @@ Enable metrics on services. (Default: ```true```)
|
|||
`TRAEFIK_METRICS_OTLP_EXPLICITBOUNDARIES`:
|
||||
Boundaries for latency metrics. (Default: ```0.005000, 0.010000, 0.025000, 0.050000, 0.075000, 0.100000, 0.250000, 0.500000, 0.750000, 1.000000, 2.500000, 5.000000, 7.500000, 10.000000```)
|
||||
|
||||
`TRAEFIK_METRICS_OTLP_GRPC`:
|
||||
gRPC configuration for the OpenTelemetry collector. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_METRICS_OTLP_GRPC_ENDPOINT`:
|
||||
Sets the gRPC endpoint (host:port) of the collector. (Default: ```localhost:4317```)
|
||||
|
||||
|
@ -360,6 +363,9 @@ TLS insecure skip verify (Default: ```false```)
|
|||
`TRAEFIK_METRICS_OTLP_GRPC_TLS_KEY`:
|
||||
TLS key
|
||||
|
||||
`TRAEFIK_METRICS_OTLP_HTTP`:
|
||||
HTTP configuration for the OpenTelemetry collector. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_METRICS_OTLP_HTTP_ENDPOINT`:
|
||||
Sets the HTTP endpoint (scheme://host:port/path) of the collector. (Default: ```https://localhost:4318```)
|
||||
|
||||
|
@ -714,6 +720,9 @@ Kubernetes label selector to use.
|
|||
`TRAEFIK_PROVIDERS_KUBERNETESCRD_NAMESPACES`:
|
||||
Kubernetes namespaces.
|
||||
|
||||
`TRAEFIK_PROVIDERS_KUBERNETESCRD_NATIVELBBYDEFAULT`:
|
||||
Defines whether to use Native Kubernetes load-balancing mode by default. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_KUBERNETESCRD_THROTTLEDURATION`:
|
||||
Ingress refresh throttle duration (Default: ```0```)
|
||||
|
||||
|
@ -795,6 +804,9 @@ Kubernetes Ingress label selector to use.
|
|||
`TRAEFIK_PROVIDERS_KUBERNETESINGRESS_NAMESPACES`:
|
||||
Kubernetes namespaces.
|
||||
|
||||
`TRAEFIK_PROVIDERS_KUBERNETESINGRESS_NATIVELBBYDEFAULT`:
|
||||
Defines whether to use Native Kubernetes load-balancing mode by default. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_PROVIDERS_KUBERNETESINGRESS_THROTTLEDURATION`:
|
||||
Ingress refresh throttle duration (Default: ```0```)
|
||||
|
||||
|
@ -1050,6 +1062,9 @@ Defines additional attributes (key:value) on all spans.
|
|||
`TRAEFIK_TRACING_OTLP`:
|
||||
Settings for OpenTelemetry. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_TRACING_OTLP_GRPC`:
|
||||
gRPC configuration for the OpenTelemetry collector. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_TRACING_OTLP_GRPC_ENDPOINT`:
|
||||
Sets the gRPC endpoint (host:port) of the collector. (Default: ```localhost:4317```)
|
||||
|
||||
|
@ -1071,6 +1086,9 @@ TLS insecure skip verify (Default: ```false```)
|
|||
`TRAEFIK_TRACING_OTLP_GRPC_TLS_KEY`:
|
||||
TLS key
|
||||
|
||||
`TRAEFIK_TRACING_OTLP_HTTP`:
|
||||
HTTP configuration for the OpenTelemetry collector. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_TRACING_OTLP_HTTP_ENDPOINT`:
|
||||
Sets the HTTP endpoint (scheme://host:port/path) of the collector. (Default: ```https://localhost:4318```)
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@
|
|||
allowEmptyServices = true
|
||||
allowExternalNameServices = true
|
||||
disableIngressClassLookup = true
|
||||
nativeLBByDefault = true
|
||||
[providers.kubernetesIngress.ingressEndpoint]
|
||||
ip = "foobar"
|
||||
hostname = "foobar"
|
||||
|
@ -139,6 +140,7 @@
|
|||
ingressClass = "foobar"
|
||||
throttleDuration = "42s"
|
||||
allowEmptyServices = true
|
||||
nativeLBByDefault = true
|
||||
[providers.kubernetesGateway]
|
||||
endpoint = "foobar"
|
||||
token = "foobar"
|
||||
|
|
|
@ -141,6 +141,7 @@ providers:
|
|||
allowEmptyServices: true
|
||||
allowExternalNameServices: true
|
||||
disableIngressClassLookup: true
|
||||
nativeLBByDefault: true
|
||||
kubernetesCRD:
|
||||
endpoint: foobar
|
||||
token: foobar
|
||||
|
@ -154,6 +155,7 @@ providers:
|
|||
ingressClass: foobar
|
||||
throttleDuration: 42s
|
||||
allowEmptyServices: true
|
||||
nativeLBByDefault: true
|
||||
kubernetesGateway:
|
||||
endpoint: foobar
|
||||
token: foobar
|
||||
|
|
|
@ -901,15 +901,15 @@ More information in the dedicated [mirroring](../services/index.md#mirroring-ser
|
|||
|
||||
spec:
|
||||
mirroring:
|
||||
name: svc1
|
||||
name: svc1 # svc1 receives 100% of the traffic
|
||||
port: 80
|
||||
mirrors:
|
||||
- name: svc2
|
||||
- name: svc2 # svc2 receives a copy of 20% of this traffic
|
||||
port: 80
|
||||
percent: 20
|
||||
- name: svc3
|
||||
- name: svc3 # svc3 receives a copy of 15% of this traffic
|
||||
kind: TraefikService
|
||||
percent: 20
|
||||
percent: 15
|
||||
```
|
||||
|
||||
```yaml tab="Mirroring Traefik Service"
|
||||
|
@ -922,15 +922,15 @@ More information in the dedicated [mirroring](../services/index.md#mirroring-ser
|
|||
|
||||
spec:
|
||||
mirroring:
|
||||
name: wrr1
|
||||
name: wrr1 # wrr1 receives 100% of the traffic
|
||||
kind: TraefikService
|
||||
mirrors:
|
||||
- name: svc2
|
||||
port: 80
|
||||
percent: 20
|
||||
- name: svc3
|
||||
kind: TraefikService
|
||||
percent: 20
|
||||
mirrors:
|
||||
- name: svc2 # svc2 receives a copy of 20% of this traffic
|
||||
port: 80
|
||||
percent: 20
|
||||
- name: svc3 # svc3 receives a copy of 10% of this traffic
|
||||
kind: TraefikService
|
||||
percent: 10
|
||||
```
|
||||
|
||||
```yaml tab="K8s Service"
|
||||
|
|
|
@ -368,7 +368,7 @@ Path are always starting with a `/`, except for `PathRegexp`.
|
|||
[case-insensitively](https://en.wikipedia.org/wiki/Case_sensitivity):
|
||||
|
||||
```yaml
|
||||
HostRegexp(`(?i)^/products`)
|
||||
PathRegexp(`(?i)^/products`)
|
||||
```
|
||||
|
||||
#### Query and QueryRegexp
|
||||
|
@ -827,7 +827,7 @@ http:
|
|||
```
|
||||
|
||||
!!! info "Multiple Hosts in a Rule"
|
||||
The rule ```Host(`test1.example.com`,`test2.example.com`)``` will request a certificate with the main domain `test1.example.com` and SAN `test2.example.com`.
|
||||
The rule ```Host(`test1.example.com`) || Host(`test2.example.com`)``` will request a certificate with the main domain `test1.example.com` and SAN `test2.example.com`.
|
||||
|
||||
#### `domains`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue