We have an Azure App Service Plan running a Web Job, I can see the CPU percentage used in the Azure portal when I look at the Service Plan, and I want to get this information from the REST API. I can get the information, however I don't know what I'm doing wrong as the information I get doesn't match up with what the portal shows.
Here's the URL I'm getting:
https://management.azure.com/subscriptions/{MySubscriptionId}/resourceGroups/My-Resouce-Group/providers/Microsoft.Web/serverFarms/My-App-Service-Plan/providers/microsoft.insights/metrics?$filter=name.value%20eq%20'CpuPercentage'%20and%20(aggregationType%20eq%20'None'%20or%20aggregationType%20eq%20'Average'%20or%20aggregationType%20eq%20'Minimum'%20or%20aggregationType%20eq%20'Maximum'%20or%20aggregationType%20eq%20'Total'%20or%20aggregationType%20eq%20'Count')%20and%20startTime%20eq%202017-10-03T08:55:00Z%20and%20endTime%20eq%202017-10-03T09:00:00Z&api-version=2016-09-01
At 8:55 the portal shows just under 20% CPU usage, however what I get back from the REST API at this time is this:
"total":1.0,"count":1.0,"average":1.0,"minimum":1.0,"maximum":1.0
What do I need to do to get the data that is shown in the portal?