This change adds 4 new CPU related metrics:
* process_mperf_total
* processor_rtc_total
* processor_utility_total
* processor_privileged_utility_total
and renames the existing process_performance to
processor_performance_total, since it was previously misunderstood and
was unlikely to be have been useful without the above new metrics
The data sources for these are not particularly well understood, and the
examples show that in some cases, arbitrary scaling factors are required
to actually make them useful, but in my testing on hundreds of systems
with a broad range of CPUs and operating systems from 2012r2 through to
2019 has proved out that we can use them to accurately display actual
CPU frequencies and CPU utilisation as it is represented in taskmgr.
Things I don't particularly like and would like input on:
* I would have preferred to do the scaling of processor_mperf_total in
the code, but there isn't an elegant way of doing this right now.
* Maybe processor_mperf_total should be called
processor_mperformance_total.
See #787 for discussion.
Signed-off-by: Steffen Higel <higels@valvesoftware.com>
OLE objects must be manually cleared or released to prevent leaks.
Note that these objects do not appear in the heap, so the pprof heap
profiles aren't helpful in identifying OLE leaks.
Resident memory continues to increase if objects are not properly cleared.
Signed-off-by: Ben Reedy <breed808@breed808.com>
Collector would previously break from loop rather than skip nameless
entries, with the additional result of spamming event logs.
Signed-off-by: Ben Reedy <breed808@breed808.com>
UpdateDomain metric not exists as we can see in https://docs.microsoft.com/en-us/previous-versions/windows/desktop/cluswmi/mscluster-resourcegroup, just removing from mscluster_resourcegroup.go
When execute windows_exporter.exe with this metric we get this error:
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x60 pc=0xaad61d]
goroutine 66 [running]:
github.com/prometheus/client_golang/prometheus.NewConstMetric(0xc00009de30?, 0x2?, 0x3ff0000000000000?, {0xc000387730?, 0x1?, 0x1?})
C:/Users/ricar/go/pkg/mod/github.com/prometheus/client_golang@v1.12.2/prometheus/value.go:88 +0x1d
github.com/prometheus/client_golang/prometheus.MustNewConstMetric(...)
C:/Users/ricar/go/pkg/mod/github.com/prometheus/client_golang@v1.12.2/prometheus/value.go:105
github.com/prometheus-community/windows_exporter/collector.(*MSCluster_ResourceGroupCollector).Collect(0xc000552000, 0x0?, 0x0?)
E:/Downloads/Prometheus/windows_exporter/windows_exporter/collector/mscluster_resourcegroup.go:240 +0xdfb
main.execute({0xc00006e0c6, 0x17}, {0xef6420, 0xc000552000}, 0x0?, 0x0?)
E:/Downloads/Prometheus/windows_exporter/windows_exporter/exporter.go:199 +0x84
main.windowsCollector.Collect.func2({0xc00006e0c6, 0x17}, {0xef6420?, 0xc000552000?})
E:/Downloads/Prometheus/windows_exporter/windows_exporter/exporter.go:140 +0x9b
created by main.windowsCollector.Collect
E:/Downloads/Prometheus/windows_exporter/windows_exporter/exporter.go:138 +0x5c5
Signed-off-by: Alex Wiedermann <alexwdrnn@gmail.com>
Inactive or missing paging file should not be cause for OS collector to
fail.
Instead, log the error and continue with OS collection.
Signed-off-by: Ben Reedy <breed808@breed808.com>
This change affects processing of single files with duplicate metrics.
Single files with duplicate metrics will be skipped, with no metrics being
collected and exposed by the exporter.
Previous duplicate metric processing across multiple files remains
unchanged (all files skipped, collector returns error).
Signed-off-by: Ben Reedy <breed808@breed808.com>
Remove "memory", which is redundant with the module and breaks symmetry
with vm_memory_physical_guest_visible.
Signed-off-by: Andrew Banman <abanman@pnri.org>