Metrics
Traefik Hub API Gateway provides metrics in the OpenTelemetry format as well as the following vendor specific backends:
Official Dashboard
Traefik Proxy hosts an official Grafana dashboard for both on-premises and Kubernetes deployments that are can be used to monitor Hub API Gateway metrics too.
Helm Chart Configuration Options
Traefik Hub API Gateway can be configured to provide metrics to the OpenTelemetry format using the Helm Chart values.
To know more about the Helm Chart options, refer to Helm Chart reference page (Options metrics.otlp
).
Disable Prometheus Metrics
By default, the Traefik Hub API Gateway enables the Prometheus metrics. Disbale them adding the following option:
metrics:
prometheus:
enabled: false
Configuration Options
The section below describe how to configure Traefik Hub API Gateway to provide metrics using the static configuration.
Open Telemetry
Field | Description | Default | Required |
---|---|---|---|
metrics.otlp.addInternals | Enables metrics for internal resources (e.g.: ping@internals ). | false | No |
metrics.otlp.addEntryPointsLabels | Enable metrics on entry points. | true | No |
metrics.otlp.addRoutersLabels | Enable metrics on routers. | false | No |
metrics.otlp.addServicesLabels | Enable metrics on services. | true | No |
metrics.otlp.explicitBoundaries | Explicit boundaries for Histogram data points. | ".005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10" | No |
metrics.otlp.pushInterval | Interval at which metrics are sent to the OpenTelemetry Collector. | 10s | No |
metrics.otlp.http | This instructs the exporter to send the metrics to the OpenTelemetry Collector using HTTP. Setting the sub-options with their default values. | null/false | No |
metrics.otlp.http.endpoint | URL of the OpenTelemetry Collector to send metrics to. Format=" <scheme>://<host>:<port><path> " | "http://localhost:4318/v1/metrics" | Yes |
metrics.otlp.http.headers | Additional headers sent with metrics by the exporter to the OpenTelemetry Collector. | No | |
metrics.otlp.http.tls.ca | Path to the certificate authority used for the secure connection to the OpenTelemetry Collector, it defaults to the system bundle. | "" | No |
metrics.otlp.http.tls.cert | Path to the public certificate used for the secure connection to the OpenTelemetry Collector. When using this option, setting the key option is required. | "" | No |
metrics.otlp.http.tls.key | This instructs the exporter to send the metrics to the OpenTelemetry Collector using HTTP. Setting the sub-options with their default values. | ""null/false "" | No |
metrics.otlp.http.tls.insecureskipverify | Allow the TLS connection to the OpenTelemetry Collector accepts any certificate presented by the server regardless of the hostnames it covers. | false | Yes |
metrics.otlp.grpc | This instructs the exporter to send metrics to the OpenTelemetry Collector using gRPC. | null/false | No |
metrics.otlp.grpc.endpoint | Address of the OpenTelemetry Collector to send metrics to. Format=" <host>:<port> " | "localhost:4317" | Yes |
metrics.otlp.grpc.headers | Additional headers sent with metrics by the exporter to the OpenTelemetry Collector. | No | |
metrics.otlp.http.grpc.insecure | Allows exporter to send metrics to the OpenTelemetry Collector without using a secured protocol. | false | Yes |
metrics.otlp.grpc.tls.ca | Path to the certificate authority used for the secure connection to the OpenTelemetry Collector, it defaults to the system bundle. | "" | No |
metrics.otlp.grpc.tls.cert | Path to the public certificate used for the secure connection to the OpenTelemetry Collector. When using this option, setting the key option is required. | "" | No |
metrics.otlp.grpc.tls.key | This instructs the exporter to send the metrics to the OpenTelemetry Collector using HTTP. Setting the sub-options with their default values. | ""null/false "" | No |
metrics.otlp.grpc.tls.insecureskipverify | Allow the TLS connection to the OpenTelemetry Collector accepts any certificate presented by the server regardless of the hostnames it covers. | false | Yes |
Datadog
Field | Description | Default | Required |
---|---|---|---|
metrics.datadog.addInternals | Enables metrics for internal resources (e.g.: ping@internals ). | false | No |
metrics.datadog.addEntryPointsLabels | Enable metrics on entry points. | true | No |
metrics.datadog.addRoutersLabels | Enable metrics on routers. | false | No |
metrics.datadog.addServicesLabels | Enable metrics on services. | true | No |
metrics.datadog.pushInterval | The interval used by the exporter to push metrics to DataDog server. | 10s | No |
metrics.datadog.address | Address instructs exporter to send metrics to datadog-agent at this address. This address can be a Unix Domain Socket (UDS) address with the following form: unix:///path/to/datadog.socket . | "127.0.0.1:8125" | Yes |
metrics.datadog.prefix | The prefix to use for metrics collection. | "traefik" | No |
InfluxDB v2
Field | Description | Default | Required |
---|---|---|---|
metrics.influxDB2.addInternals | Enables metrics for internal resources (e.g.: ping@internals ). | false | No |
metrics.influxDB2.addEntryPointsLabels | Enable metrics on entry points. | true | No |
metrics.influxDB2.addRoutersLabels | Enable metrics on routers. | false | No |
metrics.influxDB2.addServicesLabels | Enable metrics on services. | true | No |
metrics.influxDB2.additionalLabels | Additional labels (InfluxDB tags) on all metrics. | {}] | No |
metrics.influxDB2.pushInterval | The interval used by the exporter to push metrics to InfluxDB server. | 10s | No |
metrics.influxDB2.address | Address of the InfluxDB v2 instance. | "http://localhost:8086" | Yes |
metrics.influxDB2.token | Token with which to connect to InfluxDB v2. | "" | Yes |
metrics.influxDB2.org | Organisation where metrics will be stored. | "" | Yes |
metrics.influxDB2.bucket | Bucket where metrics will be stored. | "" | Yes |