mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
388c7e898c
* metrics: move `metrics` up, outside `servers` This change moves the metrics configuration from per-server level to a single config knob within the `http` app. Enabling `metrics` in any of the configured servers inside `http` enables metrics for all servers. Fix #6604 Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com> * normalize domain name --------- Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
39 lines
No EOL
402 B
Text
39 lines
No EOL
402 B
Text
{
|
|
metrics
|
|
servers :80 {
|
|
metrics {
|
|
per_host
|
|
}
|
|
}
|
|
}
|
|
:80 {
|
|
respond "Hello"
|
|
}
|
|
|
|
----------
|
|
{
|
|
"apps": {
|
|
"http": {
|
|
"servers": {
|
|
"srv0": {
|
|
"listen": [
|
|
":80"
|
|
],
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"body": "Hello",
|
|
"handler": "static_response"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"metrics": {
|
|
"per_host": true
|
|
}
|
|
}
|
|
}
|
|
} |