Browse Source

replace prometheus.Handler() with promhttp.Handler()

pull/1/head
Stefan Foerster 5 years ago
parent
commit
891942bdf1
No known key found for this signature in database GPG Key ID: 491FED2C4BAE9B24
  1. 3
      main.go

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

Loading…
Cancel
Save