VMware Cloud Community
easuck
Contributor
Contributor
Jump to solution

Can't get some stat from vCenter via PowerCLI

This happened after my vCenter has restarted yesterday, before vCenter was restarted I can get all stat normally so why the metric counter doesn't exist and how to fix this?

Here's my environment and error log from PowerCLI.

My environment contains 1 vCenter(6.7.0.10000) and 1 ESXi

Get-Stat : 1/24/2019 11:36:02 AM        Get-Stat                The metric counter "mem.usage.average" doesn't exist for entity "PCMS".

At line:1 char:21

+ Get-VM -Name PCMS | Get-Stat -IntervalMins 1440

+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo          : ResourceUnavailable: (mem.usage.average:String) [Get-Stat], VimException

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

Get-Stat : 1/24/2019 11:36:02 AM        Get-Stat                The metric counter "net.usage.average" doesn't exist for entity "PCMS".

At line:1 char:21

+ Get-VM -Name PCMS | Get-Stat -IntervalMins 1440

+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo          : ResourceUnavailable: (net.usage.average:String) [Get-Stat], VimException

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

i2.JPG

Tags (2)
1 Solution

Accepted Solutions
vijayku
VMware Employee
VMware Employee
Jump to solution

can you share the output of the following to confirm the stats available for the entity.

Get-StatType -Entity (Get-VM -name PCMS) -Interval "Past Day"

also can you also confirm the current statistics settings in Administration -> vCenter Server Settings ->Statistics

View solution in original post

3 Replies
vijayku
VMware Employee
VMware Employee
Jump to solution

can you share the output of the following to confirm the stats available for the entity.

Get-StatType -Entity (Get-VM -name PCMS) -Interval "Past Day"

also can you also confirm the current statistics settings in Administration -> vCenter Server Settings ->Statistics

easuck
Contributor
Contributor
Jump to solution

Here're the output and vCenter server setting.

i3.JPGi4.JPG

0 Kudos
easuck
Contributor
Contributor
Jump to solution

After about a week, it's suddenly can get mem.usage.average.

Capture.JPG

0 Kudos