Let’s start by saying that no one ever wants to get a bill that’s way higher than you anticipated, and Azure billing is no exception.
The good news is that Azure Cost Management offers several tools that users can wield to help with things like setting a budget, keeping an eye on spend—whether that’s daily, weekly, or monthly—and setting up notifications and alerts should spending start to creep over budgeted levels.
Visibility of your spend when using the cloud is of utmost importance—it’s easy to spin up infrastructure or create virtual machines but if you’re not keeping a close eye on spending, costs can spiral quickly.
Part of effective cost management is tackling the issue of users creating lots of Azure resources using other means, but let’s stay focused on Azure cost management for now.
The very best part of Azure Cost Management is that it’s completely free; there are no hidden costs at all, and by using these tools, you’ll actually save money by uncovering overspend and unnecessary expenses.
Azure Price Calculator
Let’s take a look at the Azure Price Calculator. This, as its name suggests, is a calculator for estimating the cost of Azure services—you find the service or resource you’re interested in, choose the details and settings, and the calculator will give you a breakdown costs for the service depending upon a number of factors.
The calculator allows us to get a pricing estimate for the products we want to utilize within our solution, giving us an up-front estimate of what our potential Azure package might cost before we start the project.
As a side note, if you’re currently on-premises and want to move this into Azure, take a look at Azure Migrate. Azure Migrate is a service that assesses your organization’s current workloads in on-premises datacentres. The tool provides insight into what you might need from an Azure replacement solution. First, Azure Migrate analyzes your on-premises machines to determine whether migration is feasible. Then, it recommends VM sizing in Azure to maximize performance. Finally, it creates a cost estimate for an Azure-based solution.
Azure Cost Analysis
Azure Cost Management’s Cost Analysis tool helps you break down the details of your Azure spend—with this tool you can take a more in-depth look into exactly what everything costs, and do all kinds of grouping and filtering across your resources.
This is the tool to use if you want to see what a service is currently costing you, or if you’re trying to figure out why your bill is higher than you anticipated.
Remember, visibility of your Azure spend is very important and should always be something to keep top of mind.
From Cost Analysis dashboard, you can use filters to view spend based on:
- Scope (Management Groups, Subscription or Resource Group)
- Time (filter by day, week, month, year, last quarter and many more)
- Granularity (None, Accumulated, Daily, Monthly)
- Group By (Resource Group, Resource Type, Tags and many more)
You can also choose to view Cost by Resource, which will display a graph of the most expensive resources so you can quickly see what is costing the most, or create your own custom filter to give you more control over the information you see.
Results can be exported to CSV or Excel, and you can even set up a schedule to export reports at set intervals.
I’ve personally used the Cost Analysis tool to look into customer spending and see where the bulk of their Azure expenditure is happening. Along with Azure Advisor cost recommendations (which we’ll come to later), the Cost Analysis tool can help you or your customers cut down costs within Azure.
Azure cost alerts
With Azure there are three types of cost alerts:
- Budget alerts
- Credit alerts
- Department spending quota alerts
Budget alerts
Budget alerts notify you when spending, whether based on either resource consumption or overall cost, reaches or exceeds a defined amount. You can create Azure Cost Management budgets using the Azure Portal or Azure Consumption APIs.
Budget alerts are generated automatically whenever the budget alert conditions are met. You can view all cost alerts in the Azure Portal—whenever an alert is generated, it’s shown in Cost Alerts, and an alert email is sent to specified recipients.
Credit alerts
Credit alerts notify you when your Azure credit monetary commitments are consumed. Monetary commitments are for organizations with Enterprise Agreements, and credit alerts are generated automatically when you reach 90% and 100% of your Azure credit balance.
Department spending quota alerts
Department spending quota alerts notify you when department spending reaches a fixed threshold. Spending quotas are configured in the Azure Enterprise Agreement portal, and whenever a threshold is met— for example, 50% or 75% of the quota—an email is sent out to department owners and a notification displayed in cost alerts.
Azure Budgets
Most organizations have a budget, and within Azure Cost Management you can create an Azure Budget that spans your Azure subscription(s). This allows you to set up notifications when your Azure spend hits a certain percentage of your budget.
Azure budgets allow you to stay on track, and warn you if you’re about to overspend for any given time period. This tool enables you to set your budget, oversee your spending, and check how you’re doing against your targets.
When creating a new budget within your Azure Subscription you need to give it a name, set an amount, choose a duration period (month, quarter, year, etc.), and select a start and expiration date.
The next step is to set up alerts. During this step, you can opt to create an alert when you reach a certain percentage of your budget for the duration period you chose, and input the email addresses you’d like the notifications to be sent to when the alert is triggered.
Looking for your next great Azure job?
More choice than anyone other agency. Browse our jobs and find your dream role today.
Azure Advisor Recommendations
Azure Advisor is a tool that analyzes Azure configurations and uses telemetry to provide practical, tailored recommendations on how to better optimize resources and maximize value for money.
Available to designated Azure users, it’s built right into the Azure Portal and integrated with Azure AD and role-based access control, meaning administrators have control over who can view and apply the recommendations.
Recommendations are refreshed every time you start up Azure Advisor, offering tonnes of useful advice and tips on things that may need your attention, such as:
- Availability
- Security
- Performance
- Cost
For the purpose of this article, the one we’re most interested in is cost. When we click on cost, we‘re given a list of recommendations (assuming there are any at this time) and the Azure Advisor is smart enough to suggest ways in which we can cut costs.
For example, you might receive a recommendation about Azure Virtual Machines that could look something like this:
Above, we can see that Azure Advisor has two current recommendations that could yield a potential yearly saving of €8,337, which is a fair bit of money for some. When you click on one of the rows, you’ll be shown more details about the recommendation and either action it, postpone it, or dismiss it altogether. So, just from using Azure Advisor we can see potential ways to save money when it comes to running our Azure services.
Your organization can cut costs based on your usage patterns, save money by implementing sizing suggestions, adjusting reservation purchases, or utilizing Azure Hybrid Use Benefit to maximize savings—all from using Azure Advisor recommendations.
Exports
The export tool within Azure Cost Management gives you the ability to export Azure spending reports to a storage account in a CSV format.
Using this tool, you can perform:
- Daily exports of billing-period-to-date costs
- Weekly exports of costs for the last seven days
- Custom reports like:
- Time range—week-to-date, month-to-date or billing-period-to-date
- Schedule—daily, weekly or monthly
API Reference
Azure Cost Management has several APIs available, giving you programmatic access to cost and usage data for your Azure resources. At the time of writing, the Azure Consumption APIs are available in the following languages:
- Azure Consumption Python SDK
- Azure Consumption CLI
- Azure Consumption .NET SDK
- Azure Consumption NodeJS SDK
- Azure Consumption Ruby SDK
An example of one API call would be to list the details of BillingAccountUsageDetailsList which would take the form of a GET request. Here {scope} would be in the form of, say, the Azure subscriptionID which would return JSON like:
Here, we get back details of some very useful information including usage dates (start and end) and the usage Quantity as the billableQuantity. Read more about the Azure Consumption APIs.
Azure Cost Management updates
Azure Cost Management is regularly updated; keep an eye on their Twitter account as it’s regularly updated with great articles and useful tips on getting the most out of the tool.
More Microsoft technology professionals than anyone else.
Browse pre-qualified candidates now and find the talent you need to transform your business.
Azure MVP Gregor Suttie is Head of Development Services for Sword IT in the UK, with over 20 years’ experience, largely as a developer but now in a management role.
Currently focusing on Azure and DevOps, Gregor is super keen to learn new skills and spends a lot of time keeping up to date and playing with new technology. Gregor also helps run the Glasgow Azure User Group, and organized Glasgow’s Global Azure Bootcamp in April 2019.