enable open matrics.
Let Prometheus decide which to keep.
This commit is contained in:
parent
c198541542
commit
d471db7f6c
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
|
@ -98,7 +98,7 @@ func initPrometheus(prometheusHost, prometheusPort, prometheusEntry string) {
|
|||
promReg.MustRegister(totalSeconds)
|
||||
promReg.MustRegister(clientIP)
|
||||
promReg.MustRegister(clientSeconds)
|
||||
handler := promhttp.HandlerFor(promReg, promhttp.HandlerOpts{EnableOpenMetrics: false})
|
||||
handler := promhttp.HandlerFor(promReg, promhttp.HandlerOpts{EnableOpenMetrics: true})
|
||||
http.Handle("/"+prometheusEntry, handler)
|
||||
go func() {
|
||||
glog.Infof("Starting Prometheus on %v:%v, entry point is /%v", prometheusHost, prometheusPort, prometheusEntry)
|
||||
|
|
|
|||
Loading…
Reference in a new issue