I'm connected to a vCenter server and this is what I see when checking the metrics I have available:
$aaa = Get-Stat -Entity SomeVM
#when running this I get an error saying metric counter 'disk.usage.average' doesn't exist
$aaa | group -property metricid
#I only see these metrics:
cpu.usage.average
cpu.usagemhz.average
mem.usage.average
net.usage.average
sys.uptime.latest
If you don't specify a Start/Finish or a IntervalMins/IntervalSecs parameter, you will be getting data from Historical Interval 4.
It could be that this VM doesn't have any data for the HI4.
You can check under the Performance tab in the Web Client or C Client.
See my PowerCLI & vSphere statistics – Part 1 – The basics post for more info on Intervals
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
When I specified an interval it is no different. I tried an interval of 30 secs but same thing. Also it seem to not be accepting interval of "past day".
I'm using powercli version 5.5 release 1 build 1295336.
Do you see data for that VM under the Performance tab ?
For which time periods ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
When I look on the vCenter server all of the metrics are set to 1.
Do you mean the Statistics Levels, or the metric values under the Performance tab ?
Did you check the Performance tab ? Are the metrics present in there ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Under Administration > vCenter Server Settings > Statistics
Every "Interval Duration" is set to 1
I just set the 5min interval to 3
How long will it take before I see the other metrics with get-stat?
The 5 minute interval is Historical Interval 1.
That data is collected from the ESXi nodes. During that collection the aggregation values ar created.
The aggregation job to Historical Interval 2 runs every 30 minutes (if you haven't changed the default).
So you should notice if the new metrics are kept after 5-10 minutes.
You can verify that via the Performance tab
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference