Files
cairnobs/deploy/windows/agent.example.yaml
T
jcoffey-dev 39ba6105f4
ci / check (pull_request) Successful in 5m5s
ci / postgres (pull_request) Successful in 9m50s
Windows: a Hyper-V host's VMs, like libvirt's
Each report a Windows agent asks WMI's root\virtualization\v2 for every
VM's state and health, BIOS GUID, generation, vCPUs, memory and automatic
start action: COM through x/sys/windows, no cgo, no new dependency. They're
the host's VMs on its page and in workloads, judged as libvirt's are, and an
agent inside one links to it by the BIOS GUID.

Hyper-V shows VMs only to Administrators and Hyper-V Administrators, a group
that can also change them, so the agent isn't added on its own: without it,
the host page and a warning say so and docs/windows.md says how to add it or
set hyperv: false.

Tested on Windows Server 2025 with Hyper-V nested under KVM, both ways.
2026-11-15 03:25:13 -07:00

34 lines
1.8 KiB
YAML

# obs-beacon-agent's config on Windows. Copy to C:\ProgramData\obs-beacon\agent.yaml
# after `obs-beacon-agent.exe service install`, which makes that folder and lets
# only SYSTEM, Administrators and the service's own account in.
# `obs-beacon-agent.exe join <token>` (Hosts, Add host) writes it for you instead.
server: "https://beacon.example.org:8461" # obs-beacond's agent listener (TLS)
ca_fingerprint: "sha256:<64 hex characters>" # `obs-beacond ca` on the server prints it
token_file: 'C:\ProgramData\obs-beacon\agent.token' # one line, from `obs-beacond token`; enrolls once
# state_dir: 'C:\ProgramData\obs-beacon\state' # the agent's certificate and key (default)
# host: win1 # defaults to the computer name
interval: 15s
# No helper_socket on Windows: the agent reads the host and its services
# itself, as its own service account (docs/windows.md). Everything else in
# the Linux example (watch_server, proxmox, vsphere, nutanix, pure, ...)
# works the same here, with Windows paths for its files.
# The machine's certificate stores read for the certificate inventory
# (LocalMachine\<name>), read-only: certificates only, never a key.
# Absent: My (Personal) and WebHosting. [] reads none.
# cert_stores: [My, WebHosting, "Remote Desktop"]
# The errors and criticals in the System and Application logs over the
# last day, grouped, on the host's page; a critical event in the last
# hour (an unexpected restart, a failing disk) is a warning.
# event_log: false
# A Hyper-V host's VMs, read-only through WMI. Hyper-V shows them only to
# Administrators and Hyper-V Administrators, so either add the agent's
# account (it can then also change VMs; the agent only reads):
# Add-LocalGroupMember -Group "Hyper-V Administrators" -Member "NT SERVICE\obs-beacon-agent"
# or turn it off:
# hyperv: false