-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathmetrics.go
38 lines (32 loc) · 1.07 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 redis
import (
"github.com/coredns/coredns/plugin"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
cacheHits = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: plugin.Namespace,
Subsystem: "redisc",
Name: "hits_total",
Help: "The count of cache hits.",
}, []string{"server"})
cacheMisses = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: plugin.Namespace,
Subsystem: "redisc",
Name: "misses_total",
Help: "The count of cache misses.",
}, []string{"server"})
cacheDrops = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: plugin.Namespace,
Subsystem: "redisc",
Name: "drops_total",
Help: "The number responses that are not cached, because the reply is malformed.",
}, []string{"server"})
redisErr = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: plugin.Namespace,
Subsystem: "redisc",
Name: "set_errors_total",
Help: "The count of errors when adding entries to redis.",
}, []string{"server"})
)