diff --git a/server/rtmp.go b/server/rtmp.go index ed533af..150c9eb 100644 --- a/server/rtmp.go +++ b/server/rtmp.go @@ -346,12 +346,11 @@ func (rs *RTMPServer) EnableMetrics() { }, ) prometheus.MustRegister(currentStreams) - currentClients := prometheus.NewGaugeVec( + currentClients := prometheus.NewGauge( prometheus.GaugeOpts{ Name: "dogtamer_current_clients", Help: "Currently connected clients.", }, - []string{"stream_name"}, ) prometheus.MustRegister(currentClients) bytesReceived := prometheus.NewGaugeVec( @@ -402,6 +401,7 @@ func (rs *RTMPServer) EnableMetrics() { } } rs.streamsLock.RUnlock() + currentClients.Set(float64(clientCount)) } }() } diff --git a/version.go b/version.go index 638e7b5..04aaf7e 100644 --- a/version.go +++ b/version.go @@ -2,7 +2,7 @@ package dogtamer import "fmt" -const Version string = "v0.1.9" +const Version string = "v0.1.10" var Build string