mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-28 15:46:36 +00:00
mi: replace all WMI calls with MI calls (#1700)
This commit is contained in:
@@ -29,11 +29,11 @@ import (
|
||||
|
||||
"github.com/alecthomas/kingpin/v2"
|
||||
"github.com/dimchansky/utfbom"
|
||||
"github.com/prometheus-community/windows_exporter/internal/mi"
|
||||
"github.com/prometheus-community/windows_exporter/internal/types"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
dto "github.com/prometheus/client_model/go"
|
||||
"github.com/prometheus/common/expfmt"
|
||||
"github.com/yusufpapurcu/wmi"
|
||||
)
|
||||
|
||||
const Name = "textfile"
|
||||
@@ -104,7 +104,7 @@ func (c *Collector) Close(_ *slog.Logger) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Collector) Build(logger *slog.Logger, _ *wmi.Client) error {
|
||||
func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) error {
|
||||
logger.Info("textfile Collector directories: "+strings.Join(c.config.TextFileDirectories, ","),
|
||||
slog.String("collector", Name),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user