This commit is contained in:
Miek Gieben
2016-10-27 11:48:37 +00:00
parent 7ce7100122
commit 94dc28646d
18 changed files with 21 additions and 3 deletions

View File

@@ -30,4 +30,5 @@ func (m *Metrics) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
return status, err
}
// Name implements the Handler interface.
func (m *Metrics) Name() string { return "prometheus" }

View File

@@ -87,4 +87,5 @@ func prometheusParse(c *caddy.Controller) (*Metrics, error) {
var metricsOnce sync.Once
// Addr is the address the where the metrics are exported by default.
const Addr = "localhost:9153"

View File

@@ -6,6 +6,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
)
// Request* and Reponse* are the prometheus counters and gauges we are using for exporting metrics.
var (
RequestCount = prometheus.NewCounterVec(prometheus.CounterOpts{
Namespace: middleware.Namespace,