Windows probes
A Windows probe is the same probeward program as a Linux probe, built for Windows and installed by an MSI as the service Probeward probe (ProbewardProbe). It pairs, buffers, replays and updates itself as described in probes.md; this page covers what is different on Windows. Use one where the devices are Windows machines that you would rather reach over WMI than open WinRM on, or where only a Windows machine is available near them.
Requirements. 64-bit Windows 10 or Windows Server 2016, or later. Outbound TCP to the core's probe listener. Nothing else: the binary needs no runtime besides what Windows has.
Installing
In Settings, Probes, choose Add probe. The pairing dialog shows the token and the installer command line.
On the Windows machine, in an elevated prompt:
batmsiexec /i probeward-probe-0.2.0-x64.msi /qn CORE=core.example.org:8443 TOKEN=PWP1-...COREis the core's probe listener (PROBEWARD_PROBE_LISTEN),host:port./qninstalls silently; add/l*v install.logfor a log. WithoutCOREthe first installation stops with a message saying so. If the installation fails in the configure step (error 1722 in the log), the reason is in%ProgramData%\Probeward\logs\configure.log: Windows Installer does not keep the program's output.The probe pairs within seconds and shows as connected, with platform Windows, on the Probes page.
The installer is per machine and x64 only. It puts probeward.exe, LICENSE.txt and THIRD-PARTY-LICENSES.txt in C:\Program Files\Probeward, registers the service (automatic start, as LocalSystem), and runs probeward.exe service configure as LocalSystem before the service starts. That step:
- creates
%ProgramData%\Probeward(normallyC:\ProgramData\Probeward) and gives it an ACL with full control for SYSTEM and Administrators only, inheritance turned off; - writes
probe.confthere with the core's address; - leaves the token in the file
pairing-tokenfor the first start, unless the probe is paired already; - sets the service's recovery actions: restart after 5 s, 10 s and 60 s, the count reset after a day, and applied to non-crash failures too, which is how a self-update restarts it; and gives the service its own SID,
NT SERVICE\ProbewardProbe.
Where the pairing token goes
The token is a one-time secret valid for an hour, but it is still treated as one:
Not in the installation log.
TOKENis a hidden property, and the configure step's command line is marked to be left out of the log. Search a verbose log for the token to check.Not in the registry. Windows Installer keeps no copy of
COREorTOKEN; the core address is kept inprobe.conf.In
pairing-tokenunder the protected directory, until the probe pairs; then it is deleted.On command lines, while they run. The
msiexeccommand line, and the configure step's, can be read by other administrators of the machine while they run, and your shell may keep a history. To keep the token off every command line, leaveTOKENout and give it afterwards on standard input:batmsiexec /i probeward-probe-0.2.0-x64.msi /qn CORE=core.example.org:8443 "C:\Program Files\Probeward\probeward.exe" service configure --token -Paste the token and press Enter. Until it has one, the probe logs that it is not paired and the service manager keeps restarting it, so it pairs within a minute of getting the token.
Pairing again
A probe that was revoked, or whose identity is lost, logs that the core refused it. Issue a new token (Pair again on the Probes page), then in an elevated PowerShell:
Stop-Service ProbewardProbe
Remove-Item "$env:ProgramData\Probeward\identity.json"
& "C:\Program Files\Probeward\probeward.exe" service configure --token -
Start-Service ProbewardProbeA token given while identity.json exists is not used: running the installer again with its original command line must not throw away a working identity for a token that has been used already.
Settings
The service reads %ProgramData%\Probeward\probe.conf, one NAME=value per line, with # for comments. Only PROBEWARD_* names (and the OTEL_* names of telemetry export, which is off unless you set an endpoint) are accepted, so a typo is reported instead of ignored; the pairing token is refused there. Environment variables of the service win over the file. The settings are those of probes.md, with Windows defaults:
| Setting | Windows default |
|---|---|
PROBEWARD_PROBE_STATE_DIR | %ProgramData%\Probeward |
PROBEWARD_PROBE_LOG_DIR | %ProgramData%\Probeward\logs |
Restart the service after a change: Restart-Service ProbewardProbe.
State. The state directory holds the identity, the assignment, the clock estimate, the buffer and probe.conf. The probe checks its ACL at every start and refuses a directory that inherits permissions or grants anyone other than SYSTEM, Administrators, its own account or a service SID, the way the Linux probe refuses a directory others can read. icacls "%ProgramData%\Probeward" shows it.
Logs. The probe writes probe.log in the log directory, starts a new file at 10 MiB and keeps the five newest (probe.log.1 is the most recent old one). When the service ends in a way the service manager counts as a failure (a crash, or exit code 75 to restart into an update), the System event log has it under the source Service Control Manager, events 7024 and 7031, with the recovery action taken; ordinary starts and stops are only in probe.log. PROBEWARD_LOG sets the level as on Linux.
The service account
The service runs as LocalSystem. That is the account that can read the local WMI classes the Windows sensors use (the Security event log among them), open the state directory under its ACL, and rename its own binary for an update, without any setup. It is also more than the probe needs; the account that runs it is the one to protect.
For remote Windows devices the probe authenticates with the device's Windows credential, or, with the service account login, as its own account. As LocalSystem that is the machine account (DOMAIN\HOST$), which works in a domain if you grant the machine account the rights described in Windows over WMI.
To run it as a dedicated domain account instead, for example EXAMPLE\svc-probeward:
Give the service SID access to the state directory. It is in the process token whatever the account, so this survives a later change:
baticacls "%ProgramData%\Probeward" /grant "NT SERVICE\ProbewardProbe:(OI)(CI)M"Give the account write access to
C:\Program Files\Probewardif the probe should update itself, or setPROBEWARD_PROBE_AUTO_UPDATE=falseinprobe.confand update with the MSI.In Services, open Probeward probe, Log On, choose This account and enter it. The Services console grants it Log on as a service. Then restart the service.
A local Windows device needs no credential at all: point a device at 127.0.0.1 or the machine's own name and choose native WMI; local WMI ignores credentials and runs as the service account.
Native WMI
A device under a Windows probe can have its Windows sensors read over native WMI (COM, and DCOM for another machine) instead of WinRM. Choose it in the device form: Windows sensors connect by, Native WMI. The setting is per device and only offered under a probe that runs on Windows or has not connected yet; the API refuses it under a Linux probe (and the local probe, which is the core) with a message on windows_transport. The sensors and their results are the same; only the transport differs.
- The same machine (address
127.0.0.1or one of its own addresses): local COM, no credential, no network. - Another machine: DCOM to the device's address, never its host name, on TCP 135 and a dynamic RPC port, authenticated with NTLM and every packet encrypted (packet privacy), with the device's Windows credential (user name, password and domain) or with the service-account login. Set the target up as described in Windows over WMI.
Not yet verified for other machines. Native WMI is verified only against the probe's own machine. Against another Windows machine with a device credential it has not been verified, and the library may run the queries as the probe's service account instead of that credential. Until it is proven, prefer WinRM for remote Windows hosts; see Not yet verified for what that means and what to do.
Timeouts are real. Every batch of queries runs on its own thread, and the poll gives up at the sensor's timeout even when a DCOM call does not return. The stuck call keeps its thread until Windows gives up on it; at most 4 such calls per target and 64 in all, so a hung machine cannot take the probe's threads with it, and other devices keep being polled.
Performance counters. win_cpu reads the raw processor counters (Win32_PerfRawData_PerfOS_Processor) and computes the busy share between two polls, so the value is the average over the whole interval. The formatted classes (Win32_PerfFormattedData_*) are not used: one query returns a value over an interval WMI chooses (usually the last second, and 0 on the first query of a fresh connection), which a poll once a minute would sample instead of averaging. win_net and win_disk_io do the same with the network interface and disk classes (Win32_PerfRawData_Tcpip_NetworkInterface, Win32_PerfRawData_PerfDisk_*), using the time stamps the target puts on the counters. The other sensors read classes that are not counters.
Ping. Ping sensors on a Windows probe use Win32_PingStatus through local WMI, which needs no privilege. The round-trip time has a resolution of 1 ms.
Not available on Windows: script and Nagios plugin sensors, which are refused with "not available on a Windows probe", and probeward serve.
Updating
The core offers the file for x86_64-pc-windows-gnu from its binaries directory, as for Linux (updating). A running .exe cannot be replaced, but it can be renamed, so the probe:
- downloads the file as
probeward-update-<version>.exenext to the binary and checks its size, hash andversionoutput; - renames
probeward.exetoprobeward.exe.previousand the new file toprobeward.exe, undoing the first rename if the second fails; - stops with exit code 75; the service manager's recovery action starts the new binary. The service manager counts that exit as a failure like any other, so the delay is 5 s after the first failure of the day, 10 s after the second and 60 s from the third on; the count is reset a day after the last one.
If the new binary does not reach the core, it is started again by the recovery actions; on its fourth start without having reported to the core it renames itself to probeward.exe.failed, copies the previous binary back and stops, and the previous version starts and reports the failed update. That version is not offered again until the core has a newer one. With the delays above this takes four to five minutes, during which the probe does not poll; the core shows the probe as lost after its grace period.
Updating with the MSI works too, and is the way when self-update is off: install the newer MSI over the old one with the same command, without CORE or TOKEN. The old version is removed first (its service is stopped cleanly), and the state directory and probe.conf stay, so the probe keeps its identity and buffer. The probe's version in Apps is the MSI's; after a self-update it lags until the next MSI. Installing an older MSI over a newer one is refused.
Uninstalling
msiexec /x probeward-probe-0.2.0-x64.msi /qnor Apps, Installed apps, Probeward probe, Uninstall. The service is stopped (the buffer is flushed) and removed, and C:\Program Files\Probeward is removed with what self-update left there. The state directory %ProgramData%\Probeward is kept: it holds the probe's identity and any samples it has not delivered, and a reinstall picks them up. To remove the probe for good, revoke it on the core and delete the directory:
rmdir /s /q "%ProgramData%\Probeward"Signing
The MSI and the binary are not signed. Windows SmartScreen warns about an unsigned download and some application control policies refuse unsigned software. Check the files against SHA256SUMS from the release (Get-FileHash). To sign them in your own release process, sign probeward.exe and then the MSI with signtool sign /fd sha256 /tr <timestamp URL> /td sha256 (or osslsigncode on Linux) with a code signing certificate; sign the binary before the MSI is built, since the MSI contains it, and sign the update file in the probe binaries directory too. Self-update does not check Authenticode signatures: it trusts the hash it gets over the authenticated session, as on Linux.
Building
See Building the Windows probe: just windows-msi builds the binary and the MSI in containers on Linux.
What has been tested
On a Windows 11 x64 virtual machine, with the MSI built by just windows-msi, against a core on Linux reached through a relay:
- silent installation with
COREandTOKEN: the token is in neither the verbose log nor the registry, the state directory has the ACL above, the service has its recovery actions, and the probe pairs and reports platform Windows; - every
win_*sensor on the same machine over native WMI with the service-account login, side by side with the same sensors over WinRM, with matching results; ping, TCP port and HTTP sensors on the probe; - service stop and start from the Services console and PowerShell, with the buffer flushed on stop;
- an outage of the link to the core: the core opens one probe incident, the probe buffers, a service stop during the outage, and the replay after it, without losses or duplicates;
- an upgrade in place with a newer MSI (same identity, one entry in Apps) and a refused downgrade;
- self-update to a newer version through the service manager's restart, an update that never reaches the core and is rolled back on its fourth start, and an update file that is not a Windows program, refused before anything is renamed;
- revocation, which ends the session at once, and pairing again as described above;
- uninstallation, which removes the program directory with the files self-update left there and keeps the state directory.
Not tested: DCOM to another machine with a credential. The test machine refuses credentials on a connection to itself (0x80041064, as WMI does for any local connection) and had no second Windows machine, so only the refusal of a wrong password (0x80070005) was seen on the network path. Neither have the service-account login to another machine in a domain, a non-administrator account set up as in Windows over WMI, nor Windows Server.