Nov 03 2021
- last edited on
Apr 08 2022
Hi, Is there a plan to add CPU count to the list of VMSS metrics? It just seems natural to have CPU count alongside CPU usage. Thank you
Nov 03 2021 09:05 PM
@Hasnaa24 Currently the CPU count is shown as a property of the VMSS rather than as a metric. Where are you viewing the CPU utilization information? VMSS Overview - Monitoring tab, Metrics explorer, or in VMSS Insights? The VMSS Overview has CPU count on the Overview, and in VMSS Insights you can see the count of CPUs in a property panel. I don't know of a way to have cpu count appear in Metrics Explorer.
Nov 05 2021 06:57 AM
Thanks for your answer @ScottK206.
That's exactly it, I think CPU count should be a metric and not a mere property with no time depth. To answer your question I am viewing the CPU utilization information in Metrics explorer. And it would be useful to view CPU count along with CPU utilization in the same panel with data going back for days.
Do you know of any project to add other metrics to VMSS ? Adding CPU count would be of great help I think. Thank you
Nov 11 2021 09:14 PM
@Hasnaa24 when you are looking at the CPU utilization, are you looking at the percentage cpu value across the entire scale set or are you looking at the utilization on a single node in the scale set? For a single node, we could look at making it easier to see the vCPU count property in Metrics explorer, but if you are looking at utilization across the entire scale set where the # nodes can vary due to scaling I can see why having the count in the metrics explorer view as an actual metric would be useful. I sent a note over to one of the folks I work with on the VMSS team to give them a heads up.
If you are looking at the avg Percentage CPU across the entire VMSS then you may have a couple of ways to get close to what you are looking for. You could 'Apply Splitting' in metrics explorer by VMName to see the utilization per node, which would help address scaling but is a little tough to view when you have >10 nodes running.
Another option would be to look at making a Workbook with 2 charts on it. One plotting the Maximum value for MetricName == 'ObservedCapacity' from the AzureMetrics table for the autoscale config you have on the VMSS, and the second chart the Percentage CPU across the VMSS. Not exactly what you are looking for, but would also help you see CPU trends vs scaling activities. Ping me if you need pointers on creating the workbook and I can send an example.
Nov 15 2021 04:26 AM
@ScottK206 Thank you for reaching out to VMSS team, I can't wait to know what they think.
To answer your question, the metrics I'm looking for are on VMSS level. But the scale of nodes in the VMSS is usually beyond 50, so splitting the metric by VMName wouldn't be much of a help.
To give you some context, the question started with monitoring CPU allocation and usage to have a better understanding of our bill which has become complicated after adding reserved instances. After experimenting with Cost management API, we can view daily CPUHour consumption but it's not enough to explain costs. We'd like to have this data with more granularity (CPU count per hour or per minute) to have a better view on how much CPU we allocate and use during the day. Since CPU usage is already a metric (called Percentage CPU) on VMSS we thought it natural to have CPU count as a metric as well.