mscluster: collect metrics through ClusAPI (#2634)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2026-10-10 17:52:05 +02:00
committed by GitHub
co-authored by Claude Opus 5.5
parent f292a6fbcf
commit 1302cf6899
44 changed files with 7050 additions and 1036 deletions
+3 -2
View File
@@ -114,9 +114,10 @@ func TestCollector[C collector.Collector, V any](t *testing.T, fn func(*V) C, co
// unsupportedBuild returns true for errors that indicate a collector's WMI
// class or PDH counter is not present on this system. MI_RESULT_INVALID_CLASS
// is only accepted here (Build path) so that a mistyped class in production
// code still fails Collect.
// code still fails Collect. Native collectors report a missing role, such as
// an unconfigured failover cluster, with errors.ErrUnsupported.
func unsupportedBuild(err error) bool {
return errors.Is(err, mi.MI_RESULT_INVALID_CLASS) || unsupportedCollect(err)
return errors.Is(err, mi.MI_RESULT_INVALID_CLASS) || errors.Is(err, errors.ErrUnsupported) || unsupportedCollect(err)
}
// unsupportedCollect returns true for Collect-path errors that indicate a