-
Notifications
You must be signed in to change notification settings - Fork 33
/
metrics.go
51 lines (44 loc) · 1.57 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
39
40
41
42
43
44
45
46
47
48
49
50
51
package voter
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
createLag = promauto.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "halo",
Subsystem: "voter",
Name: "create_lag_seconds",
Help: "Latest lag between vote creation and xblock timestamp (in seconds) per source chain. " +
"Alert if too high.",
}, []string{"chain"})
createHeight = promauto.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "halo",
Subsystem: "voter",
Name: "create_height",
Help: "Latest created vote height per source chain. Alert if not growing.",
}, []string{"chain"})
commitHeight = promauto.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "halo",
Subsystem: "voter",
Name: "commit_height",
Help: "Latest committed vote height per source chain. Alert if not growing.",
}, []string{"chain"})
availableCount = promauto.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "halo",
Subsystem: "voter",
Name: "available_votes",
Help: "Current number of available votes per source chain. Alert if growing.",
}, []string{"chain"})
proposedCount = promauto.NewGaugeVec(prometheus.GaugeOpts{
Namespace: "halo",
Subsystem: "voter",
Name: "proposed_votes",
Help: "Current number of proposed votes per source chain. Alert if growing.",
}, []string{"chain"})
trimTotal = promauto.NewCounterVec(prometheus.CounterOpts{
Namespace: "halo",
Subsystem: "voter",
Name: "trim_total",
Help: "Total number of votes trimmed per source chain.",
}, []string{"chain"})
)