mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-09 12:06:35 +00:00
feat: Tolerate collector failures (#1769)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -662,6 +662,11 @@ func (c *Collector) buildCluster() error {
|
||||
nil,
|
||||
)
|
||||
|
||||
var dst []msClusterCluster
|
||||
if err := c.miSession.Query(&dst, mi.NamespaceRootMSCluster, c.clusterMIQuery); err != nil {
|
||||
return fmt.Errorf("WMI query failed: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user