-
Notifications
You must be signed in to change notification settings - Fork 0
/
metrics.go
38 lines (32 loc) · 1.01 KB
/
metrics.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package drovedns
import (
"github.com/coredns/coredns/plugin"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
DroveQueryTotal = promauto.NewCounter(prometheus.CounterOpts{
Namespace: plugin.Namespace,
Subsystem: pluginName,
Name: "sync_total",
Help: "Counter of Drove sync successful",
})
DroveQueryFailure = promauto.NewCounter(prometheus.CounterOpts{
Namespace: plugin.Namespace,
Subsystem: pluginName,
Name: "sync_failure",
Help: "Counter of Drove syncs failed",
})
DroveApiRequests = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: plugin.Namespace,
Subsystem: pluginName,
Name: "api_total",
Help: "Drove api requests total",
}, []string{"code", "method", "host"})
DroveControllerHealth = promauto.NewGaugeVec(prometheus.GaugeOpts{
Namespace: plugin.Namespace,
Subsystem: pluginName,
Name: "controller_health",
Help: "Drove controller health",
}, []string{"host"})
)