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

@@ -47,7 +47,7 @@ var (
// This can be removed when client_golang exposes this on Windows
// (See https://github.com/prometheus/client_golang/issues/376)
startTime = float64(time.Now().Unix())
startTime = float64(time.Now().Unix())
startTimeDesc = prometheus.NewDesc(
"process_start_time_seconds",
"Start time of the process since unix epoch in seconds.",
@@ -169,6 +169,7 @@ func initWbem() {
if err != nil {
log.Fatal(err)
}
wmi.DefaultClient.AllowMissingFields = true
wmi.DefaultClient.SWbemServicesClient = s
}