Add new gauge to show currently available proxies

This commit is contained in:
Cecylia Bocovich 2021-03-31 17:22:31 -04:00
parent 92bd900bc5
commit 2a310682b5
2 changed files with 16 additions and 3 deletions

View file

@ -261,9 +261,10 @@ func binCount(count uint) uint {
}
type PromMetrics struct {
ProxyTotal *prometheus.CounterVec
ProxyPollTotal *RoundedCounterVec
ClientPollTotal *RoundedCounterVec
ProxyTotal *prometheus.CounterVec
ProxyPollTotal *RoundedCounterVec
ClientPollTotal *RoundedCounterVec
AvailableProxies *prometheus.GaugeVec
}
//Initialize metrics for prometheus exporter
@ -280,6 +281,15 @@ func initPrometheus() *PromMetrics {
[]string{"type", "nat", "cc"},
)
promMetrics.AvailableProxies = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: prometheusNamespace,
Name: "available_proxies",
Help: "The number of currently available snowflake proxies",
},
[]string{"type", "nat"},
)
promMetrics.ProxyPollTotal = NewRoundedCounterVec(
prometheus.CounterOpts{
Namespace: prometheusNamespace,