Introduction
Hyper-V monitoring template. Monitors available bytes, average pressure, hyper-visor partition deposited pages, etc.
Discovery with the agent
Collector Type: Agent
Category: Application Monitors
Application Name: Microsoft Hyper-V Server Template
Pre-requisites
For Hyper-V monitors need Microsoft .NET Framework 3.5
Need Hyper-V specific WMI classes. Please follow below steps to validate the presence of classes in the target devices.
Run -> WBEMTest -> Run the below mentioned WMI Queries
If the query is not exists in WBEMTEST check it in Perfmon (Run -> Type Perfmon) in the perfmon if the object is exists we have the command to load the objects from perfmon to WBEMTEST follow the below step.
Go to this path C:\Windows\System32\wbem -> lodctr.exe /r . After doing this command the classes are loaded from perfmon to WBEMTEST forcefully.
To refresh the wbemtest after loading the classes from perfmon to WBEMTEST use this: C:\Windows\System32\wbem -> WMIADAP.EXE /r
Collected Metrics
Metric Name | Display Name | Description |
---|---|---|
Memory_AvailableBytes | SELECT AvailableBytes FROM Win32_PerfFormattedData_PerfOS_Memory | Shows the amount of physical memory, in bytes, immediately available for allocation to a process or for system use. It is equal to the sum of memory assigned to the standby (cached), free and zero page lists. |
Memory_AveragePressure | SELECT AveragePressure FROM Win32_PerfFormattedData_BalancerStats_HyperVDynamicMemoryVM | Shows the average pressure in the VM. |
Memory_HypervisorPartitionDepositedPages | SELECT DepositedPages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition where Name='_Total' | Shows the number of pages deposited into the partition. |
Memory_HypervisorPartitionValue2MGPApages | SELECT Value2MGPApages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition where Name='_Total' | Shows the number of 2M pages present in the GPA space of the partition. |
Memory_HypervisorPartitionVirtualProcessors | SELECT VirtualProcessors FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition where Name='_Total' | Shows the number of virtual processors present in the partition. |
Memory_HypervisorRootPartitionDepositedPages | SELECT DepositedPages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total' | Shows the number of pages deposited into the partition. This indicates how much memory the hypervisor is using for managing the VM. |
Memory_HypervisorRootPartitionValue2MGPApages | SELECT Value2MGPApages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total' | Shows the number of 2M pages present in the GPA space of the partition. This indicates whether a VM is using large pages, which improves overall VM performance. |
Memory_HypervisorRootPartitionVirtualProcessors | SELECT VirtualProcessors FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total' | Shows the number of virtual processors present in the partition. |
Memory_PagesPerSecond | SELECT PagesPersec FROM Win32_PerfFormattedData_PerfOS_Memory | Shows the rate at which pages are read from or written to disk to resolve hard page faults. To resolve hard page faults, the operating system must swap the contents of memory to disk, which negatively impacts performance. A high number of pages per second in correlation with low available physical memory may indicate a lack of physical memory. |
Memory_PhysicalPagesAllocated | Memory_PhysicalPagesAllocated | Shows the number of physical pages not allocated from the preferred NUMA (Non-Uniform Memory Access) node. |
LogicalProcessorPercentGuestRunTime | SELECT PercentGuestRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total' | Shows the percentage of time spent by the processor in guest code. This is the percentage of time guest code is running on an LP or for the _Total the average percentage across all LPs. |
LogicalProcessorPercentHypervisorRunTime | SELECT PercentHypervisorRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total' | Shows the percentage of time spent by the processor in hypervisor code. This is the percentage of time the Hypervisor is running on an LP or for _Total the average percentage across all LP. This is similar to % Kernel Run Time in the Processor counter set. |
LogicalProcessorPercentIdleTime | SELECT PercentIdleTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total' | This monitor returns the percentage of time spent by the processor in an idle state. This is the percentage of time the LP is waiting for work for _Total the average percentage across all LP. This is similar to % Kernel Run Time in the Processor counter set. |
LogicalProcessorPercentTotalRunTime | SELECT PercentTotalRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total' | Shows the percentage of processor time spent in guest and hypervisor code. This is used to measure the total processor utilization for hypervisor and all VMs running on the host server. |
RootVirtualProcessorPercentGuestRunTime | SELECT PercentGuestRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total' | Shows the percentage of time spent by the virtual processor in guest code. This is used to determine the processor utilization of the virtualization stack on the host server. |
RootVirtualProcessorPercentHypervisorRunTime | SELECT PercentHypervisorRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total' | Shows the percentage of time spent by the virtual processor in hypervisor code. This is used to determine the processor unitization by the hypervisor used by the host (and isn't specific to any VMs). |
RootVirtualProcessorPercentTotalRunTime | SELECT PercentTotalRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total' | Shows the percentage of time spent by the virtual processor in guest and hypervisor code. |
VirtualProcessorPercentGuestRunTime | SELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total' | Shows the percentage of time spent by the virtual processor in guest code. |
VirtualProcessorPercentHypervisorRunTime | SELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total' | Shows the percentage of time spent by the virtual processor in hypervisor code. |
VirtualProcessorPercentTotalRunTime | SELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total' | The percentage of time spent by the virtual processor in guest code. |
Hypervisor_NumberOfLogicalProcessors | select * from Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where name != '_Total' | Shows the count of logical processors. |
Hypervisor_NumberOfVirtualMachines | select * from Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition where name != '_Total' | Shows the count of virtual machines. |
Hypervisor_NumberOfVirtualProcessors | select * from Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where name != '_Total' | Shows the count of virtual processors. |
Hypervisor_TotalPages | select * from Win32_PerfFormattedData_HvStats_HyperVHypervisor | Shows the number of bootstrap and deposited pages in the hypervisor. The Hypervisor needs memory in order to keep track of Virtual Processors, Guest Virtual address to System Physical Address translation entries in the virtual TLB, and so on. The total pages keep track of the total amount of memory the Hypervisor is using for management or partitions. A page is 4 KBytes. This is not the total amount used to support a guest. Total Pages can change based on what guests VMs are running. |
VMHealthSummary | Select HealthCritical, HealthOk from Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary | This counter represents the number of virtual machines that with critical and ok health. HealthCritical:This counter represents the number of virtual machines that have critical health. If anything is critical it means some resource, (most likely a disk), has been exhausted or some other unrecoverable error has occurred. If you see “Health Critical” you should take action to figure out what has happened. HealthOK: This counter represents the number of virtual machines with health that is ok. |
CurrentDiskQueueLength | SELECT * FROM Win32_PerfFormattedData_PerfDisk_PhysicalDisk where Name!= '_Total' | Shows the number of requests outstanding on the disk at the time the performance data is collected. It also includes requests in service at the time of the collection. This is a instantaneous snapshot, not an average over the time interval. Multi-spindle disk devices can have multiple requests that are active at one time, but other concurrent requests are awaiting service. This counter might reflect a transitory high or low queue length, but if there is a sustained load on the disk drive, it is likely that this will be consistently high. Requests experience delays proportional to the length of this queue minus the number of spindles on the disks. For good performance, this difference should average less than two. |
Network_Interface_OffloadedConnections | Select * from Win32_PerfFormattedData_Tcpip_NetworkInterface | Shows the number of TCP connections (over both IPv4 and IPv6) that are currently handled by the TCP chimney offload capable network adapter. |
Memory_HypervisorPartitionVirtualProcessors | SELECT VirtualProcessors FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorPartition where Name='_Total' | Shows the number of virtual processors present in the partition. |
Memory_HypervisorRootPartitionVirtualProcessors | SELECT VirtualProcessors FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total' | Shows the number of virtual processors present in the partition. |
LogicalProcessorPercentTotalRunTime | SELECT PercentTotalRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total' | Shows the percentage of processor time spent in guest and hypervisor code. This is used to measure the total processor utilization for hypervisor and all VMs running on the host server. |
LogicalProcessorPercentGuestRunTime | SELECT PercentGuestRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total' | Shows the percentage of time spent by the processor in guest code. This is the percentage of time guest code is running on an LP or for the _Total the average percentage across all LPs. |
LogicalProcessorPercentHypervisorRunTime | SELECT PercentHypervisorRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total' | Shows the percentage of time spent by the processor in hypervisor code. This is the percentage of time the Hypervisor is running on an LP or for _Total the average percentage across all LP. This is similar to % Kernel Run Time in the Processor counter set. |
RootVirtualProcessorPercentTotalRunTime | SELECT PercentTotalRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total' | Shows the percentage of time spent by the virtual processor in guest and hypervisor code. |
VirtualProcessorPercentGuestRunTime | SELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total' | Shows the percentage of time spent by the virtual processor in guest code. |
RootVirtualProcessorPercentGuestRunTime | SELECT PercentGuestRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total' | Shows the percentage of time spent by the virtual processor in guest code. This is used to determine the processor utilization of the virtualization stack on the host server. |
VirtualProcessorPercentHypervisorRunTime | SELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total' | Shows the percentage of time spent by the virtual processor in hypervisor code. |
RootVirtualProcessorPercentHypervisorRunTime | SELECT PercentHypervisorRunTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootVirtualProcessor where Name='_Total' | Shows the percentage of time spent by the virtual processor in hypervisor code. This is used to determine the processor unitization by the hypervisor used by the host (and isn't specific to any VMs). |
Storage_DiskBytesPersec | SELECT * FROM Win32_PerfFormattedData_PerfDisk_PhysicalDisk where Name!= '_Total' | Shows the rate bytes are transferred to or from the disk during write or read operations. |
Storage_DiskTransfersPersec | SELECT * FROM Win32_PerfFormattedData_PerfDisk_PhysicalDisk where Name!= '_Total' | Shows the rate of read and write operations on the disk. |
Storage_VirtualStorageDeviceReadBytesPerSec | SELECT ReadBytesPersec FROM Win32_PerfFormattedData_StorageStats_HyperVVirtualStorageDevice | Shows the total number of bytes that have been read per second on this virtual device. |
Storage_VirtualStorageDeviceWriteBytesPerSec | SELECT WriteBytesPersec FROM Win32_PerfFormattedData_StorageStats_HyperVVirtualStorageDevice | Shows the total number of bytes that have been written per second on this virtual device. |
Storage_ErrorCount | SELECT ErrorCount FROM Win32_PerfFormattedData_StorageStats_HyperVVirtualStorageDevice SELECT ErrorCount From Win32_PerfFormattedData_Counters_HyperVVirtualStorageDevice | Shows the total number of errors that have occured on this virtual device. |
Storage_FlushCount | SELECT FlushCount FROM Win32_PerfFormattedData_StorageStats_HyperVVirtualStorageDevice | Shows the total number of flush operations that have occured on this virtual device. |
Network_VirtualNetworkAdapterBytesPerSec | Select BytesPersec from Win32_PerfFormattedData_NvspNicStats_HyperVVirtualNetworkAdapter | Shows the total number of bytes per second traversing the virtual switch. |
Network_VirtualSwitchBytesPerSec | Select BytesPersec from Win32_PerfFormattedData_NvspSwitchStats_HyperVVirtualSwitch | Shows the total number of bytes that have traversed the network adapter. |
Memory_HypervisorRootPartitionValue2MGPApages | SELECT Value2MGPApages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total' | Shows the number of 2M pages present in the GPA space of the partition. This indicates whether a VM is using large pages, which improves overall VM performance. |
Memory_PhysicalPagesAllocated | SELECT PhysicalPagesAllocated FROM Win32_PerfFormattedData_VidPerfProvider_HyperVVMVidPartition where Name='_Total' | shows the number of guest pages and Virtual Infrastructure Driver (VID) pages needed to manage the VM. |
Memory_HypervisorRootPartitionDepositedPages | SELECT DepositedPages FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorRootPartition where Name='_Total' | Shows the number of pages deposited into the partition. This indicates how much memory the hypervisor is using for managing the VM. |
Memory_PagesPerSecond | SELECT PagesPersec FROM Win32_PerfFormattedData_PerfOS_Memory | Shows the rate at which pages are read from or written to disk to resolve hard page faults. To resolve hard page faults, the operating system must swap the contents of memory to disk, which negatively impacts performance. A high number of pages per second in correlation with low available physical memory may indicate a lack of physical memory. |
VirtualProcessorPercentTotalRunTime | SELECT * FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorVirtualProcessor where Name='_Total' | The percentage of time spent by the virtual processor in guest code. |
VMHealthSummary | Select HealthCritical, HealthOk from Win32_PerfFormattedData_VmmsVirtualMachineStats_HyperVVirtualMachineHealthSummary | This counter represents the number of virtual machines that with critical and ok health. HealthCritical:This counter represents the number of virtual machines that have critical health. If anything is critical it means some resource, (most likely a disk), has been exhausted or some other unrecoverable error has occurred. If you see “Health Critical” you should take action to figure out what has happened. HealthOK: This counter represents the number of virtual machines with health that is ok. |
LogicalProcessorPercentIdleTime | SELECT PercentIdleTime FROM Win32_PerfFormattedData_HvStats_HyperVHypervisorLogicalProcessor where Name='_Total' | This monitor returns the percentage of time spent by the processor in an idle state. This is the percentage of time the LP is waiting for work for _Total the average percentage across all LP. This is similar to % Kernel Run Time in the Processor counter set. |