fix compile error with newer prometheus/client_golang versions

removed all http related features in v1.0.0, see
https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md#100--2019-06-15

Signed-off-by: Andreas Schmid <service@aaschmid.de>
This commit is contained in:
Andreas Schmid
2020-07-19 21:32:06 +02:00
parent 92f1c1e149
commit 07def07c4b

View File

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