diff --git a/plugin/metrics/README.md b/plugin/metrics/README.md index 714b17bd2..1abb5b40c 100644 --- a/plugin/metrics/README.md +++ b/plugin/metrics/README.md @@ -48,6 +48,15 @@ Use an alternative address: } ~~~ +Or via an enviroment variable (this is supported throughout the Corefile): `export PORT=9253`, and +then: + +~~~ corefile +. { + prometheus localhost:{$PORT} +} +~~~ + # Bugs When reloading, we keep the handler running, meaning that any changes to the handler's address diff --git a/test/readme_test.go b/test/readme_test.go index 80b6feeb7..dcbb56619 100644 --- a/test/readme_test.go +++ b/test/readme_test.go @@ -14,15 +14,14 @@ import ( "github.com/mholt/caddy" ) -// Pasrse all README.md's of the plugin and check if every example Corefile -// actually works. Each corefile is only used if the language is set to 'corefile': +// TestReadme parses all README.md's of the plugins and checks if every example Corefile +// actually works. Each corefile snippet is only used if the language is set to 'corefile': // // ~~~ corefile // . { // # check-this-please // } // ~~~ - func TestReadme(t *testing.T) { port := 30053 caddy.Quiet = true