Skip to content

Commit c0adcd6

Browse files
authored
Merge pull request #6 from rtkwlf/add_proxy_sockets
[AWN-286625] Add Proxy Socket Connections
2 parents cef6c27 + 58b8600 commit c0adcd6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

collector/remote_info.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ func NewRemoteInfo(logger log.Logger, client *http.Client, url *url.URL) *Remote
7272
},
7373
Labels: defaultRemoteInfoLabelValues,
7474
},
75+
{
76+
Type: prometheus.GaugeValue,
77+
Desc: prometheus.NewDesc(
78+
prometheus.BuildFQName(namespace, "remote_info", "num_proxy_sockets_connected"),
79+
"Number of proxy sockets connected", defaulRemoteInfoLabels, nil,
80+
),
81+
Value: func(remoteStats RemoteCluster) float64 {
82+
return float64(remoteStats.NumProxySocketsConnected)
83+
},
84+
Labels: defaultRemoteInfoLabelValues,
85+
},
7586
{
7687
Type: prometheus.GaugeValue,
7788
Desc: prometheus.NewDesc(

collector/remote_info_response.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ type RemoteCluster struct {
88
Seeds []string `json:"seeds"`
99
Connected bool `json:"connected"`
1010
NumNodesConnected int64 `json:"num_nodes_connected"`
11+
NumProxySocketsConnected int64 `json:"num_proxy_sockets_connected"`
1112
MaxConnectionsPerCluster int64 `json:"max_connections_per_cluster"`
1213
InitialConnectTimeout string `json:"initial_connect_timeout"`
1314
SkipUnavailable bool `json:"skip_unavailable"`

0 commit comments

Comments
 (0)