postfix_exporter/files/patch-postfix__exporter.go

20 lines
541 B
Go
Raw Normal View History

2020-08-06 23:06:53 +02:00
--- postfix_exporter.go.orig 2019-02-15 11:41:28 UTC
+++ postfix_exporter.go
@@ -31,6 +31,7 @@ import (
"github.com/hpcloud/tail"
"github.com/prometheus/client_golang/prometheus"
+ "github.com/prometheus/client_golang/prometheus/promhttp"
)
var (
@@ -691,7 +692,7 @@ func main() {
}
prometheus.MustRegister(exporter)
- http.Handle(*metricsPath, prometheus.Handler())
+ http.Handle(*metricsPath, promhttp.Handler())
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
_, err = w.Write([]byte(`
<html>