Refactor wmi query generator to use wildcard selector

This commit is contained in:
Calle Pettersson
2018-06-06 10:38:36 +02:00
parent f3072bb4f3
commit 667d06116d
27 changed files with 206 additions and 76 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ type {{ .Class }} struct {
}
func (c *{{ .CollectorName }}Collector) collect(ch chan<- prometheus.Metric) (*prometheus.Desc, error) {
var dst []{{ .Class }}
q := wmi.CreateQuery(&dst, "")
q := queryAll(&dst)
if err := wmi.Query(q, &dst); err != nil {
return nil, err
}