mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-26 21:53: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
|
|
}
|
|
}
|
|
}
|
|
} |