...
1 package client
2
3 import (
4 "flag"
5 "golang.conradwood.net/go-easyops/prometheus"
6 "time"
7 )
8
9 const (
10
11
12
13
14
15
16 CONST_CALL_TIMEOUT = 4
17 )
18
19 var (
20 normal_sleep_time = flag.Duration("ge_dialer_sleep_time", time.Duration(20)*time.Second, "interval in seconds before querying the registry for changes (should be lower than ge_max_block)")
21
22 blockCtr = prometheus.NewCounterVec(
23 prometheus.CounterOpts{
24 Name: "grpc_loadbalancer_no_connection",
25 Help: "counter incremented each time the loadbalancer has no instances",
26 },
27 []string{"servicename"},
28 )
29
30 failedQueryCtr = prometheus.NewCounterVec(
31 prometheus.CounterOpts{
32 Name: "grpc_loadbalancer_registry_failures",
33 Help: "counter incremented each time the loadbalancer fails to query the registry",
34 },
35 []string{},
36 )
37 )
38
39 func init() {
40 prometheus.MustRegister(blockCtr, failedQueryCtr)
41 }
42
View as plain text