这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions collector/remote_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@ func NewRemoteInfo(logger log.Logger, client *http.Client, url *url.URL) *Remote
},
Labels: defaultRemoteInfoLabelValues,
},
{
Type: prometheus.GaugeValue,
Desc: prometheus.NewDesc(
prometheus.BuildFQName(namespace, "remote_info", "num_proxy_sockets_connected"),
"Number of proxy sockets connected", defaulRemoteInfoLabels, nil,
),
Value: func(remoteStats RemoteCluster) float64 {
return float64(remoteStats.NumProxySocketsConnected)
},
Labels: defaultRemoteInfoLabelValues,
},
{
Type: prometheus.GaugeValue,
Desc: prometheus.NewDesc(
Expand Down
1 change: 1 addition & 0 deletions collector/remote_info_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type RemoteCluster struct {
Seeds []string `json:"seeds"`
Connected bool `json:"connected"`
NumNodesConnected int64 `json:"num_nodes_connected"`
NumProxySocketsConnected int64 `json:"num_proxy_sockets_connected"`
MaxConnectionsPerCluster int64 `json:"max_connections_per_cluster"`
InitialConnectTimeout string `json:"initial_connect_timeout"`
SkipUnavailable bool `json:"skip_unavailable"`
Expand Down