Skip to content

Commit

Permalink
Fixes eripa#4. Using the new prometheus handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex1602 committed May 25, 2020
1 parent 45c75ca commit 74a8987
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prometheus-zfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"sync"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
)

const (
Expand Down Expand Up @@ -110,7 +111,7 @@ func main() {
prometheus.MustRegister(exporter)

fmt.Printf("Starting zpool metrics exporter on :%s/%s\n", listenPort, metricsHandle)
http.Handle("/"+metricsHandle, prometheus.Handler())
http.Handle("/"+metricsHandle, promhttp.Handler())
http.ListenAndServe(":"+listenPort, nil)

}

0 comments on commit 74a8987

Please sign in to comment.