windows_exporter: Win7 system (amd64) "system collector .. (Invalid query )"

Hi, just tried to run wmi_exporter on a win7 system. It works but I get a view error messages for failed queries similar to the ones in #47:

λ wmi_exporter.exe
time="2017-01-05T08:57:06+01:00" level=info msg="Enabled collectors: cpu, cs, logical_disk, net, os, system" source="exporter.go:156"
time="2017-01-05T08:57:06+01:00" level=info msg="Starting WMI exporter (version=, branch=, revision=)" source="exporter.go:167"
time="2017-01-05T08:57:06+01:00" level=info msg="Build context (go=go1.7.4, user=, date=)" source="exporter.go:168"
time="2017-01-05T08:57:06+01:00" level=info msg="Starting server on :9182" source="exporter.go:171"
2017/01/05 08:57:21 [ERROR] failed collecting net metrics: <nil> Exception occurred. (Invalid query )
time="2017-01-05T08:57:21+01:00" level=error msg="ERROR: net collector failed after 6.745000s: Exception occurred. (Invalid query )" source="exporter.go:84"
2017/01/05 08:57:26 [ERROR] failed collecting os metrics: <nil> Exception occurred. (Invalid query )
time="2017-01-05T08:57:26+01:00" level=error msg="ERROR: cpu collector failed after 12.275000s: Exception occurred. (Invalid query )" source="exporter.go:84"
2017/01/05 08:57:33 [ERROR] failed collecting os metrics: <nil> Exception occurred. (Invalid query )
time="2017-01-05T08:57:33+01:00" level=error msg="ERROR: system collector failed after 18.798000s: Exception occurred. (Invalid query )" source="exporter.go:84"
2017/01/05 08:57:38 [ERROR] failed collecting logical_disk metrics: <nil> Exception occurred. (Invalid query )
time="2017-01-05T08:57:38+01:00" level=error msg="ERROR: logical_disk collector failed after 24.264000s: Exception occurred. (Invalid query )" source="exporter.go:84"
2017/01/05 08:57:45 [ERROR] failed collecting os metrics: <nil> Exception occurred. (Invalid query )
time="2017-01-05T08:57:45+01:00" level=error msg="ERROR: cpu collector failed after 6.434000s: Exception occurred. (Invalid query )" source="exporter.go:84"
2017/01/05 08:57:50 [ERROR] failed collecting logical_disk metrics: <nil> Exception occurred. (Invalid query )
time="2017-01-05T08:57:50+01:00" level=error msg="ERROR: logical_disk collector failed after 11.955000s: Exception occurred. (Invalid query )" source="exporter.go:84"
2017/01/05 08:57:57 [ERROR] failed collecting net metrics: <nil> Exception occurred. (Invalid query )
time="2017-01-05T08:57:57+01:00" level=error msg="ERROR: net collector failed after 18.576000s: Exception occurred. (Invalid query )" source="exporter.go:84"
2017/01/05 08:58:02 [ERROR] failed collecting os metrics: <nil> Exception occurred. (Invalid query )
time="2017-01-05T08:58:02+01:00" level=error msg="ERROR: system collector failed after 23.978000s: Exception occurred. (Invalid query )" source="exporter.go:84"

The version is a local build of the current master b4ca3412dd370be50d7f3608195bfe8b1f3aa7c8

Here are the working metrics:

# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 0
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 18
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 805256
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 805256
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 2706
# HELP go_memstats_frees_total Total number of frees.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 178
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 131072
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 805256
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 548864
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 1.318912e+06
# HELP go_memstats_heap_objects Number of allocated objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 7059
# HELP go_memstats_heap_released_bytes_total Total number of heap bytes released to OS.
# TYPE go_memstats_heap_released_bytes_total counter
go_memstats_heap_released_bytes_total 0
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 1.867776e+06
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 0
# HELP go_memstats_lookups_total Total number of pointer lookups.
# TYPE go_memstats_lookups_total counter
go_memstats_lookups_total 6
# HELP go_memstats_mallocs_total Total number of mallocs.
# TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 7237
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 9344
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 16384
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 19840
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 32768
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 4.194304e+06
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 804206
# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 229376
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 229376
# HELP go_memstats_sys_bytes Number of bytes obtained by system. Sum of all system allocations.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 3.084288e+06
# HELP http_request_duration_microseconds The HTTP request latencies in microseconds.
# TYPE http_request_duration_microseconds summary
http_request_duration_microseconds{handler="prometheus",quantile="0.5"} NaN
http_request_duration_microseconds{handler="prometheus",quantile="0.9"} NaN
http_request_duration_microseconds{handler="prometheus",quantile="0.99"} NaN
http_request_duration_microseconds_sum{handler="prometheus"} 0
http_request_duration_microseconds_count{handler="prometheus"} 0
# HELP http_request_size_bytes The HTTP request sizes in bytes.
# TYPE http_request_size_bytes summary
http_request_size_bytes{handler="prometheus",quantile="0.5"} NaN
http_request_size_bytes{handler="prometheus",quantile="0.9"} NaN
http_request_size_bytes{handler="prometheus",quantile="0.99"} NaN
http_request_size_bytes_sum{handler="prometheus"} 0
http_request_size_bytes_count{handler="prometheus"} 0
# HELP http_response_size_bytes The HTTP response sizes in bytes.
# TYPE http_response_size_bytes summary
http_response_size_bytes{handler="prometheus",quantile="0.5"} NaN
http_response_size_bytes{handler="prometheus",quantile="0.9"} NaN
http_response_size_bytes{handler="prometheus",quantile="0.99"} NaN
http_response_size_bytes_sum{handler="prometheus"} 0
http_response_size_bytes_count{handler="prometheus"} 0
# HELP wmi_cs_logical_processors ComputerSystem.NumberOfLogicalProcessors
# TYPE wmi_cs_logical_processors gauge
wmi_cs_logical_processors 8
# HELP wmi_cs_physical_memory_bytes ComputerSystem.TotalPhysicalMemory
# TYPE wmi_cs_physical_memory_bytes gauge
wmi_cs_physical_memory_bytes 1.6971317248e+10
# HELP wmi_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, and goversion from which wmi_exporter was built.
# TYPE wmi_exporter_build_info gauge
wmi_exporter_build_info{branch="",goversion="go1.7.4",revision="",version=""} 1
# HELP wmi_exporter_scrape_duration_seconds wmi_exporter: Duration of a scrape job.
# TYPE wmi_exporter_scrape_duration_seconds summary
wmi_exporter_scrape_duration_seconds{collector="cpu",result="error",quantile="0.5"} 5.8420000000000005
wmi_exporter_scrape_duration_seconds{collector="cpu",result="error",quantile="0.9"} 5.8420000000000005
wmi_exporter_scrape_duration_seconds{collector="cpu",result="error",quantile="0.99"} 5.8420000000000005
wmi_exporter_scrape_duration_seconds_sum{collector="cpu",result="error"} 5.8420000000000005
wmi_exporter_scrape_duration_seconds_count{collector="cpu",result="error"} 1
wmi_exporter_scrape_duration_seconds{collector="cs",result="success",quantile="0.5"} 12.78
wmi_exporter_scrape_duration_seconds{collector="cs",result="success",quantile="0.9"} 12.78
wmi_exporter_scrape_duration_seconds{collector="cs",result="success",quantile="0.99"} 12.78
wmi_exporter_scrape_duration_seconds_sum{collector="cs",result="success"} 12.78
wmi_exporter_scrape_duration_seconds_count{collector="cs",result="success"} 1
wmi_exporter_scrape_duration_seconds{collector="logical_disk",result="error",quantile="0.5"} 12.756
wmi_exporter_scrape_duration_seconds{collector="logical_disk",result="error",quantile="0.9"} 12.756
wmi_exporter_scrape_duration_seconds{collector="logical_disk",result="error",quantile="0.99"} 12.756
wmi_exporter_scrape_duration_seconds_sum{collector="logical_disk",result="error"} 12.756
wmi_exporter_scrape_duration_seconds_count{collector="logical_disk",result="error"} 1
wmi_exporter_scrape_duration_seconds{collector="net",result="error",quantile="0.5"} 19.645
wmi_exporter_scrape_duration_seconds{collector="net",result="error",quantile="0.9"} 19.645
wmi_exporter_scrape_duration_seconds{collector="net",result="error",quantile="0.99"} 19.645
wmi_exporter_scrape_duration_seconds_sum{collector="net",result="error"} 19.645
wmi_exporter_scrape_duration_seconds_count{collector="net",result="error"} 1
wmi_exporter_scrape_duration_seconds{collector="os",result="success",quantile="0.5"} 12.813
wmi_exporter_scrape_duration_seconds{collector="os",result="success",quantile="0.9"} 12.813
wmi_exporter_scrape_duration_seconds{collector="os",result="success",quantile="0.99"} 12.813
wmi_exporter_scrape_duration_seconds_sum{collector="os",result="success"} 12.813
wmi_exporter_scrape_duration_seconds_count{collector="os",result="success"} 1
wmi_exporter_scrape_duration_seconds{collector="system",result="error",quantile="0.5"} 26.469
wmi_exporter_scrape_duration_seconds{collector="system",result="error",quantile="0.9"} 26.469
wmi_exporter_scrape_duration_seconds{collector="system",result="error",quantile="0.99"} 26.469
wmi_exporter_scrape_duration_seconds_sum{collector="system",result="error"} 26.469
wmi_exporter_scrape_duration_seconds_count{collector="system",result="error"} 1
# HELP wmi_os_paging_free_bytes OperatingSystem.FreeSpaceInPagingFiles
# TYPE wmi_os_paging_free_bytes gauge
wmi_os_paging_free_bytes 1.6971317248e+10
# HELP wmi_os_paging_limit_bytes OperatingSystem.SizeStoredInPagingFiles
# TYPE wmi_os_paging_limit_bytes gauge
wmi_os_paging_limit_bytes 1.6971317248e+10
# HELP wmi_os_physical_memory_free_bytes OperatingSystem.FreePhysicalMemory
# TYPE wmi_os_physical_memory_free_bytes gauge
wmi_os_physical_memory_free_bytes 1.1571462144e+10
# HELP wmi_os_process_memory_limix_bytes OperatingSystem.MaxProcessMemorySize
# TYPE wmi_os_process_memory_limix_bytes gauge
wmi_os_process_memory_limix_bytes 8.796092891136e+12
# HELP wmi_os_processes OperatingSystem.NumberOfProcesses
# TYPE wmi_os_processes gauge
wmi_os_processes 135
# HELP wmi_os_processes_limit OperatingSystem.MaxNumberOfProcesses
# TYPE wmi_os_processes_limit gauge
wmi_os_processes_limit 4.294967295e+09
# HELP wmi_os_users OperatingSystem.NumberOfUsers
# TYPE wmi_os_users gauge
wmi_os_users 3
# HELP wmi_os_virtual_memory_bytes OperatingSystem.TotalVirtualMemorySize
# TYPE wmi_os_virtual_memory_bytes gauge
wmi_os_virtual_memory_bytes 3.3940729856e+10
# HELP wmi_os_virtual_memory_free_bytes OperatingSystem.FreeVirtualMemory
# TYPE wmi_os_virtual_memory_free_bytes gauge
wmi_os_virtual_memory_free_bytes 2.8137496576e+10
# HELP wmi_os_visible_memory_bytes OperatingSystem.TotalVisibleMemorySize
# TYPE wmi_os_visible_memory_bytes gauge
wmi_os_visible_memory_bytes 1.6971317248e+10

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17

Most upvoted comments

http://social.technet.microsoft.com/wiki/contents/articles/19374.windows-performance-monitor-unable-to-add-these-counters.aspx

A lodctr /r fixed it.

C:\windows\system32>lodctr.exe /r

Info: Successfully rebuilt performance counter setting from system backup store

I have not the slightest idea why this was necessary. 😦 Thanks for your help!