Windows (WMI)
Windows (WMI)
Plugin: wmi.plugin Module: windows
Overview
Monitor CPU, memory, network traffic and disk space on Windows hosts remotely over WMI, and ping them, without installing anything on them.
A Netdata Agent on another machine reads each host’s built-in Windows Management Instrumentation (WMI) data. Use it where the Netdata Agent cannot be installed on the Windows hosts themselves. For each host you get:
- CPU utilization by mode (user, privileged, interrupts and DPCs), in total and per logical processor;
- free and used physical memory;
- received and sent traffic per network interface;
- available and used space per fixed drive;
- round-trip time and packet loss of ICMP ping from the poller;
- a node of its own in Netdata, named after the Windows computer name and labeled with its Windows version, hardware and default network address.
The charts use the same contexts as the Netdata Agent running on Windows, so the dashboard and the stock Windows alerts treat these hosts like Windows hosts that run the Agent. The ping charts use the contexts of Netdata’s Ping collector, so its stock ping alerts apply too.
wmi.plugin runs on a Netdata Agent, the poller. Every update_every seconds (30 by default) it connects to each configured Windows host, runs one read-only WQL query in the root\cimv2 namespace per enabled metric group, and disconnects. Every five minutes the same connection also reads the host’s system information for its node labels. The plugin only reads: it changes nothing on the host and opens no shell.
While the queries run, the plugin also pings the host: it sends three ICMP echo requests, 100 ms apart, and charts the replies.
It authenticates as the configured Windows account with NTLMv2 and uses one of two transports:
| Transport | Ports on the Windows host | Protection |
|---|---|---|
| DCOM (default) | TCP 135 (RPC endpoint mapper) and the dynamic RPC port of the WMI service | NTLMv2 with RPC packet privacy (encrypted) |
| WinRM | TCP 5986 (HTTPS listener) | TLS; the poller verifies the listener certificate |
These are the WMI classes it reads, for audit and access reviews:
| Data | WMI classes |
|---|---|
| CPU | Win32_PerfRawData_Counters_ProcessorInformation |
| Memory | Win32_OperatingSystem |
| Network | Win32_PerfRawData_Tcpip_NetworkInterface |
| Disk | Win32_LogicalDisk |
| Node labels | Win32_OperatingSystem, Win32_ComputerSystem, Win32_Processor, Win32_PhysicalMemory, Win32_LogicalDiskToPartition, Win32_IP4RouteTable, Win32_NetworkAdapter, Win32_NetworkAdapterConfiguration |
This collector is only supported on the following platforms:
- Linux
- Windows
This collector supports collecting metrics from multiple instances of this integration.
The Windows account needs remote read access to WMI on each monitored host. Members of the host’s local Administrators group have it. For a dedicated non-administrator account, grant:
| Permission | Needed when |
|---|---|
Enable Account and Remote Enable on the root\cimv2 WMI namespace | Always |
| Membership in the local Distributed COM Users group | transport: dcom |
| Membership in the local Remote Management Users group | transport: winrm |
| Membership in the local Performance Monitor Users group | The CPU or network group is enabled |
The plugin only reads: do not grant Execute Methods, write or full-control permissions. See Securing a remote WMI connection.
On a Linux poller, wmi.plugin needs the CAP_NET_RAW capability to send ICMP echo requests. The installer grants it that capability and no other privilege.
Default Behavior
Auto-Detection
The plugin does not discover Windows hosts. The stock configuration has no jobs, so it contacts no host until you add one.
Limits
- Authentication is NTLMv2 only. Hosts or domains that block NTLM and accept only Kerberos cannot be monitored.
- Every collection logs in again. With a wrong or expired password, each collection adds one failed logon (and each
autodetection_retryattempt while the job is starting), which can lock the account under an account lockout policy. - A WinRM listener with
CbtHardeningLevelset toStrictrejects the plugin, because it sends no TLS channel binding token. - Traffic appears from the second collection after a job starts, because a rate needs two readings.
- Disk space covers fixed drives that have a drive letter. Volumes mounted only into a folder, removable drives and network drives are not charted.
- Network interface speed is not collected, so the stock alerts that compare traffic with it have no value.
- Every job pings its host; ping cannot be switched off. A host that does not answer ICMP echo requests, for example because Windows Firewall blocks them, shows 100% packet loss in every collection and raises the
ping_host_reachablealert. - Ping charts update only in collections whose WMI queries succeed. A host that is down leaves a gap in the ping charts instead of 100% packet loss, so the ping alerts do not report it.
- A collection must finish within
timeout(15 seconds by default); a collection that does not is discarded and leaves a gap in every chart of the host.
Performance Impact
The poller’s own cost is small: a few short-lived connections per job per collection.
On each Windows host, every collection costs up to four WMI queries, run by the WMI provider host process (WmiPrvSE.exe), and three ICMP echo requests. DCOM opens two authenticated TCP connections per collection (the RPC endpoint mapper and the WMI service); WinRM opens one authenticated HTTPS connection. Every five minutes the node labels add up to eight small queries. To reduce the load, raise update_every or switch off the metric groups you do not need under collectors.
Setup
Prerequisites
Build the plugin from source
Netdata packages do not include this experimental plugin yet. On the poller, build and install Netdata from source with the plugin enabled:
./netdata-installer.sh --enable-plugin-wmi
CMake builds use -DENABLE_PLUGIN_WMI=ON. Check that wmi.plugin is in the Netdata plugins directory, usually /usr/libexec/netdata/plugins.d/.
The installer also gives wmi.plugin the CAP_NET_RAW capability, which ping needs. When the setcap tool is missing, or the installer runs inside a container, it does not, and prints a warning; the plugin then collects without ping charts until you grant the capability (see the ICMP ping disabled error under Troubleshooting).
Allow the poller through the Windows firewall
On each Windows host, allow inbound connections from the poller for the transport you use. In PowerShell as Administrator, replace 192.0.2.10 with the poller’s address.
For DCOM, enable the built-in WMI rules and limit them to the poller:
Enable-NetFirewallRule -DisplayGroup "Windows Management Instrumentation (WMI)"
Set-NetFirewallRule -DisplayGroup "Windows Management Instrumentation (WMI)" -RemoteAddress 192.0.2.10
For WinRM, allow the HTTPS listener port:
New-NetFirewallRule -DisplayName "WinRM HTTPS from Netdata" -Direction Inbound -Protocol TCP -LocalPort 5986 -RemoteAddress 192.0.2.10 -Action Allow
For the ping charts, allow ICMP echo requests from the poller:
New-NetFirewallRule -DisplayName "ICMP echo from Netdata" -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress 192.0.2.10 -Action Allow
For a host monitored over IPv6, use -Protocol ICMPv6 -IcmpType 128.
Network firewalls between the poller and the host need the same ports and ICMP echo. DCOM’s WMI port is dynamic, by default in the TCP range 49152-65535.
Create a WinRM HTTPS listener
WinRM only. The host needs a server authentication certificate whose subject or subject alternative name matches the host you configure, in the computer’s Personal certificate store. Then create the listener in PowerShell as Administrator:
winrm quickconfig -transport:https
If a private CA issued the certificate, copy the CA certificate in PEM format to the poller and set tls_ca to its path. See Configure WinRM for HTTPS.
Grant the monitoring account access to WMI
Skip this step for an account in the host’s local Administrators group. Otherwise, grant the permissions listed under Overview:
Add the account to the local groups, for example for DCOM:
Add-LocalGroupMember -Group "Distributed COM Users" -Member 'EXAMPLE\monitor' Add-LocalGroupMember -Group "Performance Monitor Users" -Member 'EXAMPLE\monitor'For WinRM, use the group
Remote Management Usersinstead ofDistributed COM Users.Run
wmimgmt.msc, open the properties of WMI Control, and on the Security tab selectRoot\CIMV2. Click Security, add the account, and allow Enable Account and Remote Enable.
A local account other than the built-in Administrator gets a filtered token for remote connections even when it is an administrator (remote UAC), so treat it as a non-administrator account and grant the permissions above.
Configuration
Options
Each job monitors one Windows host. Set update_every or autodetection_retry at the top of the file to apply them to every job.
| Group | Option | Description | Default | Required |
|---|---|---|---|---|
| Connection | host | Hostname or IP address of the Windows host. | yes | |
| transport | Protocol that carries the WMI queries. DCOM uses TCP 135 and a dynamic RPC port; WinRM uses HTTPS on TCP 5986. | dcom | no | |
| tls_ca | Path on the poller to the PEM file of the CA that issued the WinRM listener certificate. Leave empty to use the system trust store. | no | ||
| auth | Authentication protocol for the Windows account. NTLMv2 is the only supported protocol. | yes | ||
| username | Windows account that reads WMI on the host, as DOMAIN\user, user@domain or a local account name. | yes | ||
| password | Password of the Windows account. | yes | ||
| Collection | update_every | Data collection interval, in seconds. | 30 | no |
| autodetection_retry | How often to retry the initial connection when the job fails to start, in seconds. Zero disables retries. | 0 | no | |
| timeout | Time limit for one collection, including the connection and every enabled query, in seconds. | 15 | no | |
| collectors | Metric groups to collect. Each enabled group runs one WMI query per collection. Keep at least one group enabled. | no | ||
| collectors.cpu | Collect processor utilization by mode, in total and per logical processor. | yes | no | |
| collectors.memory | Collect free and used physical memory. | yes | no | |
| collectors.network | Collect received and sent traffic per network interface. | yes | no | |
| collectors.disk | Collect available and used space per fixed drive. | yes | no | |
| Virtual Node | vnode | Associates this job with a Virtual Node. | no |
password
Keep the password out of the configuration file with a secret reference, for example ${env:WMI_PASSWORD} with the variable set in the Netdata service environment. See secrets management.
collectors.cpu
As on the Netdata Agent running on Windows, each mode is its share of the time all modes accumulated in the interval. The privileged time Windows reports (system) already includes the interrupt (irq) and DPC (dpc) time, so those two also count within system.
vnode
Leave vnode empty and the job creates a node for the Windows host. Its identity comes from host: renaming the Windows computer keeps the node and its history, while changing host creates a new node. The node is named after the Windows computer name, carries host in the address label, and gets these labels from WMI, refreshed every five minutes. A label is left out when Windows does not report its value unambiguously.
| Labels | Meaning |
|---|---|
_os_name, _os_version, _os_marketing_version, _os_edition, _kernel_version | Windows product, edition, version and build |
_hw_sys_vendor, _hw_product_name, _virtualization, _virt_detection, _hw_product_type | Manufacturer, model, and the platform of a recognized virtual machine |
_system_cores, _architecture, _system_cpu_model, _system_cpu_freq | Logical processors, architecture, processor model and clock in Hz |
_system_ram_total | Sum of the installed memory modules, in bytes |
_system_disk_space | Total partition size of the fixed drives, in bytes; requires the disk group |
_net_default_iface, _net_default_iface_ip, _net_default_iface_detection | Interface and IPv4 address of the default route |
Set vnode to the name of a virtual node defined in vnodes.conf to use its name and labels instead; the job then reads no system information. Give that node the label _os: windows, which the generated node has, so the stock Windows alerts apply to it.
via File
The configuration file name for this integration is wmi/windows.conf.
You can edit the configuration file using the edit-config script from the
Netdata config directory.
cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
sudo ./edit-config wmi/windows.conf
Examples
Basic
Monitor one Windows host over DCOM. The password comes from the WMI_PASSWORD environment variable of the Netdata service.
jobs:
- name: fileserver
host: fileserver.example.com
auth: ntlm
username: 'EXAMPLE\monitor'
password: '${env:WMI_PASSWORD}'
WinRM over HTTPS with a private CA
Use the host’s WinRM HTTPS listener instead of DCOM, trusting the CA that issued its certificate.
jobs:
- name: fileserver
host: fileserver.example.com
transport: winrm
tls_ca: /etc/netdata/ssl/windows-ca.pem
auth: ntlm
username: 'EXAMPLE\monitor'
password: '${env:WMI_PASSWORD}'
CPU and memory only
Skip the network and disk queries.
jobs:
- name: fileserver
host: fileserver.example.com
auth: ntlm
username: 'EXAMPLE\monitor'
password: '${env:WMI_PASSWORD}'
collectors:
network: false
disk: false
Multi-instance
Monitor several Windows hosts with one account. Each job creates its own node.
jobs:
- name: fileserver
host: fileserver.example.com
auth: ntlm
username: 'EXAMPLE\monitor'
password: '${env:WMI_PASSWORD}'
- name: sqlserver
host: sql01.example.com
auth: ntlm
username: 'EXAMPLE\monitor'
password: '${env:WMI_PASSWORD}'
Metrics
Metrics grouped by scope.
The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.
- Charts belong to the Windows host’s node, not to the poller.
- CPU utilization and traffic are averages over each collection interval, computed from Windows’ raw performance counters, so a short spike counts toward the interval it happens in.
- A metric group whose query fails leaves a gap in its charts for that collection, while the other groups continue. A zero is always a reported value.
- Ping packet loss is the share of the three echo requests of a collection that got no reply. Round-trip times come from the replies, so a collection without any reply has packet loss but no round-trip time.
Per Windows (WMI) instance
The monitored Windows host.
This scope has no labels.
Metrics:
| Metric | Description | Dimensions | Unit |
|---|---|---|---|
| system.cpu | Total CPU Utilization | irq, user, system, dpc, idle | percentage |
| system.ram | System RAM | free, used | MiB |
Per logical processor
A logical processor of the host.
Labels:
| Label | Description |
|---|---|
| cpu | Logical processor as cpuN, numbered through the host’s NUMA nodes in order, for example cpu0. |
Metrics:
| Metric | Description | Dimensions | Unit |
|---|---|---|---|
| cpu.cpu | Core Utilization | irq, user, system, dpc, idle | percentage |
Per network interface
A network interface as Windows performance counters list it, including virtual and tunnel adapters, that has sent or received traffic since its counters started.
Labels:
| Label | Description |
|---|---|
| device | Performance counter name of the interface, for example Intel[R] PRO_1000 MT Network Connection. Windows writes parentheses as square brackets and # or / as underscores. |
| interface_type | Always real, the value the Netdata Agent on Windows gives the interfaces of this counter set. |
Metrics:
| Metric | Description | Dimensions | Unit |
|---|---|---|---|
| net.net | Bandwidth | received, sent | kilobits/s |
Per drive
A fixed drive with a drive letter that Windows does not report as read-only.
Labels:
| Label | Description |
|---|---|
| mount_point | Drive letter, for example C:. |
| drive_type | Always fixed, the only drive type the plugin reads. |
| filesystem | File system of the drive, for example NTFS, or unknown when Windows reports none. |
| rw_mode | Always rw, because read-only drives are not charted. |
| serial_number | Volume serial number in hexadecimal, for example 0x1A2B3C4D, or 0x0 when Windows reports none. |
Metrics:
| Metric | Description | Dimensions | Unit |
|---|---|---|---|
| disk.space | Disk Space Usage | avail, used | GiB |
Per ping target
The Windows host as the poller pings it.
Labels:
| Label | Description |
|---|---|
| host | The job’s host option, the name or address the poller pings. |
Metrics:
| Metric | Description | Dimensions | Unit |
|---|---|---|---|
| ping.host_rtt | Ping round-trip time | min, max, avg | milliseconds |
| ping.host_std_dev_rtt | Ping round-trip time standard deviation | std_dev | milliseconds |
| ping.host_packet_loss | Ping packet loss | loss | percentage |
Alerts
The following alerts are available:
| Alert name | On metric | Description |
|---|---|---|
| 10min_cpu_usage | system.cpu | Average CPU utilization over the last 10 minutes |
| disk_space_usage | disk.space | Total space utilization of disk ${label:mount_point} |
| disk_fill_rate | disk.space | average rate the disk fills up (positive), or frees up (negative) space, for the last hour |
| out_of_disk_space_time | disk.space | Estimated time the disk ${label:mount_point} will run out of space, if the system continues to add data with the rate of the last hour |
| ping_host_reachable | ping.host_packet_loss | Network host ${label:host} reachability status |
| ping_packet_loss | ping.host_packet_loss | Packet loss percentage to the network host ${label:host} over the last 10 minutes |
| ping_host_latency | ping.host_rtt | Average latency to the network host ${label:host} over the last 10 seconds |
Troubleshooting
Known Errors
secret resolver: provider failure: job output: collector lifecycle failed; resolved configuration details redacted
When
The job’s password, or another option, is a secret reference such as ${env:WMI_PASSWORD}.
Cause
The Agent could not resolve the reference, for example because the variable is not set in the Netdata service environment. The Agent hides the details because they can contain resolved values. The plugin’s own messages, listed below, still appear for jobs that use secret references.
Fix
Set the variable in the environment of the Netdata service, or correct the reference, as described in secrets management.
auth must be ntlm
Cause
The job omits auth or sets another value. The option has no default.
Fix
Add auth: ntlm to the job.
transport must be dcom or winrm
Cause
transport has a value other than dcom or winrm.
Fix
Set transport: winrm for the WinRM HTTPS listener, or remove transport to use DCOM.
tls_ca requires the winrm transport
Cause
The job sets tls_ca without transport: winrm. DCOM does not use TLS.
Fix
Add transport: winrm, or remove tls_ca to keep DCOM.
could not load tls_ca: could not read certificate "/etc/netdata/ssl/windows-ca.pem": open "/etc/netdata/ssl/windows-ca.pem": no such file or directory
When
tls_ca is set. Jobs that use secret references show only could not load tls_ca.
Cause
The file does not exist, or the netdata user cannot read it. The plugin reads it without its elevated privileges.
Fix
Set tls_ca to the absolute path of the CA certificate on the poller, and make the file readable by the netdata user.
could not load tls_ca: could not parse any PEM certificates "/etc/netdata/ssl/windows-ca.pem"
When
tls_ca is set. Jobs that use secret references show only could not load tls_ca.
Cause
The file holds no certificate in PEM format, for example a certificate exported in DER format.
Fix
Convert the certificate to PEM, for example with openssl x509 -inform der -in ca.cer -out ca.pem, and point tls_ca at the result.
host must be a Windows hostname or IP address without a URL or port
Cause
host is empty or contains a scheme, path, port or other characters that are not part of a hostname.
Fix
Set host to the bare name or address, for example fileserver.example.com instead of https://fileserver.example.com:5986.
username is required
Cause
username is empty, or names a domain with nothing after the backslash.
Fix
Set the full account name, such as EXAMPLE\monitor or [email protected].
password is required
Cause
password is empty, or its secret reference resolved to an empty value.
Fix
Set the password, or give the referenced variable a value in the Netdata service environment.
timeout must be positive
Cause
timeout is zero or negative.
Fix
Remove timeout to use the default of 15 seconds, or set a positive number of seconds.
at least one collector group must be enabled
Cause
Every group under collectors is set to false.
Fix
Enable at least one of cpu, memory, network or disk, or remove collectors to collect them all.
failed to open WMI session: open DCOM object resolver interface: connection refused
When
transport: dcom
Cause
Nothing accepts connections on TCP 135 at the configured host, or a firewall rejects them.
Fix
Enable the Windows Management Instrumentation (WMI) firewall rules for the poller, as described under Prerequisites, and check that host points at the Windows host.
failed to open WMI session: open DCOM object resolver interface: could not resolve the WMI host
When
transport: dcom
Cause
The poller cannot resolve the configured host name.
Fix
Use a name the poller resolves, such as the host’s fully qualified domain name, or its IP address.
failed to open WMI session: read DCOM server version: ERROR_ACCESS_DENIED (0x00000005)
When
transport: dcom
Cause
The host rejected the login. The username or password is wrong, or the host does not accept NTLMv2.
Fix
Check username and password, including the domain part of the username, and that the host’s network security policy allows NTLMv2. The host’s Security event log records each rejected login as event 4625 from the poller’s address. Fix it promptly or disable the job, because every collection retries the login and counts toward account lockout.
failed to open WMI session: activate WMI: E_ACCESSDENIED (0x80070005)
When
transport: dcom, with a non-administrator account
Cause
The account may log in but is not allowed to start WMI remotely over DCOM.
Fix
Add the account to the host’s local Distributed COM Users group.
failed to open WMI session: open WMI root/cimv2 namespace: StatusAccessDenied (0x80041003)
When
transport: dcom, with a non-administrator account
Cause
The account lacks the Enable Account or Remote Enable permission on the root\cimv2 WMI namespace.
Fix
Grant both permissions in wmimgmt.msc, as described under Prerequisites.
WMI collection did not finish within the timeout of duration
Cause
The host did not answer in time. With DCOM, the usual cause is a firewall that allows TCP 135 but blocks the WMI service’s dynamic RPC port, or a host that is not reachable at all.
Fix
Allow the poller through to the WMI service, as described under Prerequisites. If the host is reachable but slow, raise timeout.
failed to open WMI session: WinRM returned HTTP 401
When
transport: winrm
Cause
The listener rejected the login. The username or password is wrong, or the account may not use WinRM.
Fix
Check username and password; the host’s Security event log records each rejected login as event 4625 from the poller’s address. Every collection retries the login and counts toward account lockout. For a non-administrator account, add it to the host’s local Remote Management Users group.
failed to open WMI session: WinRM server certificate verification failed
When
transport: winrm
Cause
The poller does not trust the listener certificate, or the certificate does not match the configured host.
Fix
Set tls_ca to the PEM file of the CA that issued the listener certificate, and set host to a name in the certificate.
failed to open WMI session: WinRM request failed: connection refused
When
transport: winrm
Cause
Nothing accepts connections on TCP 5986 at the configured host, or a firewall rejects them.
Fix
Create the HTTPS listener and allow TCP 5986 from the poller, as described under Prerequisites.
failed to open WMI session: WinRM request failed: could not resolve the WMI host
When
transport: winrm
Cause
The poller cannot resolve the configured host name.
Fix
Use a name the poller resolves and that matches the listener certificate, such as the host’s fully qualified domain name.
ICMP ping disabled: the plugin may not open raw ICMP sockets, which on Linux requires the CAP_NET_RAW capability
Cause
wmi.plugin lacks the CAP_NET_RAW capability on the poller, for example because the installer ran without the setcap tool or inside a container, where it does not set capabilities. The job logs this once and keeps collecting WMI metrics without ping charts.
Fix
Grant the capability, then restart the Netdata service:
sudo setcap cap_net_raw+ep /usr/libexec/netdata/plugins.d/wmi.plugin
In a container, run the same command inside it only when the container keeps cap_net_raw in its capability bounding set (capsh --print lists it under Bounding set). A binary whose file capability the container does not allow fails to start, which would stop all WMI collection.
ICMP ping failed: could not resolve the host
Cause
The poller could not resolve the configured host name when it pinged the host, while the WMI queries of that collection succeeded. The usual cause is an intermittent DNS failure, or a DNS server that does not answer within the ping time limit of up to 3 seconds.
Fix
Use a name the poller resolves reliably, such as the host’s fully qualified domain name, or its IP address.
ICMP ping failed: reason
Cause
The poller could not send the echo requests, for example because a firewall on the poller rejects outgoing ICMP (operation not permitted) or has no route to the host (no route to host).
Fix
Allow outgoing ICMP echo requests from the poller to the host, and check the poller’s routing to the host’s address.
Ping packet loss stays at 100% while the other charts update
Cause
The host, or a firewall between it and the poller, drops ICMP echo requests or their replies. Windows Firewall blocks inbound echo requests unless a rule allows them.
Fix
Allow ICMP echo requests from the poller, as described under Prerequisites. If ICMP must stay blocked, exclude the host from the ping_host_reachable alert with a chart labels line in your copy of health.d/ping.conf, for example:
chart labels: host=!fileserver.example.com *
group WMI query failed: WinRM returned a WS-Management fault
When
transport: winrm
Cause
The listener accepted the login but refused the query, most often because the account lacks permissions on the root\cimv2 WMI namespace.
Fix
Grant Enable Account and Remote Enable on root\cimv2 in wmimgmt.msc, as described under Prerequisites.
The observability platform companies need to succeed
Sign up for freeWant a personalised demo of Netdata for your use case?







