Hello,
I'm gathering statistical data from a large number of VM's, clusters and hosts and have found that several entities are missing stat types for the chosen interval. I don't manage these enviroments myself but need to report on any so that they can be fixed.
I'm using the attached script which LucD kindly helped me with, I would ideally like the same script to produce a made up value like "-99999" if the stat type doesn't exist for any entity it comes across (VM's in the attached example). Alternetively could I have a completely new script that I run across the VI enviroments that just reports on entities that have missing stats.
Does anyone have any suggestions?
Get-Stat : 11/06/2012 12:59:19 Get-Stat The metric counter "cpu.ready
.summation" doesn't exist for entity "My-VM".
At C:\VirtualMachines.ps1:11 char:9
+ get-stat <<<< -entity $vms -stat $metrics -start $start -intervalmins 5 | gr
oup-object -property entityid | %{
+ CategoryInfo : ResourceUnavailable: (mem.swapoutrate.average:St
ring) [Get-Stat], VimException
+ FullyQualifiedErrorId : Client20_RuntimeDataServiceImpl_CheckUserMetrics
_MetricDoesntExist,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetViStats
Thanks
/M