adding a few more vars, setting collection to 60 secs
This commit is contained in:
6
main.go
6
main.go
@@ -72,15 +72,19 @@ func main() {
|
||||
prometheus.MustRegister(plexActiveSessions)
|
||||
prometheus.MustRegister(plexNumMovies)
|
||||
prometheus.MustRegister(plexNumTVShows)
|
||||
prometheus.MustRegister(plexTranscodeSessions)
|
||||
prometheus.MustRegister(plexAllSessions)
|
||||
|
||||
go func() {
|
||||
for {
|
||||
time.Sleep(time.Second * 5)
|
||||
time.Sleep(time.Second * 60)
|
||||
fmt.Println("Collecting info...")
|
||||
stats := pc.gatherAllStats()
|
||||
plexActiveSessions.Set(stats.currentSessions)
|
||||
plexNumMovies.Set(stats.numMovies)
|
||||
plexNumTVShows.Set(stats.numTV)
|
||||
plexTranscodeSessions.Set(stats.numTranscodes)
|
||||
plexAllSessions.Set(stats.numAllSessions)
|
||||
}
|
||||
}()
|
||||
|
||||
|
Reference in New Issue
Block a user