mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-24 05:29:03 +02:00
docs: record PDH counter types of all collectors for agents (#2713)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -186,6 +186,25 @@ go build -o windows_exporter.dev.exe ./cmd/windows_exporter/
|
||||
Adjust the collector list for the change. Leave the existing exporter instance
|
||||
running unless the user requests changes to it.
|
||||
|
||||
To check a collector's metric types against Windows, list each counter of the
|
||||
PDH object with its type and raw value. Windows PowerShell 5.1 can do this
|
||||
through .NET; `RawValue` and `BaseValue` are what `pdh.CounterTypeRaw` returns
|
||||
as first and second value:
|
||||
|
||||
```powershell
|
||||
$cat = [System.Diagnostics.PerformanceCounterCategory]'DirectoryServices'
|
||||
$cat.GetCounters('NTDS') | ForEach-Object {
|
||||
$s = $_.NextSample()
|
||||
'{0} | {1} | raw={2} base={3}' -f $_.CounterName, $_.CounterType, $s.RawValue, $s.BaseValue
|
||||
}
|
||||
```
|
||||
|
||||
Every PDH-based collector except `exchange`, `smtp` and `vmware` has such a
|
||||
dump in the `AGENTS.md` of its directory, including roles that are rarely
|
||||
available on development machines (AD DS, AD CS, AD FS, DFSR, Hyper-V, IIS,
|
||||
SQL Server, NPS, RemoteFX sessions). Check a type or unit question there
|
||||
first.
|
||||
|
||||
## Dashboards, rules and runbooks
|
||||
|
||||
Read [`contrib/mixin/README.md`](contrib/mixin/README.md) and
|
||||
|
||||
Reference in New Issue
Block a user