ideal-co/ogre

Prometheus Web Server Should Attempt Restarts

Aperta

#24 aperta il 1 giu 2020

 (0 commenti) (0 reazioni) (0 assegnatari)Go (2 fork)auto 404
backendgood first issue

Metriche repository

Star
 (4 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Description:

There is a server spun off in a go routine when the prometheus backend is configured, this server should be hardened to handle errors and restarts as necessary as it currently is as simple as:

	// expose the handler and start the server to be scraped
	http.Handle(pbe.MetricPath, promhttp.Handler())
	go func() {
		err := http.ListenAndServe(server, nil)
		if err != nil {
			log.Daemon.Errorf("error starting prometheus server: %s", err)
		}
	}()

Guida contributor