Add Prometheus for some Owncast metrics (#1744)

* Add Prometheus for some Owncast metrics. Closes #1303

* Wrap prometheus metrics endpoint in admin middleware
This commit is contained in:
Gabe Kangas
2022-03-06 17:26:52 -08:00
committed by GitHub
parent 713c8f913e
commit 92041c4c23
12 changed files with 598 additions and 11 deletions

14
metrics/prometheus.go Normal file
View File

@@ -0,0 +1,14 @@
package metrics
import (
"github.com/prometheus/client_golang/prometheus"
)
var (
labels map[string]string
activeViewerCount prometheus.Gauge
activeChatClientCount prometheus.Gauge
cpuUsage prometheus.Gauge
chatUserCount prometheus.Gauge
currentChatMessageCount prometheus.Gauge
)