Template Microsoft Hyper V - itmicus/zabbix GitHub Wiki

Template Microsoft Hyper-V

Main template for discover Hyper-V infrastructure on cluster or standalone hypervisor.

LLD

Discover Hyper-V clusters
Name: hyperv[discover, cluster]
Type: Zabbix agent (Active)
Period: 1d
Description: Discover cluster
Filter: "{#CLUSTER_FQDN}"

Host prototypes
Discover create host for cluster and set template
Hyper-V Cluster "{#CLUSTER_FQDN}"
Template: Template Microsoft Hyper-V Cluster
Возможно тут будет как обычно засада, это вирутальных хост, без zabix agenta. Эта данные надо передавать через trapper, пока надо подумать как сделать через zabbix active

Discover Hyper-V hypervisors
Name: hyperv[discover, hv]
Type: Zabbix agent (Active)
Description: Discover cluster node or standalone hypervisor
Period: 1d
Host prototypes
"{#HV _FQDN}"
Template: Template Microsoft Hyper-V Hypervisor

Discover Hyper-V VMs
Name: hyperv[discover, vm]
Type: Zabbix agent (Active)
Description: Discover VM on cluster or standalone hypervisor
Period: 1d
Host prototypes
{#VM.NAME}
Template: Template Microsoft Hyper-V Vm

Template Microsoft Hyper-V Cluster

Template for monitoring Microsoft Failover cluster with Hyper-V role.
Items: hyperv.cluster.stat.totalcores;int;Total cores
hyperv.cluster.stat.totalmemories;int;Total memory
hyperv.cluster.stat.vmusedcores;int;VM used cores
hyperv.cluster.stat.vmusedmemory;int;VM used memory
hyperv.cluster.stat.vcpuratio;int;hyperv.hv.stat.totalvcpu/hyperv.hv.stat.vmusedcores
hyperv.cluster.stat.version;text;Hyper-v version
hyperv.cluster.stat.vmcount;text;Hyper-v VM Count
hyperv.cluster.stat.vmcountok;text;HyperV VMs OK
hyperv.cluster.stat.vmcountnothealth;text;HyperV VMs Critical
hyperv.cluster.state;text;Cluster state

hyperv.cluster.csv.totalspace;[{#CLUSTER}] CSV {#NAME} total space hyperv.cluster.csv.freespace; [{#CLUSTER}] CSV {#NAME} free space (%) hyperv.cluster.csv.freespacepercent;[{#CLUSTER}] CSV {#NAME} free space (%) hyperv.cluster.csv.maintenance;[{#CLUSTER}] CSV {#NAME} maintenance mode hyperv.cluster.csv.state;[{#CLUSTER}] CSV {#NAME} state

Template Microsoft Hyper-V Hypervisor

Template for monitoring node from Microsoft Failover cluster with Hyper-V role or standalone Hyper-V.
Items:
Hyper-V Logical CPU Context Switching /sec Hyper-V Logical CPU Guest Runtime % Hyper-V Logical CPU Hypervisor Runtime % Hyper-V Logical CPU Idle Runtime % Hyper-V Logical Processors Hyper-V Root CPU Guest Runtime % Hyper-V Root CPU Hypervisor Runtime % Hyper-V Root CPU Remote Runtime % Hyper-V Root CPU Total Runtime % Hyper-V vCPU ratio Hyper-V Virtual CPU Guest Runtime % Hyper-V Virtual CPU Hypervisor Runtime % Hyper-V Virtual CPU Remote Runtime % Hyper-V Virtual CPU Total Runtime % Hyper-v Virtual Machine Manager service Hyper-V Virtual Processors Hyper-V VMs count Hyper-V VMs Physical Pages Allocated VMs Critical VMs Health Ok VMs Online VMs Physical Memory assigned Hyper-V Host statistics: VMs Physical Memory assigned Hyper-V Host statistics: VMs Physical Memory maximum Hyper-V Host statistics: VMs Physical Memory minimum VMs physical memory ratio VMs used physical memory %

Cluster hyperv.hv.node.maintenancemode; maintenance mode hyperv.hv.node.state: Node state

perf_disk for Hyper-V Hypervisor?

LLD
Name: hyperv[discover, hv.vswitch]
Type: Zabbix agent (Active)
Description: Discover virtual switch on host Period: 1d
Item prototype: wmi.get[root\cimv2,select BytesReceivedPersec from Win32_PerfFormattedData_Tcpip_NetworkInterface where Name='{#PHYSICAL_NETWORK_NAME_PERF}']; Network Interface "{#PHYSICAL_NETWORK_NAME}" Incoming Bytes/sec
wmi.get[root\cimv2,select BytesSentPersec from Win32_PerfFormattedData_Tcpip_NetworkInterface where Name='{#PHYSICAL_NETWORK_NAME_PERF}'];Network Interface "{#PHYSICAL_NETWORK_NAME}" Outbound Bytes/sec
wmi.get[root\cimv2,select BytesTotalPersec from Win32_PerfFormattedData_Tcpip_NetworkInterface where Name='{#PHYSICAL_NETWORK_NAME_PERF}'];Network Interface "{#PHYSICAL_NETWORK_NAME}" Total Bytes/sec
os.windows.active.networkinterface.utilization.percent[{#PHYSICAL_NETWORK_INTERFACEINDEX}];Network Interface "{#PHYSICAL_NETWORK_NAME}" % Utilization Calc ( (last("wmi.get[root\cimv2,select BytesTotalPersec from Win32_PerfFormattedData_Tcpip_NetworkInterface where Name='{#PHYSICAL_NETWORK_NAME_PERF}']") *8) / last("wmi.get[root\cimv2,select CurrentBandwidth from Win32_PerfFormattedData_Tcpip_NetworkInterface where Name='{#PHYSICAL_NETWORK_NAME_PERF}']"))*100)

Template Microsoft Hyper-V VMs

Template for monitoring each VM in cluster or standalone. hyperv.vm.stat.cpu; Count CPU
hyperv.vm.stat.memorymin; Physical memory minimal
hyperv.vm.stat.memorymax;Physical memory maxmimum
hyperv.vm.stat.memoryassigned;Physical memory assigned
hyperv.vm.stat.memorydemand;Physical memory demand hyperv.vm.stat.memorystatus;Physical memory status hyperv.vm.stat.IntegrationServices; Integration Services version
hyperv.vm.name; Name
hyperv.vm.description; Description
hyperv.vm.states; VM state (0 - Unknown (Default) The state of the VM could not be determined. 2 - Enabled The VM is running. 3 - Disabled The VM is turned off. 32768 - Paused The VM is paused. 32769 - Suspended The VM is in a saved state. 32770 - Starting The VM is starting. 32773 - Saving The VM is saving its state. 32774 - Stopping The VM is turning off. 32776 - Pausing The VM is pausing. 32777 - Resuming The VM is resuming from a paused state.) hyperv.vm.ReplicationState : Disabled hyperv.vm.Generation : 2 hyperv.vm.currenthost; Current HV Host
hyperv.vm.heartbeat;[{#CLUSTER}] VM {#NAME} heartbeat hyperv.vm.maintenancemode; [{#CLUSTER}] VM {#NAME} maintenance mode

State : Running IntegrationServicesState : Up to date OperationalStatus : {Ok} PrimaryOperationalStatus : Ok SecondaryOperationalStatus : StatusDescriptions : {Operating normally} PrimaryStatusDescription : Operating normally SecondaryStatusDescription : Status : Operating normally Heartbeat : OkApplicationsHealthy ReplicationState : Disabled ReplicationHealth : NotApplicable ReplicationMode : None IntegrationServicesVersion : 6.3.9600.18907 ComputerName 👍 Version : 5.0 Notes : Generation : 2 VMName: ts-kit02