Is there a way we can script the average usage of ESXi hosts per week (CPU and Memory)?
I was searching this in this thread, but not seeing what exactly I wanted.
It depends on which Statistics level you have defined for the Historical intervals on your vCenter.
If that is not at level 4 for Historical interval 2 (1 week retention), you will not have the Minimum and Maximum values.
You can get the meximum and minimum of the Average values, but that will not show as much details as the actual Minimums and Maximums.
Also note that metrics are aggregated, meaning that metrics for the last week will be over 30 minute intervals.
You can read up on all this in PowerCLI & vSphere statistics – Part 1 – The basics
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
So what do you want to see?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Trying to get an excel sheet something like below for the calculation of past 7 days. Do you think it can achievable ?
As always thank you so much for helping me @LucD (Scripting GURU)
It depends on which Statistics level you have defined for the Historical intervals on your vCenter.
If that is not at level 4 for Historical interval 2 (1 week retention), you will not have the Minimum and Maximum values.
You can get the meximum and minimum of the Average values, but that will not show as much details as the actual Minimums and Maximums.
Also note that metrics are aggregated, meaning that metrics for the last week will be over 30 minute intervals.
You can read up on all this in PowerCLI & vSphere statistics – Part 1 – The basics
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thank you @LucD for notes.
In this case, Do you think, is this possible to script to generate an excel report like below and automate this on weekly basis ?
Yes, there are ample examples of such scripts available in this community.
For the scheduling, you will have to decide which scheduler you want to use.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference