replace these deprecated functions
Signed-off-by: yangliyl <yangli_yl@qq.com>
This commit is contained in:
parent
42c05df272
commit
0dc32bf434
|
@ -23,6 +23,7 @@ import (
|
|||
"github.com/prometheus-community/windows_exporter/config"
|
||||
"github.com/prometheus-community/windows_exporter/log"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/collectors"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"github.com/prometheus/common/version"
|
||||
"github.com/prometheus/exporter-toolkit/web"
|
||||
|
@ -520,8 +521,8 @@ func (mh *metricsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
reg.MustRegister(wc)
|
||||
reg.MustRegister(
|
||||
prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}),
|
||||
prometheus.NewGoCollector(),
|
||||
collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
|
||||
collectors.NewGoCollector(),
|
||||
version.NewCollector("windows_exporter"),
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue