diff --git a/hpraid_exporter.go b/hpraid_exporter.go index 01e3810..f426364 100644 --- a/hpraid_exporter.go +++ b/hpraid_exporter.go @@ -27,6 +27,7 @@ import ( "sync" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/log" ) @@ -195,7 +196,7 @@ func main() { } prometheus.MustRegister(exporter) - http.Handle(*metricsPath, prometheus.Handler()) + http.Handle(*metricsPath, promhttp.Handler()) http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { w.Write([]byte(`