hyperv: Refactor collector, added DataStore, Virtual SMB and Dynamic Memory Balancer metrics (click PR number for more information) (#1712)

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2024-11-19 23:36:37 +01:00
committed by GitHub
parent 8c90961c10
commit fdee2d8613
29 changed files with 4340 additions and 1952 deletions

View File

@@ -112,7 +112,7 @@ func NewCollector(object string, instances []string, counters []string) (*Collec
}
if _, err := collector.Collect(); err != nil {
return nil, fmt.Errorf("failed to collect initial data: %w", err)
return collector, fmt.Errorf("failed to collect initial data: %w", err)
}
return collector, nil

View File

@@ -4,6 +4,8 @@ package perfdata
import "errors"
var ErrNoData = NewPdhError(PdhNoData)
// Error represents error returned from Performance Counters API.
type Error struct {
ErrorCode uint32