traefik/docs/content/observability/metrics/statsd.md

155 lines
2.3 KiB
Markdown
Raw Normal View History

---
title: "Traefik StatsD Documentation"
description: "Traefik supports several metrics backends, including StatsD. Learn how to implement it for observability in Traefik Proxy. Read the technical documentation."
---
2019-07-18 19:36:05 +00:00
# StatsD
To enable the Statsd:
2019-07-22 07:58:04 +00:00
```yaml tab="File (YAML)"
2019-07-18 19:36:05 +00:00
metrics:
statsD: {}
2019-07-18 19:36:05 +00:00
```
```toml tab="File (TOML)"
[metrics]
[metrics.statsD]
```
2019-07-18 19:36:05 +00:00
```bash tab="CLI"
2019-07-22 07:58:04 +00:00
--metrics.statsd=true
2019-07-18 19:36:05 +00:00
```
#### `address`
_Required, Default="localhost:8125"_
Address instructs exporter to send metrics to statsd at this address.
2019-07-22 07:58:04 +00:00
```yaml tab="File (YAML)"
2019-07-18 19:36:05 +00:00
metrics:
statsD:
2019-07-18 19:36:05 +00:00
address: localhost:8125
```
```toml tab="File (TOML)"
[metrics]
[metrics.statsD]
address = "localhost:8125"
```
2019-07-18 19:36:05 +00:00
```bash tab="CLI"
--metrics.statsd.address=localhost:8125
2019-07-18 19:36:05 +00:00
```
#### `addEntryPointsLabels`
_Optional, Default=true_
Enable metrics on entry points.
2019-07-22 07:58:04 +00:00
```yaml tab="File (YAML)"
2019-07-18 19:36:05 +00:00
metrics:
statsD:
2019-07-18 19:36:05 +00:00
addEntryPointsLabels: true
```
```toml tab="File (TOML)"
[metrics]
[metrics.statsD]
addEntryPointsLabels = true
```
2019-07-18 19:36:05 +00:00
```bash tab="CLI"
--metrics.statsd.addEntryPointsLabels=true
```
#### `addRoutersLabels`
2021-04-30 08:22:04 +00:00
_Optional, Default=false_
Enable metrics on entry points.
```yaml tab="File (YAML)"
metrics:
statsD:
addRoutersLabels: true
```
2022-02-03 14:16:12 +00:00
```toml tab="File (TOML)"
[metrics]
[metrics.statsD]
addRoutersLabels = true
```
2021-04-30 08:22:04 +00:00
```bash tab="CLI"
--metrics.statsd.addrouterslabels=true
```
2019-07-18 19:36:05 +00:00
#### `addServicesLabels`
_Optional, Default=true_
Enable metrics on services.
2019-07-22 07:58:04 +00:00
```yaml tab="File (YAML)"
2019-07-18 19:36:05 +00:00
metrics:
statsD:
2019-07-18 19:36:05 +00:00
addServicesLabels: true
```
```toml tab="File (TOML)"
[metrics]
[metrics.statsD]
addServicesLabels = true
```
2019-07-18 19:36:05 +00:00
```bash tab="CLI"
--metrics.statsd.addServicesLabels=true
```
#### `pushInterval`
_Optional, Default=10s_
The interval used by the exporter to push metrics to statsD.
2019-07-22 07:58:04 +00:00
```yaml tab="File (YAML)"
2019-07-18 19:36:05 +00:00
metrics:
statsD:
2019-07-18 19:36:05 +00:00
pushInterval: 10s
```
```toml tab="File (TOML)"
[metrics]
[metrics.statsD]
2022-02-03 14:16:12 +00:00
pushInterval = "10s"
```
2019-07-18 19:36:05 +00:00
```bash tab="CLI"
--metrics.statsd.pushInterval=10s
```
#### `prefix`
_Optional, Default="traefik"_
The prefix to use for metrics collection.
```yaml tab="File (YAML)"
metrics:
statsD:
prefix: traefik
```
```toml tab="File (TOML)"
[metrics]
[metrics.statsD]
prefix = "traefik"
```
```bash tab="CLI"
2022-02-03 14:16:12 +00:00
--metrics.statsd.prefix=traefik
2021-04-30 08:22:04 +00:00
```