coredns-ldap/metrics.go

20 lines
471 B
Go
Raw Normal View History

2020-06-01 07:48:07 +00:00
package ldap
import (
"sync"
"github.com/coredns/coredns/plugin"
"github.com/prometheus/client_golang/prometheus"
)
2020-06-01 07:48:07 +00:00
// requestCount exports a prometheus metric that is incremented every time a query is seen by the ldap plugin.
var requestCount = prometheus.NewCounterVec(prometheus.CounterOpts{
Namespace: plugin.Namespace,
2020-06-01 07:48:07 +00:00
Subsystem: "ldap",
Name: "request_count_total",
Help: "Counter of requests made.",
}, []string{"server"})
var once sync.Once