mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
*: Implement collector interface for registry perfdata (#1670)
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/prometheus-community/windows_exporter/internal/headers/netapi32"
|
||||
"github.com/prometheus-community/windows_exporter/internal/headers/psapi"
|
||||
"github.com/prometheus-community/windows_exporter/internal/headers/sysinfoapi"
|
||||
"github.com/prometheus-community/windows_exporter/internal/perflib"
|
||||
v1 "github.com/prometheus-community/windows_exporter/internal/perfdata/v1"
|
||||
"github.com/prometheus-community/windows_exporter/internal/types"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/yusufpapurcu/wmi"
|
||||
@@ -412,7 +412,7 @@ func (c *Collector) collectPaging(ctx *types.ScrapeContext, logger *slog.Logger,
|
||||
}
|
||||
|
||||
pfc := make([]pagingFileCounter, 0)
|
||||
if err = perflib.UnmarshalObject(ctx.PerfObjects["Paging File"], &pfc, logger); err != nil {
|
||||
if err = v1.UnmarshalObject(ctx.PerfObjects["Paging File"], &pfc, logger); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user