From 689aedff1cfff1ab2d928e5d8c1137745f5c9257 Mon Sep 17 00:00:00 2001 From: Azanx <2915102+Azanx@users.noreply.github.com> Date: Thu, 20 Jun 2019 16:45:51 +0200 Subject: [PATCH] replace prometheus.Handler with promhttp.Handler --- postfix_exporter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postfix_exporter.go b/postfix_exporter.go index 7fdd1a1..73adb56 100644 --- a/postfix_exporter.go +++ b/postfix_exporter.go @@ -31,6 +31,7 @@ import ( "github.com/hpcloud/tail" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" ) var ( @@ -691,7 +692,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) { _, err = w.Write([]byte(`