mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-02 08:36:36 +00:00
Refactor wmi query generator to use wildcard selector
This commit is contained in:
@@ -56,7 +56,7 @@ type Win32_ComputerSystem struct {
|
||||
|
||||
func (c *CSCollector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, error) {
|
||||
var dst []Win32_ComputerSystem
|
||||
if err := wmi.Query(wmi.CreateQuery(&dst, ""), &dst); err != nil {
|
||||
if err := wmi.Query(queryAll(&dst), &dst); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user