Microsoft Azure has tons of useful services like IoT Hub (great for managing LOTS of IoT devices), Cognitive Services (user-friendly, state-of-the-art machine learning and AI tools), and Azure Active Directory (securely manages digital identities). When you purchase a service on Azure, you are only charged for what you use. This is both helpful, because it can save you money, and scary, because you don't know what you're spending each month.
Enter: Azure budgets!! This tutorial will show you how to set up e-mail alerts when you get close to or above your budget.
Pre-requisites: This tutorial assumes you have an Azure subscription and one or more Azure resource groups. If you're new to Azure, you can sign up for free here.
EstimatedTime: 5 - 10 minutes
EstimatedCost: $0!
Let's get started!
1. Navigate to the resource group where you want to set a budget alert. In the left-hand menu, scroll down until you see the 'Cost Management' section. Click the 'Budgets' menu option.
Note: If you do not see the 'Cost Management' section, click 'Overview' at the very top of the left-hand menu. In the newwindow, atthe top under 'Essentials' click the name of the resource group beside the 'Resource Group' label.
2. The 'Budgets' menu option opens a new window on the right where you can create new or edit existing budgets. To create a new budget, click 'Add' at the top of the window to create a new budget.
3. Create your new budget! Give your budget a meaningful name, like 'BudgetMax' or 'BudgetAlert'.
If you are adding a budget to a new resource group, the window will be empty (no data to display).
If you are adding a budget to an existing resource group, you will see historical and forecasted cost data like in the above photo. Use this data to determine an ideal budget on your own or use Azure's recommended dollar amount (under 'Budget Amount').
4. Determine how you want costs to accumulate: monthly, quarterly, or annually. I prefer monthly because that's how I budget in general. Choose what works for you and/or your business.
You can also adjust the start date of your budget trigger as well as the expiration date for when you want the notifications to stop.
5. Input your total budget amount, then click 'Next' at the bottom of the window.
I'd recommend setting the budget amount to be the maximum you are willing to spend per budget cycle (e.g. per month in my example). We will set different types of alerts on the next page.
6. This is my favorite part! We can choose different alerts for our budget based on actual and/or forecasted costs.
- A first alert to let me know when Azure predicts that I'll hit 50% of my total budget - I typically don't take action here, but it means I'm aware and paying attention to my spending on Azure.
- A second alert tells me when I've actually reached 50% of my total budget - this is when I'll log into Azure and check that things are working as expected. If there's a service costing more than usual, I'll go look at that service and see why. It might be a sensor malfunction, increased site traffic, or another person using your resource group. Identifying abnormal behaviors early on helps you resolve any issues, informs you that you might spend more than usual this budget cycle (plus an estimate of how much), and gives you time to notify anyone else who needs to know about a potential spending increase.
- A final alert to let me know when I've reached my entire budget - this is where I may take drastic action like shutting off the service or turning off the IoT device(s). Note that kind of action is only recommended for non-essential services like a home weather monitoring system or exploratory projects.
7. Add in an e-mail address for one or more people who will receive *all* of the budget alerts.
8. Final step!! Change the default alert e-mail language if you prefer, otherwise click "Create" at the bottom!
The budget will take a few hours to deploy. You can edit your budget by going back to the 'Cost Management' --> 'Budgets' menu.
Please leave a comment if you have any questions. Happy cost tracking!
Comments
Please log in or sign up to comment.