Demystifying The Azure Bill Part 1: Getting the Data
This article first appeared on my LinkedIn Page 01/14/19
Organizations with a footprint within in Microsoft’s Azure platform can all relate that one of the biggest frustrations within the platform is transparency on how companies are being billed. Any organization that is invested in their cloud platform craves to know the total cost of hosting a specific solution within their environment. Unfortunately Microsoft’s billing statements doesn’t offer an application or solution based reporting. Instead all of these services are billed at an overall service level.
If we have four consumption based Logic Apps it is unreasonable to assume that we can just divide the total cost by four. For those that are unaware consumption based logic apps are charged for each time they are triggered, thus the term consumption based. In the end one Logic App may run every hour, another once a day, another once a month, and another not at all. So how can we determine the cost of a specific instance of a service?
Fortunately for us Microsoft does provide some relief in the terms of exposing this data in a prepared Power BI app, Microsoft Azure Consumption Insights. After playing around with these reports one might find them a little clunky and hard to gain impactful insights from. Perhaps this is one of my favorite, least insightful, spread of information:
Looking first glance it is hard to tell what “Meter Sub-Category” relates to. Granted, this report is meant to be filtered by service; however, any report that is meant to be immediately filtered could potentially be improved upon. Once one starts diving into some of this data other disparities appear, such as how location is defined. After looking at the data some resources deployed in central us can be labeled as ‘uscentral’, ‘centralus’, and even ‘Iowa’. We all know Azure is an extremely large product with an endless supply of teams dedicated to supporting and creating new products and sometimes they don’t align across all teams on certain standards. Luckily Microsoft has exposed the raw API data for Consumption Insights.
Low and behold, armed with your Azure Enrollment Number and API Key, you can connect Power BI to access all the raw data that is being leveraged to build these reports. UsageDetails can be a great starting point as this table will have the majority of the usage metric data.
Full disclosure that at the time of this writing the Consumption Insights Connector is still in the beta phase. However; now the raw data is at your fingertips and with it the ability to apply Power BI transformations and bring in additional data to create powerful and insightful reporting for your organization.
Remember that favorite least insightful chart? Well with this data it can be reformatted to something like:
The design is still not pretty and can be improved upon; however, this shows how an organization can take their data and present it in a more usable format. The Cost by Meter Sub Category has been updated to only show only the top 10 and the Meter Sub Category switched for Meter Category as the values in Sub Category may not be as intuitive. The graphic showing cost by region has been removed since the data is inconsistent and perhaps more harmful that beneficial. In it’s place is a simple table of our data. The usage tiles have been reformatted to help increase readability. Finally the Cost by Product was redone as a treemap to promote clicking interactions with our data.
This is just an introduction into how an organization can access their Microsoft Azure usage data in order to better understand how they are being billed. The next post in this series Demystifying the Azure Bill Part 2: Deciphering the Data to Gain Insights goes over how to relate your various services into a single reporting entity. i.e. The complete infrastructure cost of an application broken down by each service.