plugin/dnssec: add per server metrics (#1743)

* plugin/dnssec: add per server metrics

final plugin.

Fixes #1696 #1492 #1189

* Move cache cap into handler so we can access the server label

* Remove cache-capacity from it entirely
This commit is contained in:
Miek Gieben
2018-04-27 19:37:31 +01:00
committed by GitHub
parent 2a28efa877
commit 85f549b529
11 changed files with 55 additions and 52 deletions

View File

@@ -36,14 +36,11 @@ func setup(c *caddy.Controller) error {
c.OnStartup(func() error {
once.Do(func() {
metrics.MustRegister(c, cacheSize, cacheCapacity, cacheHits, cacheMisses)
metrics.MustRegister(c, cacheSize, cacheHits, cacheMisses)
})
return nil
})
// Export the capacity for the metrics. This only happens once, because this is a re-load change only.
cacheCapacity.WithLabelValues("signature").Set(float64(capacity))
return nil
}