---
title: "How to monitor Microsoft Hyper-V"
description: "Monitoring Microsoft Hyper-V requires installing the latest op5 NSClient++ and configuring firewall settings for ICMP ping or version checks. The process includes monitoring OS metrics, essential Hyper-V services, and specific performance counters for disk, memory, network, and virtual machine health."
url: "https://docs.itrsgroup.com/docs/faq/op5/360020055834-op5-monitor-how-to-monitor-microsoft-hyper-v/index.html"
---
This article describes how to monitor Microsoft Hyper-V.

## Prerequisites

For this how-to to work you need the latest op5 NSClient++ installed on your Hyper-V server.

## Firewall settings

First off, we need to change the firewall settings to allow ICMP ping.

Open cmd (Command Prompt) on the Windows server and execute:

```
netsh advfirewall firewall add rule name="ICMPv4 Inbound" dir=in action=allow enable=yes profile=any localip=any remoteip=any protocol=icmpv4:8,any interfacetype=any edge=yes
```

Another way is to do the host-check with check\_nt\_clientversion instead, which fetches the version of NSClient++ instead of checking ICMP Ping.

## Standard check

First of all, we need to monitor the OS as usual:

- Disk Usage
- CPU
- Memory (see below)
- Swap

## Services

The following Windows services need to be monitored. Note that all services may not be used depending on the functions that you are using in your Hyper-V environment.

- Hyper-V Image Management Service (vhdsvc)
- Hyper-V Virtual Machine Management (vmms)
- Hyper-V Networking Management Service (nvspwmi)

## Performance Counters

These performance counters will give a good monitoring of your hypervisor. To monitor guest CPU and memory usage and such, install the agent on the virtual machine and monitor it as any other server.

### check\_vm\_health

**command**: check\_nrpe\_win\_counter

Arguments: \\Hyper-V Virtual Machine Health Summary()\\Health Critical!!MaxCrit=1

Comment: Check how many virtual machines that is in critical state. My recommendation is to skip the warning threshold and just use the critical (Therefore the double exclamation marks in the argument).

### check\_perf\_avg\_disk\_read

command: check\_nrpe\_win\_counter

**Arguments**: \\LogicalDisk(C:)\\Avg. Disk sec/Read!MaxWarn=15!MaxCrit=25

**Comment**: System disk + disks with guest needs to be monitored.

- 1ms to 15ms = Healthy
- 15ms to 25ms = Warning or Monitor
- 26ms or greater = Critical, performance will be adversely affected

### check\_perf\_avg\_disk\_write

**command:** check\_nrpe\_win\_counter

**Arguments**: \\LogicalDisk(C:)\\Avg. Disk sec/Write!MaxWar=15!MaxCrit=25

**Comment**: System disk + disks with guest needs to be monitored, the example is for C:, copy the check and replace C: with the guest disk.

- 1ms to 15ms = Healthy
- 15ms to 25ms = Warning or Monitor
- 26ms or greater = Critical, performance will be adversely affected

### check\_perf\_nic\_queue

**command**: check\_nrpe\_win\_counter

**Arguments**: \\Network Interface(Broadcom BCM5709C NetXtreme II GigE [NDIS VBD Client] \_50)\\Output Queue Length!MaxWarn=1!MaxCrit=3

**Comment**: The instance name (in this example "Broadcom BCM5709C NetXtreme II GigE [NDIS VBD Client] \_50) needs to be changed to the network interface instance name of your server, check performance counters for the correct name. This checks the output queue on the NIC.

### check\_perf\_memory\_pages\_per\_sec

**Command**: check\_nrpe\_win\_counter

**Arguments**: \\Memory\\Pages/sec!MaxWarn=500!MaxCrit=1000

**Comment:**

- Less than 500 = Healthy
- 500 ? 1000 = Monitor or Caution
- Greater than 1000 = Critical, performance will be adversely affected

### check\_nrpe\_win\_memory\_physical

**Command**: $USER1$/check\_nrpe -H $HOSTADDRESS$  -c CheckMem -a ShowAll=long type=physical $ARG1$

**Arguments**: MaxWarn=50% MaxCrit=75%

**Comment:** This check command is not in the default setup and has to be created. The check returns the amount of available physical memory in percentage.

- 50% of free memory available or more = Healthy
- 25% of free memory available = Monitor
- 10% of free memory available = Warning
- Less than 5% of free memory available = Critical, performance will be adversely affected

### check\_perf\_hyperv\_hypervisor\_runtime

**Command**: check\_nrpe\_win\_counter

**Arguments**: \\Hyper-V Hypervisor Logical Processor(\_Total)\\% Total Run Time!MaxWarn=60!MaxCrit=90

![OP5 Monitor - How to monitor Microsoft Hyper-V](https://docscdn.itrsgroup.com/faq/images/op5/360020055834-688555-Screen-Shot-2014-08-25-at-14.55.59.png)


