renamed pts to pty to avoid name collision
This commit is contained in:
@ -11,7 +11,7 @@ type ServerCollector struct {
|
||||
ServerRoutes *prometheus.Desc
|
||||
ServerPeers *prometheus.Desc
|
||||
SshProxySessions *prometheus.Desc
|
||||
PtsSessions *prometheus.Desc
|
||||
PtySessions *prometheus.Desc
|
||||
}
|
||||
|
||||
// NewServerCollector returns a new ServerCollector with all prometheus.Desc initialized
|
||||
@ -53,9 +53,9 @@ func NewServerCollector(server *Server) ServerCollector {
|
||||
"Number of SSH proxy sessions",
|
||||
nil, nil,
|
||||
),
|
||||
PtsSessions: prometheus.NewDesc(
|
||||
prefix + "pts_sessions",
|
||||
"Number of pts session",
|
||||
PtySessions: prometheus.NewDesc(
|
||||
prefix + "pty_sessions",
|
||||
"Number of pty session",
|
||||
nil, nil,
|
||||
),
|
||||
}
|
||||
@ -67,7 +67,7 @@ func (c ServerCollector) Describe(ch chan<- *prometheus.Desc) {
|
||||
ch <- c.ServerRoutes
|
||||
ch <- c.ServerPeers
|
||||
ch <- c.SshProxySessions
|
||||
ch <- c.PtsSessions
|
||||
ch <- c.PtySessions
|
||||
}
|
||||
|
||||
func (c ServerCollector) Collect(ch chan<- prometheus.Metric) {
|
||||
@ -106,8 +106,8 @@ func (c ServerCollector) Collect(ch chan<- prometheus.Metric) {
|
||||
)
|
||||
|
||||
ch <- prometheus.MustNewConstMetric(
|
||||
c.PtsSessions,
|
||||
c.PtySessions,
|
||||
prometheus.GaugeValue,
|
||||
float64(c.server.stats.pts_sessions.Load()),
|
||||
float64(c.server.stats.pty_sessions.Load()),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user