mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 18:53:43 -04:00
plugin/nomad: Add a Nomad plugin (#7467)
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
This commit is contained in:
25
plugin/nomad/metrics.go
Normal file
25
plugin/nomad/metrics.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package nomad
|
||||
|
||||
import (
|
||||
"github.com/coredns/coredns/plugin"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
)
|
||||
|
||||
var (
|
||||
// requestSuccessCount is the number of DNS requests handled successfully.
|
||||
requestSuccessCount = promauto.NewCounterVec(prometheus.CounterOpts{
|
||||
Namespace: plugin.Namespace,
|
||||
Subsystem: pluginName,
|
||||
Name: "success_requests_total",
|
||||
Help: "Counter of DNS requests handled successfully.",
|
||||
}, []string{"server", "namespace"})
|
||||
// requestFailedCount is the number of DNS requests that failed.
|
||||
requestFailedCount = promauto.NewCounterVec(prometheus.CounterOpts{
|
||||
Namespace: plugin.Namespace,
|
||||
Subsystem: pluginName,
|
||||
Name: "failed_requests_total",
|
||||
Help: "Counter of DNS requests failed.",
|
||||
}, []string{"server", "namespace"})
|
||||
)
|
||||
Reference in New Issue
Block a user