Hi All
I am trying to gather VM level disk statistics with PowerCLI 5.0.1 but am getting the error message "The metric counter "disk.usage.average" doesn't exist for entity". I am able to see the CPU, MEM, NET and SYS stats but not the disk. I am running $vm |get-stat to receive the error as any script calling this area fails. I am able to view the disk stats in vcenter on the vm's and stat level is set to 3.
Any ideas?
Thought I would also add it is NFS datastores and vsphere 5.0.
Any ideas on this one?
Get-Stat : 03/12/2012 09:32:17 Get-Stat The metric counter "disk.usag
e.average" doesn't exist for entity "xxx".
At line:1 char:9
+ Get-Stat <<<< -Entity xxx
+ CategoryInfo : ResourceUnavailable: (disk.usage.average:String)
[Get-Stat], VimException
+ FullyQualifiedErrorId : Client20_RuntimeDataServiceImpl_CheckUserMetrics
_MetricDoesntExist,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetViStats
That is the result of just a plain get-stat -entity xxx
What type of entity are you using ? VM, VMHost, datastore ... ?
Did you first do a Get-StatType to check if that metric is available for that entity and for that interval ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks for the reply! It is based on a vm level. My understanding is it is supposed to be one of the main counters:
cpu.usagemhz.average
cpu.usage.average
mem.usage.average
sys.uptime.latest
disk.usage.average
net.usage.average
But when i do the get-stat on a VM (any VM) I get that error. My stats level is at 3 for day and week and 2 for month. I thought the disk.usage.average was enabled on all VM's by default? If not is there a way to enable it?
You are correct, but could this be for a VM that was powered off, or removed ?
Do you get the error for all VMs or only some ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'm afraid it is the same error for all vm's that i have tryed. We have multiple datacenters and sites and it is the same for each. always just that one counter that errors while i get results for the others.
Sorry, to confirm, the vm's are turned on and functioning as well.
Are you still using PowerCLI 5.0.1 ? Or did you upgrade to PowerCLI 5.1 ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference