Перейти к содержимому

Windows without an agent (WinRM)

Это содержимое пока не доступно на вашем языке.

A Windows server or PC monitored without installing anything, through WinRM (WS-Management) and read-only WMI queries: CPU, memory, disks, services (the chosen ones and every automatic service that is stopped), uptime and recent event log errors.

DumbMonit only sends fixed SELECT queries (WQL Enumerate). It never runs a command or a script on the server, and it can go through a relay agent to reach a network the server cannot.

From the DumbMonit server (or its relay agent) to the device:

PortProtocolPurpose
5986TCPWinRM over HTTPS (default)
5985TCPOnly with the Allow unencrypted traffic option
  1. On the server, in an elevated PowerShell, enable WinRM.

    Terminal window
    Enable-PSRemoting -SkipNetworkProfileCheck -Force
  2. Create the HTTPS listener with a certificate named after the server (use your own certificate instead of this self-signed one if you have one), then open its port.

    Terminal window
    $cert = New-SelfSignedCertificate -DnsName "srv01.corp.example.com" -CertStoreLocation Cert:\LocalMachine\My
    New-Item -Path WSMan:\LocalHost\Listener -Transport HTTPS -Address * -CertificateThumbPrint $cert.Thumbprint -Force
    New-NetFirewallRule -DisplayName "WinRM HTTPS" -Direction Inbound -Protocol TCP -LocalPort 5986 -Action Allow
  3. Create the account with a long random password, then add it to the groups listed below.

    Terminal window
    net user dumbmonit * /add
    net localgroup "Remote Management Users" dumbmonit /add
    net localgroup "Performance Monitor Users" dumbmonit /add
    net localgroup "Event Log Readers" dumbmonit /add
  4. Give the account access to the WMI namespace: wmimgmt.msc → right-click WMI Control → Properties → Security → Root → CIMV2 → Security, add it and tick Enable Account and Remote Enable.

  5. In DumbMonit, enter the server name as its certificate names it (srv01.corp.example.com) and log in as dumbmonit, or DOMAIN\dumbmonit for a domain account.

RightUsed for
Remote Management UsersAllows the WinRM login
Performance Monitor UsersReads the CPU load per core
Event Log ReadersOnly for the event log counts
WMI root/cimv2: Enable Account, Remote EnableReads the WMI classes

The account is not an administrator and runs nothing on the server.

  • NTLM (default): local and domain accounts. The Negotiate header carries NTLMv2 tokens. Over HTTPS the channel is encrypted by TLS.
  • Basic: only over HTTPS, and only if the server allows it (winrm set winrm/config/service/auth @{Basic="true"}).
  • Kerberos is not supported: there is no pure-Rust, open-source client that fits the static binary. Use NTLM.
  • Unencrypted HTTP (5985) is refused unless you tick Allow unencrypted traffic. The server must then allow it (winrm set winrm/config/service @{AllowUnencrypted="true"}), which exposes the data and the login to anyone on the network path. Prefer the HTTPS listener.
  • A self-signed listener certificate needs Accept an unverifiable certificate; otherwise the certificate must be trusted by the DumbMonit host and name the server as you typed it.

An unreachable server (refused connection, timeout) is a down device; a 401 or an access denied is a configuration error shown on the device, not an outage.

These metrics have the names and labels of the Windows agent, so dashboards and rules work the same:

MetricFrom
cpu_usage_percent, cpu_core_usage_percent, cpu_countWin32_PerfFormattedData_PerfOS_Processor
memory_total_bytes, memory_used_bytes, memory_available_bytes, memory_used_percentWin32_OperatingSystem
swap_total_bytes, swap_used_bytes, swap_used_percentWin32_PageFileUsage
filesystem_*{mountpoint,device,fstype}Win32_LogicalDisk (fixed disks)
uptime_seconds, boot_time_seconds, process_count, windows_version_infoWin32_OperatingSystem
service_up{service}Win32_Service
windows_services_auto_stopped, windows_service_auto_stopped{service}automatic services that are stopped
windows_eventlog_errors{log}, windows_eventlog_events{log,event_id,source}Win32_NTLogEvent
winrm_section_readable{section}0 when a read is refused
  • Services: list names in Services to follow to get an up/down series each (a name missing from the server counts as stopped). Every service set to start automatically that is stopped is reported too, except updaters and delayed-start services (gupdate, edgeupdate, sppsvc…) and the names in Stopped services to ignore (* at the start or end is a wildcard). The built-in rule Windows automatic services stopped alerts on it.
  • Event log: the errors of the last N minutes (60 by default) of the logs you choose, as a count per log and the five most frequent Event IDs. The Security log counts audit failures. This reads the classic logs through Win32_NTLogEvent; for per-event rules (log, source, Event ID, text), use the Windows agent’s event log alerts.
  • Pending updates cannot be read through WQL and are not collected.
OptionDefaultRole
Allow unencrypted trafficoffHTTP on 5985 instead of HTTPS on 5986
Port5986Used if the address does not give one
Authenticationntlmntlm or basic (HTTPS only)
Accept an unverifiable certificateoffFor a self-signed listener
Timeout per request15 s1 to 120
Services to follownoneComma-separated service names
Stopped services to ignorenoneNames, * wildcard allowed
Event logs to countSystem,Applicationnone turns it off
Event window60 min1 to 1440