Reputation: 2030
I am trying to fetch metric data of a classic VM through ARM API but i am getting error "Resource provider not found: [Microsoft.ClassicCompute]". I am sending GET request to https://management.azure.com/subscriptions/cc******-9605-4***********c0f/resourceGroups/dummy-test-vm/providers/Microsoft.ClassicCompute/virtualMachines/dummy-test-vm/providers/microsoft.insights/metrics?api-version=2016-06-01&$filter = (name.value eq 'Network Out') and aggregationType eq 'Total' and startTime eq 2017-06-18 and endTime eq 2017-07-17 and timeGrain eq duration'P10D'. I don't know where i am going wrong?
Upvotes: 0
Views: 131
Reputation: 19223
Microsoft.ClassicCompute/virtualMachines
isn't a supported resource type through metrics API. The supported types and metrics are here:Supported metrics with Azure Monitor. You could check this link, for now, classic VM is not supported.
Classic VM metrics stores in classic storage account, you could use storage API to get metrics, please refer to this question.
Upvotes: 1