Add metrics for cache hits/misses (#375)

* Add metrics for cache hits/misses

Add counters for cache middleware hits and misses.

* Add test for cache middleware hit/miss counters.

* Fix cache hit metric incrementing.

* Add cache hit/miss metrics to dnssec middleware.

* Update README metric documentation.
This commit is contained in:
Ben Kochie
2016-10-31 19:50:50 +01:00
committed by Miek Gieben
parent 27d893cf33
commit 775d26c5e2
6 changed files with 63 additions and 6 deletions

View File

@@ -43,5 +43,7 @@ If monitoring is enabled (via the *prometheus* directive) then the following met
* coredns_dnssec_cache_size{type} - total elements in the cache, type is "signature".
* coredns_dnssec_cache_capacity{type} - total capacity of the cache, type is "signature".
* coredns_dnssec_cache_hits_total - Counter of cache hits.
* coredns_dnssec_cache_misses_total - Counter of cache misses.
## Examples