Windows service over WinRM (win_service)
Reads the state of one Windows service by its short name from Win32_Service over WinRM.
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, watching a Windows Server domain controller reached over WinRM. 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 |
|---|---|---|---|
state | State | Running is Up, Stopped is Down, anything else is Warning |
The value is a number with a label:
| Value | Label | Health |
|---|---|---|
| 0 | Unknown | Warning |
| 1 | Stopped | Down |
| 2 | Starting | Warning |
| 3 | Stopping | Warning |
| 4 | Running | Up |
| 5 | Continuing | Warning |
| 6 | Pausing | Warning |
| 7 | Paused | Warning |
Parameters
| Parameter | Default | Meaning |
|---|---|---|
name | required | The service's short name as sc query shows it (Spooler), not its display name. Case does not matter. |
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. |
Suggested interval: 60 seconds. Credential: Windows.
For "is everything that should run running", use the single win_services summary sensor instead of one of these per service. Discovery proposes win_service only for server roles that are present and set to start automatically:
| Service | Role | Proposed on |
|---|---|---|
DNS | DNS Server | any |
DHCPServer | DHCP Server | any |
NTDS | Active Directory Domain Services | any |
Netlogon | Netlogon | domain controllers only: it runs on every domain member, but is the role only on a DC |
DFSR | DFS Replication | any |
W32Time | Windows Time | servers and domain controllers: it is often automatic on workstations too, where it is not a role |
W3SVC | IIS web server | any |
MSSQLSERVER, SQLSERVERAGENT | SQL Server default instance and its agent | any |
Spooler | Print Spooler | servers that share at least one printer (Win32_Printer with Shared=TRUE) |
vmms | Hyper-V Virtual Machine Management | any |
MSExchangeTransport, MSExchangeIS | Exchange transport and information store | any |
A role service that is automatic but stopped is still proposed, so the new sensor shows it Down. Any other service can be added by hand.
On the target
WinRM enabled and an account set up as in the WinRM setup guide. Some services restrict who may query them through their security descriptor; such a service may not be returned to an unprivileged account, and is then reported as missing.
Failures
The WinRM failures every Windows sensor shares are listed in the setup guide. Specific to this sensor:
| Message | Meaning |
|---|---|
there is no service named X on the target (kind config) | The service was uninstalled, the name is the display name rather than the short name, or the account may not see it. |