Count of Windows VMs and Non-Windows VMs which are Powered ON
****Works Only from vRealize Operations 8.1 ***
This super metric was created for addressing a use case of counting the number of Microsoft Windows based VMs and Non-Windows based VMs which are powered ON in a cluster.
The super metric uses the enhanced capabilities with “where” condition and operators available in vRealize operations 8.1 . Here I combined two conditions with where clause - Operating system name as provided by vCenter contains ( or does not contain) “Windows” and the VM is Powered ON & Connected. This super metric may be applied to any parent object of Virtual Machine object.
Please use the attached file to get the 2 supermetrics or use the super metric formula below:
Count of Windows 2012 VMs which are powered ON
count(${adaptertype=VMWARE, objecttype=VirtualMachine, metric=config|guestFullName, depth=8, where=($value contains 'Microsoft Windows Server 2012' && ${metric=sys|poweredOn} == 1)})
NOTE : The metric used to identify operating system in the above is "metric=config|guestFullName" which is the operating system as provided by vCenter assigned while creating the VM.
If the operating system needs to be correctly identified as from within Guest Operating system , you may use " metric=summary|guest|fullName" which is the Guest OS as reported by VM Tools . For the correct calculation of this count , it is required to have VM Tools installed and running on all the VMs since this metric will not be collected in VMs without VM Tools installed.