doing initial data population of prometheus so that it doesn't enter zero values on startup

This commit is contained in:
2023-09-26 21:14:33 -04:00
parent 147ef10c01
commit 8f36fc3f15
3 changed files with 54 additions and 20 deletions

View File

@@ -115,7 +115,7 @@ func (pc *PlexClient) getNumTranscodes() *RawPlexModel {
// getServerHistory gets the entire history of plays on the plex server
func (pc *PlexClient) getServerHistory() *RawPlexModel {
result := pc.sendRequest("/status/sessions/history/all", nil) //Hard code library ID for now TODO: Grab from library/sections call
result := pc.sendRequest("/status/sessions/history/all", nil)
sessionsAll := RawPlexModel{}
err := json.Unmarshal(result, &sessionsAll)
if err != nil {