added pty terminal support to the client side
This commit is contained in:
@ -10,6 +10,7 @@ type ClientCollector struct {
|
||||
ClientConns *prometheus.Desc
|
||||
ClientRoutes *prometheus.Desc
|
||||
ClientPeers *prometheus.Desc
|
||||
PtsSessions *prometheus.Desc
|
||||
}
|
||||
|
||||
// NewClientCollector returns a new ClientCollector with all prometheus.Desc initialized
|
||||
@ -46,6 +47,11 @@ func NewClientCollector(client *Client) ClientCollector {
|
||||
"Number of client-side peers",
|
||||
nil, nil,
|
||||
),
|
||||
PtsSessions: prometheus.NewDesc(
|
||||
prefix + "pts_sessions",
|
||||
"Number of pts sessions",
|
||||
nil, nil,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,4 +90,10 @@ func (c ClientCollector) Collect(ch chan<- prometheus.Metric) {
|
||||
prometheus.GaugeValue,
|
||||
float64(c.client.stats.peers.Load()),
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.PtsSessions,
|
||||
prometheus.GaugeValue,
|
||||
float64(c.client.stats.pts_sessions.Load()),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user