mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-27 23:26:37 +00:00
Merge pull request #982 from yangliyl/fix/replace-functions
replace these deprecated functions
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
|||||||
"github.com/prometheus-community/windows_exporter/config"
|
"github.com/prometheus-community/windows_exporter/config"
|
||||||
"github.com/prometheus-community/windows_exporter/log"
|
"github.com/prometheus-community/windows_exporter/log"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
"github.com/prometheus/client_golang/prometheus/collectors"
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||||
"github.com/prometheus/common/version"
|
"github.com/prometheus/common/version"
|
||||||
"github.com/prometheus/exporter-toolkit/web"
|
"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(wc)
|
||||||
reg.MustRegister(
|
reg.MustRegister(
|
||||||
prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}),
|
collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
|
||||||
prometheus.NewGoCollector(),
|
collectors.NewGoCollector(),
|
||||||
version.NewCollector("windows_exporter"),
|
version.NewCollector("windows_exporter"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user