How to get alerts based on your spending in Azure
@20aman May 30, 2020Azure has very advanced Cost Management capabilities. One of these capabilities is to create alerts based on your spending. You can define budgets and if you are close to spending more than a percentage of that budget then you can get alerted via email, SMS, App push notification, or even a voice call. You can even take actions if the budget exceeds a certain percentage.
You take action if the alert is triggered by leveraging the Action Groups in Azure. You can check how to create Action Groups in this post: Creating the Action Groups for alerts in Microsoft Azure.
How to configure the Alerts
Navigate to "Cost Management + Billing" and select the "Cost Management" option.
In the Cost Management blade, select the option for "Budgets" and then click on "+ Add".
In the next screen under "Create a budget" select the appropriate values for the following:
- Budget scope
- Budget name
- Reset period - under most circumstances this should be Billing month
- Creation date
- Expiration date
- Provide an amount for the Budget
In the next screen for "Set alerts", under the Alert conditions, provide the percentage of the budget. E.g. if you provided the budget as $150 and selected the percentage of budget as 80% then the alert would be triggered at $120.
Provide the Action Group to alert via SMS or emails. You can alert via email by providing individual email ids or distribution list's id for "Alert recipients (email)" entry.
That's it! Now the alert is up and running. If you want to test the alert then update the budget and the alert percentage to close the spending and the alert should be triggered in short while.
This is a very helpful feature that lets you take the control of your spending and stay on top of the overall usage.