If your Cloud spend is different than what you were expecting it to be, you’ll want to do some detective work to isolate the reasons why. While your Azure invoice will detail your consumption of Microsoft’s Azure services, it won’t give you the context of your virtual resource configurations. It’s kind of like asking the electricity company to identify which home appliance used the most power, when you don’t have any smart home metering.
Azure Cost Management’s Cost Analysis tool can help you break down the details. The trick is to change the granularity, grouping and filtering options inside the tool.
Prerequisites: You'll need at least read access to your Azure account and Enterprise Agreement customers will need read access to one or more of the following scopes: Billing account, Department, Enrollment account, Management group, Subscription, Resource Group. Learn more about assigning access to Cost Management data.
1. Inside the Azure Portal, select Cost Management + Billing.
2. Under Cost Management, select Cost analysis.
3. I’ve set the Scope to show all the costs for one particular subscription. The scope options you can choose from will depend on what kind of Microsoft agreement (subscription type) you have. Set Granularity to Monthly and Group by Resource type, to see which kinds of resources are contributing the most to your monthly cost.
You can hover over the colored bars to bring up a list of the associated costs per resource type, at a glance.
5. Lets check out the Storage Accounts. Change Group by to Resource and add a filter for Resource Type, selecting microsoft/storage.storage accounts.
Now we can see the “dbstorageu35mmfje6jiw2” resource has contributed the most cost during the month of April 2019.
6. Then, set the Group by to Meter, and add a filter for the Resource named dbstorageu35mmfje6jiw2. This will show us what activity in that storage account contributed the most to the cost.
In this case, it was the “hot grs write operations”.
7. If you want to check how this compares to previous periods, you can change the date selector in this view.
Looking at the last six months shows there was a significant increase in April. Now we are armed with some more information to start a conversation with the resource owners, and discuss if this cost increase was expected and if it will affect cost budgets in the future.
8. That custom view can now be shared (via a URL link), exported to CSV or Excel, or pinned to your Azure dashboard (which will update as new cost management information becomes available).
Other Cost Analysis options:
As well as the in-built Cost Analysis tool (which now also supports AWS data), there are a few other options for analysing your Cloud consumption and costs: