Enhance web backend documentation
This commit is contained in:
parent
5229b7cfba
commit
1a2544610d
1 changed files with 58 additions and 13 deletions
|
@ -15,6 +15,7 @@ Træfik can be configured:
|
||||||
# Web administration port.
|
# Web administration port.
|
||||||
#
|
#
|
||||||
# Required
|
# Required
|
||||||
|
# Default: ":8080"
|
||||||
#
|
#
|
||||||
address = ":8080"
|
address = ":8080"
|
||||||
|
|
||||||
|
@ -29,11 +30,6 @@ address = ":8080"
|
||||||
#
|
#
|
||||||
# Optional
|
# Optional
|
||||||
# readOnly = false
|
# readOnly = false
|
||||||
|
|
||||||
# Enable more detailed statistics.
|
|
||||||
#
|
|
||||||
# [web.statistics]
|
|
||||||
# recentErrors = 10
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Web UI
|
## Web UI
|
||||||
|
@ -47,7 +43,7 @@ address = ":8080"
|
||||||
!!! note
|
!!! note
|
||||||
The `/ping` path of the api is excluded from authentication (since 1.4).
|
The `/ping` path of the api is excluded from authentication (since 1.4).
|
||||||
|
|
||||||
- Basic Authentication
|
#### Basic Authentication
|
||||||
|
|
||||||
Passwords can be encoded in MD5, SHA1 and BCrypt: you can use `htpasswd` to generate those ones.
|
Passwords can be encoded in MD5, SHA1 and BCrypt: you can use `htpasswd` to generate those ones.
|
||||||
|
|
||||||
|
@ -66,7 +62,7 @@ usersFile = "/path/to/.htpasswd"
|
||||||
# ...
|
# ...
|
||||||
```
|
```
|
||||||
|
|
||||||
- Digest Authentication
|
#### Digest Authentication
|
||||||
|
|
||||||
You can use `htdigest` to generate those ones.
|
You can use `htdigest` to generate those ones.
|
||||||
|
|
||||||
|
@ -90,7 +86,7 @@ usersFile = "/path/to/.htdigest"
|
||||||
|
|
||||||
You can enable Traefik to export internal metrics to different monitoring systems.
|
You can enable Traefik to export internal metrics to different monitoring systems.
|
||||||
|
|
||||||
- Prometheus
|
### Prometheus
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[web]
|
[web]
|
||||||
|
@ -98,12 +94,17 @@ You can enable Traefik to export internal metrics to different monitoring system
|
||||||
|
|
||||||
# To enable Traefik to export internal metrics to Prometheus
|
# To enable Traefik to export internal metrics to Prometheus
|
||||||
[web.metrics.prometheus]
|
[web.metrics.prometheus]
|
||||||
|
|
||||||
|
# Buckets for latency metrics
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
# Default: [0.1, 0.3, 1.2, 5]
|
||||||
buckets=[0.1,0.3,1.2,5.0]
|
buckets=[0.1,0.3,1.2,5.0]
|
||||||
|
|
||||||
# ...
|
# ...
|
||||||
```
|
```
|
||||||
|
|
||||||
- DataDog
|
### DataDog
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[web]
|
[web]
|
||||||
|
@ -111,13 +112,25 @@ buckets=[0.1,0.3,1.2,5.0]
|
||||||
|
|
||||||
# DataDog metrics exporter type
|
# DataDog metrics exporter type
|
||||||
[web.metrics.datadog]
|
[web.metrics.datadog]
|
||||||
|
|
||||||
|
# DataDog's address.
|
||||||
|
#
|
||||||
|
# Required
|
||||||
|
# Default: "localhost:8125"
|
||||||
|
#
|
||||||
address = "localhost:8125"
|
address = "localhost:8125"
|
||||||
|
|
||||||
|
# DataDog push interval
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
# Default: "10s"
|
||||||
|
#
|
||||||
pushinterval = "10s"
|
pushinterval = "10s"
|
||||||
|
|
||||||
# ...
|
# ...
|
||||||
```
|
```
|
||||||
|
|
||||||
- StatsD
|
### StatsD
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[web]
|
[web]
|
||||||
|
@ -125,12 +138,44 @@ pushinterval = "10s"
|
||||||
|
|
||||||
# StatsD metrics exporter type
|
# StatsD metrics exporter type
|
||||||
[web.metrics.statsd]
|
[web.metrics.statsd]
|
||||||
|
|
||||||
|
# StatD's address.
|
||||||
|
#
|
||||||
|
# Required
|
||||||
|
# Default: "localhost:8125"
|
||||||
|
#
|
||||||
address = "localhost:8125"
|
address = "localhost:8125"
|
||||||
|
|
||||||
|
# StatD push interval
|
||||||
|
#
|
||||||
|
# Optional
|
||||||
|
# Default: "10s"
|
||||||
|
#
|
||||||
pushinterval = "10s"
|
pushinterval = "10s"
|
||||||
|
|
||||||
# ...
|
# ...
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Statistics
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[web]
|
||||||
|
# ...
|
||||||
|
|
||||||
|
# Enable more detailed statistics.
|
||||||
|
[web.statistics]
|
||||||
|
|
||||||
|
# Number of recent errors logged.
|
||||||
|
#
|
||||||
|
# Default: 10
|
||||||
|
#
|
||||||
|
recentErrors = 10
|
||||||
|
|
||||||
|
# ...
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
||||||
| Path | Method | Description |
|
| Path | Method | Description |
|
||||||
|
@ -156,7 +201,7 @@ pushinterval = "10s"
|
||||||
#### Ping
|
#### Ping
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ curl -sv "http://localhost:8080/ping"
|
curl -sv "http://localhost:8080/ping"
|
||||||
```
|
```
|
||||||
```shell
|
```shell
|
||||||
* Trying ::1...
|
* Trying ::1...
|
||||||
|
@ -178,7 +223,7 @@ OK
|
||||||
#### Health
|
#### Health
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ curl -s "http://localhost:8080/health" | jq .
|
curl -s "http://localhost:8080/health" | jq .
|
||||||
```
|
```
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -239,7 +284,7 @@ $ curl -s "http://localhost:8080/health" | jq .
|
||||||
#### Provider configurations
|
#### Provider configurations
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ curl -s "http://localhost:8080/api" | jq .
|
curl -s "http://localhost:8080/api" | jq .
|
||||||
```
|
```
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue