mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-18 18:49:05 +02:00
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:
co-authored by
Claude Opus 5.5
parent
f292a6fbcf
commit
1302cf6899
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user