mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-12-26 22:19:44 -08:00
Use new client_golang collectors package.
Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
839c2d557f
commit
97583ff340
|
@ -28,6 +28,7 @@ import (
|
||||||
"github.com/go-kit/log"
|
"github.com/go-kit/log"
|
||||||
"github.com/go-kit/log/level"
|
"github.com/go-kit/log/level"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
|
promcollectors "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"
|
||||||
|
@ -57,8 +58,8 @@ func newHandler(includeExporterMetrics bool, maxRequests int, logger log.Logger)
|
||||||
}
|
}
|
||||||
if h.includeExporterMetrics {
|
if h.includeExporterMetrics {
|
||||||
h.exporterMetricsRegistry.MustRegister(
|
h.exporterMetricsRegistry.MustRegister(
|
||||||
prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}),
|
promcollectors.NewProcessCollector(promcollectors.ProcessCollectorOpts{}),
|
||||||
prometheus.NewGoCollector(),
|
promcollectors.NewGoCollector(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
if innerHandler, err := h.innerHandler(); err != nil {
|
if innerHandler, err := h.innerHandler(); err != nil {
|
||||||
|
|
Loading…
Reference in a new issue