Commit Graph

9 Commits

Author SHA1 Message Date
Calle Pettersson
21a02c4fbe Only query the perflib objects we need 2020-02-29 10:40:53 +01:00
Ben Reedy
c23a98ae90
Set tcp_connections_established to gauge type
While the ConnectionsEstablished property in the
Win32_PerfRawData_Tcpip_TCP class is listed as a counter, real-world
metric values have been shown to increase *and* decrease.

Documentation for the property states "Number of TCP connections for
which the *current* state is either ESTABLISHED or CLOSE-WAIT" which
would imply the metric is a gauge.
2019-09-27 19:48:16 +10:00
Calle Pettersson
33879449a2 Refactor cpu collector to use perflib instead of WMI. 2019-05-25 13:48:40 +02:00
Calle Pettersson
f2462b26c8 Lint-fix: Package comments 2019-01-23 09:56:24 +01:00
Dave Henderson
5d4cafc0a1
Adding windows build constraints
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2018-11-29 19:51:12 -05:00
Steve Zook
c156f2bcbe protect against emtpy wmi query result sets
If an WMI query were to return an empty result set, trying to access the
first element in the result set would result in a `panic: runtime error:
index out of range` error.

add logic to explicitly check if the result set size is 0 and return an
error rather.

Fixes https://github.com/martinlindhe/wmi_exporter/issues/240
2018-08-07 15:47:39 -04:00
Calle Pettersson
667d06116d Refactor wmi query generator to use wildcard selector 2018-06-06 10:38:36 +02:00
Calle Pettersson
be5ac7b440 Switch to prometheus/common/log for all logging 2018-04-05 07:27:26 +02:00
Jorrit Salverda
a52df7696a Add TCP collector (#142)
add tcp collector to get tcp connection usage stats from Win32_PerfRawData_Tcpip_TCPv4
2017-12-20 14:26:30 +01:00