Technical Tip: Fetching CPU utilization metrics from Windows Hosts in FortiSIEM by using WMI Classes
| Description | This article describes how FortiSIEM can collect CPU utilization metrics from Windows hosts without installing a Windows agent by using WMI classes and a PowerShell query.
|
| Scope | FortiSIEM. |
| Solution | The following steps outline how to configure a FortiSIEM Windows agent template to retrieve CPU statistics directly, leveraging the WMI class.
The illustration below is about pulling CPU metric directly from a Hyper-V host, but users can leverage any other WMI class depending on operational requirements, as referenced in this document: Monitoring Performance Data.
Go to Setup -> Windows Agent, select the required template, and select Edit.
Under Script -> WMI classes, select New and apply the following settings:
Get-CimInstance -Namespace "root\CIMV2" -ClassName "Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor" | Select-Object Name, PercentTotalRunTime, ContextSwitchesPersec
Select Save, then select Apply to push the template changes.
Depending on the interval specified, events are generated every 'X' minutes (min value: 15 minutes).
EVENT TYPE CONTAIN Win32_PerfFormattedData_HvStats AND reporting IP <Windows Host IP>
This confirms that the Windows host in question is sending performance metrics successfully.
Note: Depending on the WMI class being used under the template, the search query must be of the appropriate event type.
Additional notes:
|





