Microsoft Azure subscriptions are subject to a variety of quotas and limits, for example number of total CPU cores and number of VMs of a certain family.
How can I query the current quotas and actual usage, in a way that allows me to make forecasts and create alerts before I hit the quotas?
Some of this information is available in Azure Monitor, particularly Azure Resource Graph for VMs.
A query like this should work:
You can for example use it in Grafana with the Azure Monitor datasource, which can be used both for visualisations and for Grafana alerts.