Skip to content

Windows uptime over WinRM (win_uptime) ​

Reads the last boot time from Win32_OperatingSystem over WinRM and reports the uptime, and whether the machine restarted since the previous poll.

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 page of a win_uptime sensor in the light theme

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 ​

KeyNameUnitDefault limits
uptime_sUptimesnone
last_bootLast boot (Unix time)snone
restartedRestarted since the previous poll1 (Yes) is Warning

Parameters ​

ParameterDefaultMeaning
port5985, or 5986 with httpsTCP port of the WinRM listener.
httpsfalseUse the HTTPS listener instead of HTTP with message encryption.
accept_self_signedfalseAccept an HTTPS certificate that cannot be verified. The credential has the same switch; either one is enough.

Suggested interval: 300 seconds. Credential: Windows. Discovery adds it to every Windows host.

How it is measured ​

The uptime is the target's own LocalDateTime minus its LastBootUpTime, so a clock difference between Probeward and the target does not shift it. A boot time that moved since the previous poll means the machine restarted. With Fast Startup switched on, shutting down and starting again is a resume from hibernation and does not change the boot time; only a restart does.

On the target ​

WinRM enabled and an account set up as in the WinRM setup guide.

Failures ​

The WinRM failures every Windows sensor shares are listed in the setup guide. Specific to this sensor:

MessageMeaning
WMI returned no operating system object (kind protocol)WMI answered the query with nothing.
Win32_OperatingSystem has no readable LastBootUpTime (kind protocol)The boot time is missing or in a form the sensor does not know.

AGPL-3.0-only