add zones label to cache metrics (#5124)

* add zones to cache metrics

Signed-off-by: Elijah Andrews <elijahcandrews@gmail.com>
This commit is contained in:
Elijah Andrews
2022-02-14 12:10:30 -05:00
committed by GitHub
parent d97dbbef61
commit 80195c399f
5 changed files with 35 additions and 31 deletions

View File

@@ -73,14 +73,14 @@ Entries with 0 TTL will remain in the cache until randomly evicted when the shar
If monitoring is enabled (via the *prometheus* plugin) then the following metrics are exported:
* `coredns_cache_entries{server, type}` - Total elements in the cache by cache type.
* `coredns_cache_hits_total{server, type}` - Counter of cache hits by cache type.
* `coredns_cache_misses_total{server}` - Counter of cache misses. - Deprecated, derive misses from cache hits/requests counters.
* `coredns_cache_requests_total{server}` - Counter of cache requests.
* `coredns_cache_prefetch_total{server}` - Counter of times the cache has prefetched a cached item.
* `coredns_cache_drops_total{server}` - Counter of responses excluded from the cache due to request/response question name mismatch.
* `coredns_cache_served_stale_total{server}` - Counter of requests served from stale cache entries.
* `coredns_cache_evictions_total{server, type}` - Counter of cache evictions.
* `coredns_cache_entries{server, type, zones}` - Total elements in the cache by cache type.
* `coredns_cache_hits_total{server, type, zones}` - Counter of cache hits by cache type.
* `coredns_cache_misses_total{server, zones}` - Counter of cache misses. - Deprecated, derive misses from cache hits/requests counters.
* `coredns_cache_requests_total{server, zones}` - Counter of cache requests.
* `coredns_cache_prefetch_total{server, zones}` - Counter of times the cache has prefetched a cached item.
* `coredns_cache_drops_total{server, zones}` - Counter of responses excluded from the cache due to request/response question name mismatch.
* `coredns_cache_served_stale_total{server, zones}` - Counter of requests served from stale cache entries.
* `coredns_cache_evictions_total{server, type, zones}` - Counter of cache evictions.
Cache types are either "denial" or "success". `Server` is the server handling the request, see the
prometheus plugin for documentation.