middleware/proxy: add request duration monitoring (#362)

Add a separate request duration metrics specially for proxying requests
upstream.

Fixes #259
This commit is contained in:
Miek Gieben
2016-10-28 12:54:49 +01:00
committed by GitHub
parent ba26f47d5c
commit 54964653d1
5 changed files with 52 additions and 2 deletions

View File

@@ -48,6 +48,15 @@ There are three load-balancing policies available:
All polices implement randomly spraying packets to backend hosts when *no healthy* hosts are
available. This is to preeempt the case where the healthchecking (as a mechanism) fails.
## Metrics
If monitoring is enabled (via the *prometheus* directive) then the following metric is exported:
* coredns_proxy_request_count_total{zone, proto, family}
This has some overlap with `coredns_dns_request_count_total{zone, proto, family}`, but allows for
specifics on upstream query resolving. See the *prometheus* documentation for more details.
## Examples
Proxy all requests within example.org. to a backend system: