Windows_exporter: Wiki page for WMI <-> Prometheus conversion

Created on 28 Aug 2016  Â·  7Comments  Â·  Source: prometheus-community/windows_exporter

As suggested by @brian-brazil, we should have a wiki page for how to map WMI types to Prometheus types. I made a start, and then tried to PR it, but it seems Github does not support wiki-PRs for some reason.
So, workaround: File an issue with the page markdown :) This is mostly a skeleton so far, I added the few types we use in logical_disk, but I expect we'll continually edit this as we make progress.

Prometheus and WMI CounterTypes

WMI performance counters hava many types, and those need to be mapped to Prometheus' types. Below is a listing of WMI types, the Prometheus type that should be used, and any processing that needs to be done.

This applies to WMI classes inheriting Win32_PerfRawData.

| WMI type | Prometheus type | Processing |
| --- | --- | --- |
| PERF_COUNTER_RAWCOUNT_HEX | | |
| PERF_COUNTER_LARGE_RAWCOUNT_HEX | | |
| PERF_COUNTER_TEXT | | |
| PERF_COUNTER_RAWCOUNT | gauge | |
| PERF_COUNTER_LARGE_RAWCOUNT | | |
| PERF_DOUBLE_RAW | | |
| PERF_COUNTER_DELTA | | |
| PERF_COUNTER_LARGE_DELTA | | |
| PERF_SAMPLE_COUNTER | | |
| PERF_COUNTER_QUEUELEN_TYPE | | |
| PERF_COUNTER_LARGE_QUEUELEN_TYPE | | |
| PERF_COUNTER_100NS_QUEUELEN_TYPE | | |
| PERF_COUNTER_OBJ_TIME_QUEUELEN_TYPE | | |
| PERF_COUNTER_COUNTER | counter | |
| PERF_COUNTER_BULK_COUNT | counter | |
| PERF_RAW_FRACTION | | |
| PERF_COUNTER_TIMER | | |
| PERF_PRECISION_SYSTEM_TIMER | | |
| PERF_100NSEC_TIMER | | |
| PERF_PRECISION_100NS_TIMER | counter | Normalize to seconds (value / 1e7) |
| PERF_OBJ_TIME_TIMER | | |
| PERF_PRECISION_OBJECT_TIMER | | |
| PERF_SAMPLE_FRACTION | | |
| PERF_COUNTER_TIMER_INV | | |
| PERF_100NSEC_TIMER_INV | | |
| PERF_COUNTER_MULTI_TIMER | | |
| PERF_100NSEC_MULTI_TIMER | | |
| PERF_COUNTER_MULTI_TIMER_INV | | |
| PERF_100NSEC_MULTI_TIMER_INV | | |
| PERF_AVERAGE_TIMER | | |
| PERF_ELAPSED_TIME | | |
| PERF_COUNTER_NODATA | | |
| PERF_AVERAGE_BULK | | |
| PERF_SAMPLE_BASE | | |
| PERF_AVERAGE_BASE | | |
| PERF_RAW_BASE | | |
| PERF_PRECISION_TIMESTAMP | | |
| PERF_LARGE_RAW_BASE | | |
| PERF_COUNTER_MULTI_BASE | | |
| PERF_COUNTER_HISTOGRAM_TYPE | | |

Most helpful comment

I've filled out what I can. Some time/denominator aspects remain unclear.

All 7 comments

If you give me access, I'll fill this out.

On 28 Aug 2016 15:01, "Calle Pettersson" [email protected] wrote:

As suggested by @brian-brazil https://github.com/brian-brazil, we
should have a wiki page for how to map WMI types to Prometheus types. I
made a start, and then tried to PR it, but it seems Github does not support
wiki-PRs for some reason.
So, workaround: File an issue with the page markdown :) This is mostly a
skeleton so far, I added the few types we use in logical_disk, but I
expect we'll continually edit this as we make progress.
Prometheus and WMI CounterTypes

WMI performance counters hava many types, and those need to be mapped to
Prometheus' types. Below is a listing of WMI types, the Prometheus type
that should be used, and any processing that needs to be done.

This applies to WMI classes inheriting Win32_PerfRawData.
WMI type Prometheus type Processing
PERF_COUNTER_RAWCOUNT_HEX
PERF_COUNTER_LARGE_RAWCOUNT_HEX
PERF_COUNTER_TEXT
PERF_COUNTER_RAWCOUNT gauge
PERF_COUNTER_LARGE_RAWCOUNT
PERF_DOUBLE_RAW
PERF_COUNTER_DELTA
PERF_COUNTER_LARGE_DELTA
PERF_SAMPLE_COUNTER
PERF_COUNTER_QUEUELEN_TYPE
PERF_COUNTER_LARGE_QUEUELEN_TYPE
PERF_COUNTER_100NS_QUEUELEN_TYPE
PERF_COUNTER_OBJ_TIME_QUEUELEN_TYPE
PERF_COUNTER_COUNTER counter
PERF_COUNTER_BULK_COUNT counter
PERF_RAW_FRACTION
PERF_COUNTER_TIMER
PERF_PRECISION_SYSTEM_TIMER
PERF_100NSEC_TIMER
PERF_PRECISION_100NS_TIMER counter Normalize to seconds (value / 1e7)
PERF_OBJ_TIME_TIMER
PERF_PRECISION_OBJECT_TIMER
PERF_SAMPLE_FRACTION
PERF_COUNTER_TIMER_INV
PERF_100NSEC_TIMER_INV
PERF_COUNTER_MULTI_TIMER
PERF_100NSEC_MULTI_TIMER
PERF_COUNTER_MULTI_TIMER_INV
PERF_100NSEC_MULTI_TIMER_INV
PERF_AVERAGE_TIMER
PERF_ELAPSED_TIME
PERF_COUNTER_NODATA
PERF_AVERAGE_BULK
PERF_SAMPLE_BASE
PERF_AVERAGE_BASE
PERF_RAW_BASE
PERF_PRECISION_TIMESTAMP
PERF_LARGE_RAW_BASE
PERF_COUNTER_MULTI_BASE
PERF_COUNTER_HISTOGRAM_TYPE

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/martinlindhe/wmi_exporter/issues/13, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AGyTdt1hblT8x4OyiVNt-nDvRZsRf_fMks5qkYaMgaJpZM4Ju629
.

Can't you guys edit the project wiki? Not sure how to open it up, let's figure it out

(added you both as collaborators)

Yup, works well.

I've filled out what I can. Some time/denominator aspects remain unclear.

Great work!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Psk8140 picture Psk8140  Â·  3Comments

liyang010813 picture liyang010813  Â·  4Comments

fischerman picture fischerman  Â·  4Comments

captainhistory picture captainhistory  Â·  8Comments

mango19b picture mango19b  Â·  4Comments