Refactor wmi query generator to use wildcard selector

This commit is contained in:
Calle Pettersson
2018-06-06 10:31:50 +02:00
parent f3072bb4f3
commit 667d06116d
27 changed files with 208 additions and 78 deletions

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
}