webdevops / azure-resourcemanager-exporter

Prometheus exporter for Azure ResourceManager informations (infos, quotas, limits, usages, public IPs, portscanner)
MIT License
32 stars 17 forks source link

azurerm_quota_limit and azurerm_quota_current return wrong results with scope="machinelearningservices" and quota=~"standard.*|Standard.*" #83

Open fiferrando opened 8 months ago

fiferrando commented 8 months ago

Hi,

The metric azurerm_quota_limit returns strange results, -1, with the parameters specified in the title. These limits are obviously different on Azure (0 or positives). The permission of the service principal used by the exporter is Reader on Azure management group containing all the subscriptions. An image with example comparison follows:

image

Thank you in advance for all the help, Best regards.

Filippo Ferrando

fiferrando commented 8 months ago

Hi,

I have un update: azure_quota_current metric is also giving wrong results. Two files are attached to this comment:

The examples shown only regards quotas which name starts with standard or Standard.

I'm going to edit the title of the issue accordingly.

fiferrando commented 7 months ago

Hi,

May you please give me an update on this problem?

Thank you in advance for all the help, Best regards.

Filippo Ferrando

mblaschke commented 4 days ago

check the Azure REST API response via powershell, eg:

Invoke-AzRestMethod -Method GET -Uri https://management.azure.com/subscriptions/{SUBSCRIPTIONID}/providers/Microsoft.MachineLearningServices/locations/{LOCATION}/usages?api-version=2022-10-01

the Azure REST api shows following values for me in my personal subscription:

 {
   "unit": "Count",
   "currentValue": 0,
   "limit": -1,
   "name": {
     "value": "standardMSv2Family",
     "localizedValue": "Standard MSv2 Family Cluster LowPriority vCPUs"
   },
   "type": "Microsoft.MachineLearningServices/vmFamily/lowPriorityCores/usages",
   "id": "/subscriptions/xxxxxxxxx/usages/standardMSv2Family"
 }

the exporter just shows the value from the API.