From 891942bdf1c7a9539322024eb075e663beb7ef3e Mon Sep 17 00:00:00 2001 From: Stefan Foerster Date: Thu, 9 Jul 2020 16:10:41 +0200 Subject: [PATCH] replace prometheus.Handler() with promhttp.Handler() --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index a0ba1fa..0e4b5d3 100644 --- a/main.go +++ b/main.go @@ -28,6 +28,7 @@ import ( "github.com/namsral/flag" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promhttp" upnp "github.com/sberk42/fritzbox_exporter/fritzbox_upnp" ) @@ -320,7 +321,7 @@ func main() { prometheus.MustRegister(collector) prometheus.MustRegister(collect_errors) - http.Handle("/metrics", prometheus.Handler()) + http.Handle("/metrics", promhttp.Handler()) fmt.Printf("metrics available at http://%s/metrics\n", *flag_addr) log.Fatal(http.ListenAndServe(*flag_addr, nil)) }