Hello,
I'm developing a monitorapp in C# with the web services SDK.
I'm able to get a list of all the performance counters with the PerformanceManager.
ObjectContent[] oCont = getPropertyContent("PerformanceManager", "perfCounter", _serviceContent.perfManager);
I'm asking this directly to an ESX 4.
The answer i get back contains all the available counters but there's no division between Host and Virtual Machine -counters.
For example cpu.utilization is only available for the host and not for a virtual machine.
Is it possible to somehow know what counters are vm-specific?
I'm able to get the managed object references for the vms if that's any help..
Thanks in advance!
Glenn
Hi Glenn,
The "perfCounter" property of PerformanceManager will fetch all the counters that are available in the host or vCenter. It does not provide any mechanism to filter the counters. In order to get available counters specific to a managed entity (Host, VM, etc. ) you need to use QueryAvailablePerfMetric method. Invoking this method against virtual machine's MOR, you will get all the applicable counter IDs for this VM.
Hope this helps!
Neha
Hi Glenn,
The "perfCounter" property of PerformanceManager will fetch all the counters that are available in the host or vCenter. It does not provide any mechanism to filter the counters. In order to get available counters specific to a managed entity (Host, VM, etc. ) you need to use QueryAvailablePerfMetric method. Invoking this method against virtual machine's MOR, you will get all the applicable counter IDs for this VM.
Hope this helps!
Neha
Worked like a charm!
Thank you!
Glenn