add call to set perf counter query

Signed-off-by: matt durham <mattdurham@ppog.org>
This commit is contained in:
matt durham 2024-01-08 09:57:25 -05:00
parent 52b66bfb84
commit f850a84140
No known key found for this signature in database
GPG Key ID: A62E920AE398897B
1 changed files with 5 additions and 0 deletions

View File

@ -153,6 +153,11 @@ func main() {
_ = level.Error(logger).Log("msg", "Couldn't load collectors", "err", err) _ = level.Error(logger).Log("msg", "Couldn't load collectors", "err", err)
os.Exit(1) os.Exit(1)
} }
err = collectors.SetPerfCounterQuery()
if err != nil {
_ = level.Error(logger).Log("msg", "Couldn't set performance counter query", "err", err)
os.Exit(1)
}
if u, err := user.Current(); err != nil { if u, err := user.Current(); err != nil {
_ = level.Warn(logger).Log("msg", "Unable to determine which user is running this exporter. More info: https://github.com/golang/go/issues/37348") _ = level.Warn(logger).Log("msg", "Unable to determine which user is running this exporter. More info: https://github.com/golang/go/issues/37348")