diff --git a/src/docs/markdown/caddyfile/options.md b/src/docs/markdown/caddyfile/options.md index 8daa55f..2e91de1 100644 --- a/src/docs/markdown/caddyfile/options.md +++ b/src/docs/markdown/caddyfile/options.md @@ -76,7 +76,9 @@ Possible options are (click on each option to jump to its documentation): } grace_period shutdown_delay - metrics + metrics { + per_host + } # TLS Options auto_https off|disable_redirects|ignore_loaded_certs|disable_certs @@ -969,6 +971,15 @@ Enables Prometheus metrics collection; necessary before scraping metrics. Note t } ``` +You can add the `per_host` option to label metrics with the host name of the metric. + +```caddy +{ + metrics { + per_host + } +} +``` ##### `trace` diff --git a/src/docs/markdown/metrics.md b/src/docs/markdown/metrics.md index 7a14283..0a59acf 100644 --- a/src/docs/markdown/metrics.md +++ b/src/docs/markdown/metrics.md @@ -17,14 +17,22 @@ If using a Caddyfile, enable metrics [in global options](/docs/caddyfile/options ```caddy { - servers { - metrics - } + metrics } ``` If using JSON, add `"metrics": {}` to your [`apps > http > servers` configuration](/docs/json/apps/http/servers/). +To add per-host metrics you can insert the `per_host` option. Host specific metrics will now have a Host tag. + +```caddy +{ + metrics { + per_host + } +} +``` + ## Prometheus [Prometheus](https://prometheus.io) is a monitoring platform that collects