VMware Cloud Community
zaferh
Contributor
Contributor
Jump to solution

Get-Stat CMDLET Error

Hello, I'm unable to get vm stat by using get-stat cmdlet. I couldnt find much information on forums and internet.

Any help would be appreciated,

Thanks in advance.

BR

PowerCLI Version:

Name                            Version     ModuleType
----                            -------     ----------
VMware.DeployAutomation         6.7.0.11233116  Script
VMware.ImageBuilder             6.7.0.11233116  Script
VMware.PowerCLI                 11.1.0.11289667   Manifest
VMware.Vim                      6.7.0.10334489  Script
VMware.VimAutomation.Cis.Core   11.0.0.10335701 Script
VMware.VimAutomation.Cloud      11.0.0.10379994 Script
VMware.VimAutomation.Common     11.0.0.10334497 Script
VMware.VimAutomation.Core       11.0.0.10336080 Script
VMware.VimAutomation.HorizonView7.6.0.10230451  Script
VMware.VimAutomation.License    10.0.0.7893904  Script
VMware.VimAutomation.Nsxt       11.0.0.10364044 Script
VMware.VimAutomation.Sdk        11.0.0.10334495 Script
VMware.VimAutomation.Security   11.0.0.10380515 Script
VMware.VimAutomation.Srm        11.1.0.11289292 Script
VMware.VimAutomation.Storage    11.1.0.11273342 Script
VMware.VimAutomation.StorageUtility 1.3.0.0         Script
VMware.VimAutomation.Vds        11.0.0.10336077 Script
VMware.VimAutomation.Vmc        11.0.0.10336076 Script
VMware.VimAutomation.vROps      10.0.0.7893921  Script
VMware.VumAutomation            6.5.1.7862888   Script

Output

get-vm <vm_name> | get-stat

get-stat : 17.01.2019 13:35:45  Get-Stat

Required property instance is missing from data object of type PerfMetricId

while parsing serialized DataObject of type vim.PerformanceManager.MetricId

at line 1, column 306

while parsing property "metricId" of static type ArrayOfPerfMetricId

while parsing serialized DataObject of type vim.PerformanceManager.QuerySpec

at line 1, column 248

while parsing call information for method QueryPerf

at line 1, column 171

while parsing SOAP body

at line 1, column 64

while parsing SOAP envelope

at line 1, column 0

while parsing HTTP request for method queryStats

on object of type vim.PerformanceManager

at line 1, column 0

At line:1 char:16

+ get-vm <vm_name> | get-stat

+                ~~~~~~~~

   + CategoryInfo          : NotSpecified: (:) [Get-Stat], InvalidRequest

   + FullyQualifiedErrorId : Client20_RuntimeDataServiceImpl_GetStats_ErrorRetreivingPerfMetrics,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetViStats

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

I was thinking in that direction as well :smileygrin:

Do you have the option, or another station, where you can set the regional settings to the default (en-US)?
PowerCLI doesn't always play well with other regional settings.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
12 Replies
LucD
Leadership
Leadership
Jump to solution

Which PowerCLI version are you using?

Get-Module -Name VMware* -ListAvailable


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
zaferh
Contributor
Contributor
Jump to solution

I'm sorry, i forgot to add

I'm using the latest version.

Name                            Version     ModuleType
----                            -------     ----------
VMware.DeployAutomation         6.7.0.11233116  Script
VMware.ImageBuilder             6.7.0.11233116  Script
VMware.PowerCLI                 11.1.0.11289667   Manifest
VMware.Vim                      6.7.0.10334489  Script
VMware.VimAutomation.Cis.Core   11.0.0.10335701 Script
VMware.VimAutomation.Cloud      11.0.0.10379994 Script
VMware.VimAutomation.Common     11.0.0.10334497 Script
VMware.VimAutomation.Core       11.0.0.10336080 Script
VMware.VimAutomation.HorizonView7.6.0.10230451  Script
VMware.VimAutomation.License    10.0.0.7893904  Script
VMware.VimAutomation.Nsxt       11.0.0.10364044 Script
VMware.VimAutomation.Sdk        11.0.0.10334495 Script
VMware.VimAutomation.Security   11.0.0.10380515 Script
VMware.VimAutomation.Srm        11.1.0.11289292 Script
VMware.VimAutomation.Storage    11.1.0.11273342 Script
VMware.VimAutomation.StorageUtility 1.3.0.0         Script
VMware.VimAutomation.Vds        11.0.0.10336077 Script
VMware.VimAutomation.Vmc        11.0.0.10336076 Script
VMware.VimAutomation.vROps      10.0.0.7893921  Script
VMware.VumAutomation            6.5.1.7862888   Script
0 Kudos
LucD
Leadership
Leadership
Jump to solution

No problem.
Do you get that same error for all VMs, VMHost...?
Or only for this specific VM?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
LucD
Leadership
Leadership
Jump to solution

And is that for 1 observation for that VM, or for all of them.
Does this return anything at all?

Get-VM <vm_name> | Get-Stat -ErrorAction SilentlyContinue


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
zaferh
Contributor
Contributor
Jump to solution

I get the same error for all VM's in  the cluster.

I obfuscated the logs.

<vm_name> represents single vmname.

Get-VM <vm_name> | Get-Stat -ErrorAction SilentlyContinue

     This doesnt return anything.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Can you check if you can get stats for ESXi nodes?

Get-VMHost <esx_name> | Get-Stat

And I assume that you can see statistical data in he Web Client under the Performance tab for that VM?
Realtime and historical?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
zaferh
Contributor
Contributor
Jump to solution

No luck, still throws same error.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Is there any data visible under the Performance tab in the Web Client?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
zaferh
Contributor
Contributor
Jump to solution

yes, there is historic and realtime data avaliable in the Web Client.

Might it be related to my regional settings?

Its Turkish atm.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

I was thinking in that direction as well :smileygrin:

Do you have the option, or another station, where you can set the regional settings to the default (en-US)?
PowerCLI doesn't always play well with other regional settings.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
zaferh
Contributor
Contributor
Jump to solution

It work on station which has got en-US regional settings.Smiley Happy

I can get the metrics,

Thank you very much for all your help.

I hope issues with regional settings will be fixed soon.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Not sure if there is full regional support in the making.
It also depends how far PowerShell itself is for that.

You could raise the issue with your TAM and/or open an idea/suggestion at the PowerCLI Ideas website.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos