Commit Graph

21 Commits

Author SHA1 Message Date
retryW dd473c4807 Fixed paging free bytes
moved

Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-18 16:18:47 -07:00
retryW 7bd58abd27 Converted PagingFreeBytes to use perflib
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-18 16:18:47 -07:00
retryW 6f941044c7 Change Sprintf interpolation to use explicit types
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-18 16:18:47 -07:00
retryW 3da11645cf added os_test.go and removed wmi for testing
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-18 16:18:47 -07:00
retryW 048bff919e Converted most metrics to non-wmi
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-18 16:18:47 -07:00
retryW f76334213d Convert os time and timezone from WMI to native go
Signed-off-by: Ben Ridley <benridley29@gmail.com>
2021-03-18 16:18:47 -07:00
Calle Pettersson c5a545540d Take over prometheus/common/log into local log package
Signed-off-by: Calle Pettersson <carlpett@users.noreply.github.com>
2021-01-30 11:53:51 +01:00
Calle Pettersson 21a02c4fbe Only query the perflib objects we need 2020-02-29 10:40:53 +01:00
Philipp Trulson 375a74f1e8 Add product name & version to os collector 2019-10-01 18:54:50 +02: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 cd365c6a3b Harmonize query call layout 2018-06-06 11:35:13 +02: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
Calle Pettersson 63e51a554b gofmt 2018-04-05 07:11:36 +02:00
Attila Tóth 4895e707ef Added metrics to OS collector
"time" for the Unix time
"timezone" for the name of the timezone
2017-04-03 10:50:16 +02:00
Martin Lindhe 52592bb097 os: expose Win32_ComputerSystem and Win32_PerfRawData_PerfOS_System 2016-09-19 09:02:05 +02:00
Martin Lindhe d8f62e07c2 make enabled collectors configurable (based on code from node_exporter) 2016-09-01 16:04:43 +02:00
Martin Lindhe 2af46d9313 refactor: rename namespace to 'collector' 2016-09-01 14:55:35 +02:00