From aeb9adc649c901ac3c07cdc179357e40782ae7e6 Mon Sep 17 00:00:00 2001 From: Kevin Janssen Date: Tue, 17 Nov 2026 21:41:07 +0100 Subject: [PATCH] Report the Windows processor model in passive inventory --- crates/agent-windows/src/inventory.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/agent-windows/src/inventory.rs b/crates/agent-windows/src/inventory.rs index b766f1f..6787916 100644 --- a/crates/agent-windows/src/inventory.rs +++ b/crates/agent-windows/src/inventory.rs @@ -79,8 +79,17 @@ fn hardware() -> Result { && memory.dwMemoryLoad <= 100, "NATIVE_HARDWARE_QUERY" ); + let cpu_model = open( + HKEY_LOCAL_MACHINE, + r"HARDWARE\DESCRIPTION\System\CentralProcessor\0", + KEY_WOW64_64KEY, + ) + .ok() + .and_then(|key| text(key.0, "ProcessorNameString").ok().flatten()) + .map(|name| name.trim().to_owned()) + .filter(|name| !name.is_empty()); Ok( - json!({"logical_processors_visible":system.dwNumberOfProcessors, + json!({"cpu_model":cpu_model, "logical_processors_visible":system.dwNumberOfProcessors, "memory_total_bytes":memory.ullTotalPhys,"memory_available_bytes":memory.ullAvailPhys, "memory_load_percent":memory.dwMemoryLoad}), ) @@ -188,7 +197,7 @@ pub fn observations() -> Vec { [ ( "windows.hardware", - "windows.win32:GetNativeSystemInfo+GlobalMemoryStatusEx", + "windows.win32:GetNativeSystemInfo+GlobalMemoryStatusEx;registry:CentralProcessor", hardware as Provider, ), (