Windows performance counters over WinRM (win_perf)
Reads named properties of one performance counter instance from a Win32_PerfFormattedData_* or Win32_PerfRawData_* class over WinRM, and reports each as a channel with the name and unit you give it. Use it for the counters that have no sensor of their own: disk queue length, network bytes per second, a process's working set, SQL Server or IIS counters, and so on. For the processor load, memory and disk space the dedicated sensors (win_cpu, win_memory, win_disk) need no setup.
Transport. Under a Windows probe the device can be set to read this sensor over native WMI instead of WinRM; the query and the result are the same. The target is then set up as in the WMI setup guide instead.
What it looks like

The sensor's page after a few polls, reading available memory and the page fault rate from Win32_PerfRawData_PerfOS_Memory on a Windows Server domain controller reached over WinRM. The rate is unknown for the first poll, which only takes the starting reading. In the dark theme: the sensor's page. The form for adding it, with its parameters filled in: light, dark.
Channels
| Key | Name | Unit | Default limits |
|---|---|---|---|
counters_read | Counters read | none | |
one per entry of counters | its name, or its key | its unit, or none | none. Set limits on the sensor. |
counters_read is how many of the counters had a value in this poll. It is 0 on the first poll of a sensor that only reads rates.
Parameters
| Parameter | Default | Meaning |
|---|---|---|
class | required | The performance class, such as Win32_PerfFormattedData_PerfOS_Memory or Win32_PerfRawData_PerfDisk_PhysicalDisk. The name must start with Win32_PerfFormattedData_ or Win32_PerfRawData_ and contain only letters, digits and underscores. For any other class use win_wql. |
instance | none | The instance, as the class's Name shows it: _Total, C:, 0 C:, a process name. Leave it out for a class that has a single instance (the memory counters). Case does not matter. |
counters | required | 1 to 30 entries, below. |
port | 5985, or 5986 with https | TCP port of the WinRM listener. |
https | false | Use the HTTPS listener instead of HTTP with message encryption. |
accept_self_signed | false | Accept an HTTPS certificate that cannot be verified. The credential has the same switch; either one is enough. |
A counter:
| Field | Default | Meaning |
|---|---|---|
key | required | Lower case letters, digits and _, at most 40 characters. counters_read is reserved. History is stored under it. |
property | required | The property of the class, such as AvailableMBytes. Letters, digits and underscores only; case does not matter. |
mode | value | value reports the property as it is. rate and percent are for raw classes, see below. |
scale | 1 | The number is multiplied by this. Not zero. |
offset | 0 | Added after scaling. scale: -1 with offset: 100 turns an idle percentage into a busy one. |
name | the key | The name shown for the channel, up to 80 characters. |
unit | none | The unit of the reported value, up to 20 characters, for example %, B, ops/s. |
Suggested interval: 60 seconds. Credential: Windows. Discovery does not propose it, because it cannot know which counters you care about.
Nothing in these parameters can add to the query. The class and every property must be identifiers, and the instance goes into a quoted string with the backslash and the quote escaped.
Formatted and raw classes
- Formatted classes (
Win32_PerfFormattedData_*) hold values Windows has already worked out: a queue length, bytes available, a percentage. Read them withmode: value. Counters that Windows computes from two samples (a percentage of time, a rate) depend on how the target's WMI refreshes them between requests, and every poll is a new session. On the domain controller this sensor was checked against they read plausible numbers, but if one of them reads 0 or 100 all the time on your targets, use the raw class and arateorpercentcounter instead, aswin_cpudoes. - Raw classes (
Win32_PerfRawData_*) hold the counters as they accumulate. A property that is a level (a count of things now) is read withmode: value. A cumulative one needs two samples:rateis the increase since the previous poll, per second: bytes or operations per second. It uses the class'sTimestamp_Sys100NSclock.percentis the increase of a 100 ns timer since the previous poll, as a percentage of the time that passed. A timer that adds up several processors can read above 100. Some timers count idle time (thePercentProcessorTimeof the raw processor class does); turn those around withscale: -1,offset: 100.
The sensor keeps each cumulative counter's last reading, and the clock, between polls. The first poll takes the starting reading, and the channel is unknown (first reading taken; the rates are known from the next poll). A poll is also unknown when the counter is lower than before (the machine restarted, or the counter was reset), or when no time passed; the next poll then works from the new reading. An unknown value is never a negative rate. A counter added to a sensor that already has state waits for its own first reading.
Finding class and property names
On the target, in PowerShell:
Get-CimClass -ClassName Win32_PerfFormattedData_* | Select-Object CimClassName
Get-CimInstance Win32_PerfFormattedData_PerfDisk_PhysicalDisk | Format-List *
typeperf -q lists the counters by their performance counter names; the WMI class is Win32_PerfFormattedData_ or Win32_PerfRawData_ plus the provider and object name with the punctuation removed (PerfDisk_PhysicalDisk). WMI spells some properties differently from the counter: Disk Read Bytes/sec is DiskReadBytesPersec.
Example
Writes per second and the busy share of all physical disks, from the raw class:
{
"class": "Win32_PerfRawData_PerfDisk_PhysicalDisk",
"instance": "_Total",
"counters": [
{ "key": "write_bps", "property": "DiskWriteBytesPersec", "mode": "rate", "name": "Disk writes", "unit": "B/s" },
{ "key": "disk_busy", "property": "PercentDiskTime", "mode": "percent", "name": "Disk busy", "unit": "%" }
]
}On the target
WinRM enabled and an account set up as in the WinRM setup guide. Reading performance counters needs membership of Performance Monitor Users as well as the WMI rights.
Failures
The WinRM failures every Windows sensor shares are listed in the setup guide. Specific to this sensor:
| Message | Meaning |
|---|---|
<class> instance <name> does not exist on the target (kind config) | No instance has that name. Instances such as processes and disks come and go; check the name on the target. |
<class> has several instances (...); set instance to the one to read (kind config) | The class has more than one instance and none was chosen. The message lists the first ten. |
the WQL query was rejected (kind config) | A property does not exist on the class. WMI does not say which; compare the names with the class on the target. |
the WMI class does not exist (kind config) | The class is not on the target. The class of a role or product exists only where it is installed. |
<class> returned no instance (kind protocol) | The class exists but has no rows: the counter library may be damaged (lodctr /R rebuilds it). |
... has no numeric value for <property> (kind protocol) | None of the counters could be read as a number. With several counters, those that could not are named in the message and are unknown. |
... has no Timestamp_Sys100NS, so a rate cannot be worked out (kind protocol) | A rate or percent counter on a class that has no clock. Use mode: value. |
Verification
Checked against WS-Man responses recorded from a Windows Server 2022 domain controller (a formatted class of one instance, the processor instances, two samples of the raw physical disk class three seconds apart, a missing instance), and that server live over NTLM: formatted and raw reads, rates and percentages over two polls, every failure above, and a hostile instance name. Native WMI is checked through the same client interface, not against a Windows probe.