The Four Pillars of Azure Billing Administration
access_timeMarch 1, 2019
perm_identity
Posted by David Okeyode
folder_open
Architecture, Implementation

Introduction/Overview
- The goal of billing in general is to have cost clarity and to understand your spending. So that you’re not being over charged and you don’t understand where the costs are coming from…Basically, to fulfill the following:
- Cost planning
- Cost visibility
- Cost monitoring
- Cost optimization
Cost Issues In Azure
- Many old habits/behaviors will create new problems for you in the cloud
- A lot of cost issues in the cloud is not about the technology or pricing but about behavior.. what are they deploying, how are they cleaning up?
- Examples
- 32TB of unused storage for not-cleaned up for years
- Empty P11 databases provisioned for a deployment in 2 weeks
- App teams (developers, infrastructure, devops) are making decisions everyday that affects COST.. and in many cases without the need for authorization..
- People that were not used to judging business outcomes are now tasked with doing exactly that
- Developers are measured by performance and reliability.. so they will overprovision the VM but the smallest VM will give he best business outcome
- On-premises, it’s not easy to do this.. if you have the virtual host, you already made the investment
- Examples
- The first step is to use the available tools to PLAN your costs
- The next step is getting VISIBILITY (accurate, up-to-date visibility)
- The next step is ACCOUNTABILITY
- Then OPTIMIZATION (which includes continuous monitoring)
Azure Cost Management + Billing
- Planning
- Visibility
- Accountability
- Optimization
Planning
Here are some of the tools available to us in Azure to help with our planning:
- Azure Pricing Calculator
- Understand how pricing works for the services that you will be using
- https://azure.microsoft.com/en-gb/pricing/calculator/
- Azure Pricing Details (Scroll down to select services)
- Total Cost of Ownership (TCO) calculator
Visibility/Analysis
- Azure Portal → All Services → Cost Management + Billing → Invoices
- We can view older invoices
- We can “Opt-In” to invoice emails and add recipients
- Download usage report, Tags in billing reports
- Azure Portal → All Services → Cost Management + Billing → Subscriptions → Manage
- OR
- Azure account center (https://account.azure.com/Subscriptions) → Click on subscription → Overview
- Azure account center (https://account.azure.com/Subscriptions) → Click on subscription → Billing history –> Download Usage: version 2 – preview –> There is a tags column
- Azure Portal → All Services → Cost Management + Billing → Subscriptions → Manage
- Configure proactive alerts
- Azure account center (https://account.azure.com/Subscriptions) → Click on subscription → Preview features → “try it now” → accept → Go back to “subscriptions” → Click on “Alerts preview” → Add alert
- If “Billing Total” is nearing £100
- Azure account center (https://account.azure.com/Subscriptions) → Click on subscription → Preview features → “try it now” → accept → Go back to “subscriptions” → Click on “Alerts preview” → Add alert
- After getting some VISIBILITY, we may want to dig deeper to do some ANALYSIS of what is behind our spending or billing
- To see if there’s a particular resource that’s behind a spike in cost
- Azure Portal → All Services → Cost Management + Billing → Cost Management
- We can see these three aspects here:
- Cost Analysis (Visibility)
- Create Budget (Accountability)
- Azure Advisor (Optimization)
- We can see these three aspects here:
- Azure Portal → All Services → Cost Management + Billing → Cost Management → Cost Analysis
- OR Azure Portal → Subscriptions → Select Subscription → Cost Analysis
- We can “scope” by subscription or management group
- We can “group by” location, resource group name, resource type, service name
- This will give us context into what resource type or resource group is behind our spending in the charts (by color codes)
- We can click on “Cost by resource” at the top to see which resources are behind our spending
- But be careful with your analysis as sometimes, it’s not the big costs but the multiple little costs
- We can filter based on many factors like Tags, Resource Group Name, e.t.c. to gain an even more specific context
- OR Azure Portal → Subscriptions → Select Subscription → Cost Analysis
- View external service spend
- Azure Portal → Subscriptions → Select Subscription → External Services
- External services are published by third party software vendors in the Azure marketplace. For example, Sophos is an external services that you can purchase in Azure, but is not published by Microsoft.
- You can see external services that you’re incurring cost on
- Azure Portal → Subscriptions → Select Subscription → External Services
- Monitoring
- View billing history and invoice
- Azure Portal → Cost Management + Billing
- Overview → Recent Billing History
- Azure cost over the past several months
- Can spot anomalies
- Invoices → Select subscription
- Get a copy of invoice at the end of every month
- Download PDF
- Overview → Recent Billing History
- Azure Portal → Cost Management + Billing
- View billing history and invoice
Accountability
Here are some fundamental principles for cost accountability in Azure:
- Use TAGs
- To add context for cost analysis
- Tags should be enforced by configuration policies
- Finance codes E.g. CostCenter tag
- Application context AppService tag
- Deployment context E.g. Environment tag
- Who is accountable E.g. BusinessOwner tag
- Apply cost related policies
- Sample cost related policies (not all policies are security and compliance related)
- Apply tags
- Not allowed resource types
- Allowed resource types
- Allowed storage account SKUs
- Allowed virtual machine SKUs
- Allowed locations
- Azure Portal → All Services → Azure Policies
- Budgets (for monitoring and notifications)
- For notifying teams if they are approaching or over their budgets
- See budgets in relation to your cost
- Azure Portal → All Services → Cost Management + Billing → Cost Management → Budgets → Add
- OR Azure Portal → Subscriptions → Select Subscription → Budgets → Add
- Use RBAC
- RBAC roles
- Cost Management Reader
- Cost Management Contributor (create budgets)
- We can use roles to give the IT Manager the permissions to set budgets or even the finance team but they cannot do anything else
- Azure Portal →Azure AD → New User
- Name: financeuser
- User name: financeuser@yourdomain.com
- Directory role: user
- Azure Portal → Subscriptions → Select Subscription → Access Control (IAM) → Add → Role Assignment → Cost Management Contributor → financeuser → Save
- Azure Portal → Login as “financeuser”
- If you go under “Subscriptions”, you can set BUDGETs
- You can specify alert percentage and add alert recipient (not action group)
Optimize
- A workload can run fine in three different VM sizes. Which one will the developer choose?
- Developers have historically been measured by performance and reliability; so they will over-provision the VM but the smallest VM will give the best business outcome
- People that were not used to judging business outcomes are now tasked with doing exactly that

- Now the main question is this:
- How do we ensure that the right stakeholders know when there are opportunities to optimize cost?
- AZURE ADVISOR
- How do we ensure that the right stakeholders know when there are opportunities to optimize cost?
- Azure Advisor
- Integrated directly into “Azure Cost Management”
- Your personal Azure consultant
- Cost
- Performance
- Security
- High Availability
- Cost recommendations
- https://docs.microsoft.com/en-us/azure/advisor/advisor-cost-recommendations
- Right sizing (based on usage)
- Idle instances
- Unprovisioned ExpressRoute circuits
- Idle virtual network gateways
- Azure reservation recommendations
- Advisor will review your virtual machine usage over the last 30 days and determine if you could save money by purchasing an Azure reservation.
- Advisor analyzes the usage patterns of your virtual machines for 14 days, and uses rules to identify low usage virtual machines. You can customize these rules to better match your business needs.
- Default is an average of less than 5% CPU but we can edit this
- Purchasing recommendations
- Reserved instances
- With Azure reservations, you can pre-purchase the base costs for your virtual machines. Discounts will automatically apply to new or existing VMs that have the same size and region as your reservations
- Can save up to 72% if you have consistent usage over a 3 years period
- Only available to EA, CSP and PAYG subscriptions
- Has flexibility – Can be used across the same family and region
- Not just about VMs. Also PaaS services like Azure SQL Database, Cosmos DB
- Considerations
- You need to determine the right size for your workload before buying
- Reservations aren’t available for purchase in Germany or China regions
- You cannot buy reservations beyond your subscription quota limit
- A reservation that is scoped to a single subscription must have vCPU quota available in the subscription for the new RI. For example, if the target subscription has a quota limit of 10 vCPUs for D-Series, then you can’t buy a reservation for 11 Standard_D1 instances. The quota check for reservations includes the VMs already deployed in the subscription.
- https://docs.microsoft.com/en-us/azure/virtual-machines/windows/prepay-reserved-vm-instances
- Azure Portal → All Services → Reservations
- Reserved instances
-
- Azure Hybrid Benefit
- Enables us to bring our on-prem license for use on Windows Servers and SQL servers on Azure VMs and save 85%
- Can get up to 93% savings with Hybrid benefit for both Windows and SQL and adding reserved instances for 3 years
- Azure Portal → VM → Select VM → Configuration → Azure Hybrid Benefit
- Azure Hybrid Benefit
REFERENCES
- Cost Optimization (Ignite 2018)
- Azure Reserved Instances
- Azure Hybrid Benefit
- Azure Cost Management
- Azure Advisor
- Azure Updates
SHARE THIS:
Leave a Reply