mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-12 16:06:37 +00:00
Refactor wmi query generator to use wildcard selector
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user