ideal-co/ogre

Prometheus Web Server Should Attempt Restarts

オープン

#24 opened on 2020/06/01

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Go (2 件のフォーク)auto 404
backendgood first issue

Repository metrics

Stars
 (4 個のスター)
PR merge metrics
 (30d に merged 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)
		}
	}()

コントリビューターガイド