mirror of
https://github.com/sberk42/fritzbox_exporter.git
synced 2026-02-14 19:59:51 +00:00
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:
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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user