ideal-co/ogre

Prometheus Web Server Should Attempt Restarts

開放

#24 建立於 2020年6月1日

 (0 則留言) (0 個反應) (0 位負責人)Go (2 個分叉)auto 404
backendgood first issue

倉庫指標

星標
 (4 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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)
		}
	}()

貢獻者指南