mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-01 16:16:35 +00:00
*: avoid using default wmi client. (#1590)
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
"github.com/prometheus-community/windows_exporter/pkg/perflib"
|
||||
"github.com/prometheus-community/windows_exporter/pkg/types"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/yusufpapurcu/wmi"
|
||||
)
|
||||
|
||||
const Name = "dfsr"
|
||||
@@ -152,7 +153,7 @@ func (c *Collector) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Collector) Build(logger log.Logger) error {
|
||||
func (c *Collector) Build(logger log.Logger, _ *wmi.Client) error {
|
||||
logger = log.With(logger, "collector", Name)
|
||||
|
||||
_ = level.Info(logger).Log("msg", "dfsr collector is in an experimental state! Metrics for this collector have not been tested.")
|
||||
|
||||
Reference in New Issue
Block a user