2019-07-18 19:36:05 +00:00
|
|
|
# Prometheus
|
|
|
|
|
|
|
|
To enable the Prometheus:
|
|
|
|
|
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[metrics]
|
|
|
|
[metrics.prometheus]
|
|
|
|
```
|
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
```yaml tab="File (YAML)"
|
2019-07-18 19:36:05 +00:00
|
|
|
metrics:
|
|
|
|
prometheus: {}
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash tab="CLI"
|
2019-07-22 07:58:04 +00:00
|
|
|
--metrics.prometheus=true
|
2019-07-18 19:36:05 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
#### `buckets`
|
|
|
|
|
|
|
|
_Optional, Default="0.100000, 0.300000, 1.200000, 5.000000"_
|
|
|
|
|
|
|
|
Buckets for latency metrics.
|
|
|
|
|
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[metrics]
|
|
|
|
[metrics.prometheus]
|
|
|
|
buckets = [0.1,0.3,1.2,5.0]
|
|
|
|
```
|
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
```yaml tab="File (YAML)"
|
2019-07-18 19:36:05 +00:00
|
|
|
metrics:
|
|
|
|
prometheus:
|
|
|
|
buckets:
|
2019-09-23 15:00:06 +00:00
|
|
|
- 0.1
|
|
|
|
- 0.3
|
|
|
|
- 1.2
|
|
|
|
- 5.0
|
2019-07-18 19:36:05 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
```bash tab="CLI"
|
|
|
|
--metrics.prometheus.buckets=0.100000, 0.300000, 1.200000, 5.000000
|
|
|
|
```
|
|
|
|
|
|
|
|
#### `addEntryPointsLabels`
|
|
|
|
|
|
|
|
_Optional, Default=true_
|
|
|
|
|
|
|
|
Enable metrics on entry points.
|
|
|
|
|
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[metrics]
|
|
|
|
[metrics.prometheus]
|
|
|
|
addEntryPointsLabels = true
|
|
|
|
```
|
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
```yaml tab="File (YAML)"
|
2019-07-18 19:36:05 +00:00
|
|
|
metrics:
|
|
|
|
prometheus:
|
|
|
|
addEntryPointsLabels: true
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash tab="CLI"
|
|
|
|
--metrics.prometheus.addEntryPointsLabels=true
|
|
|
|
```
|
|
|
|
|
|
|
|
#### `addServicesLabels`
|
|
|
|
|
|
|
|
_Optional, Default=true_
|
|
|
|
|
|
|
|
Enable metrics on services.
|
|
|
|
|
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[metrics]
|
|
|
|
[metrics.prometheus]
|
|
|
|
addServicesLabels = true
|
|
|
|
```
|
|
|
|
|
2019-07-22 07:58:04 +00:00
|
|
|
```yaml tab="File (YAML)"
|
2019-07-18 19:36:05 +00:00
|
|
|
metrics:
|
|
|
|
prometheus:
|
|
|
|
addServicesLabels: true
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash tab="CLI"
|
|
|
|
--metrics.prometheus.addServicesLabels=true
|
|
|
|
```
|
2019-09-06 13:08:04 +00:00
|
|
|
|
|
|
|
#### `entryPoint`
|
|
|
|
|
|
|
|
_Optional, Default=traefik_
|
|
|
|
|
|
|
|
Entry point used to expose metrics.
|
|
|
|
|
|
|
|
```toml tab="File (TOML)"
|
|
|
|
[entryPoints]
|
|
|
|
[entryPoints.metrics]
|
|
|
|
address = ":8082"
|
|
|
|
|
|
|
|
[metrics]
|
|
|
|
[metrics.prometheus]
|
|
|
|
entryPoint = "metrics"
|
|
|
|
```
|
|
|
|
|
|
|
|
```yaml tab="File (YAML)"
|
|
|
|
entryPoints:
|
|
|
|
metrics:
|
|
|
|
address: ":8082"
|
|
|
|
|
|
|
|
metrics:
|
|
|
|
prometheus:
|
|
|
|
entryPoint: metrics
|
|
|
|
```
|
|
|
|
|
|
|
|
```bash tab="CLI"
|
|
|
|
--entryPoints.metrics.address=":8082"
|
2019-10-07 10:32:07 +00:00
|
|
|
--metrics.prometheus.entryPoint="metrics"
|
2019-09-06 13:08:04 +00:00
|
|
|
```
|