Chapter 14 Azure Subscription Management

This Chapter covers following Topic Lessons

  • Azure Subscription
  • Subscription Usage & Quota
  • Cost Management
  • Cost Analysis
  • Monitor Azure Spend and Create Billing Alarms using Budgets
  • Identify unused or underutilized Resources and Optimize Azure Cost
  • Implementing IT Governance using Azure Policy

This Chapter covers following Lab Exercises

  • Exploring Subscription Dashboard
  • Checking Subscription Usage & Quota
  • Accessing Cost Management Dashboard
  • Cost Analysis Dashboard
  • Create Budgets with Billing Notification alarms
  • Advisor Recommendations
  • Applying Azure Policy at Subscription Level
  • Test the Allowed Virtual Machine SKU Policy

Chapter Topology

In this chapter we will explore Azure Subscription Dashboard and Cost Management + Billing Dashboard. We will monitor Azure spend through options like Cost Analysis and Budget feature. We will configure Azure policy at subscription level.

Azure Subscription

Management of Subscription happens through subscription dashboard

Exercise126: Exploring Subscription Dashboard

  1. In Azure Portal Click Cost Management + Billing in left pane> Cost Management + Billing Dashboard opens>Click Subscriptions in left pane.

    Screenshot_563
  2. In right pane click your subscription>Subscription Dashboard opens.

    Screenshot_564

    Note : Readers are advised to go through all options in Subscription dashboard and Cost Management + Billing Dashboard.

Subscription Usage & Quota

Each subscription has quota cap for resources. Resource usage is tracked per subscription. If you reach a quota cap, you can request an increase.

Usage +Quota tab in left pane will show you the usage as well as the quota associated with that resource.

Exercise 127: Checking Subscription Usage & Quota

In Subscription Dashboard Click Usage + quotas in left pane>In right pane you can see Usage + quotas for various resources> Select Microsoft.Compute from Dropdown box in Provider option.

Figure below shows usage and quota for Microsoft Compute only. You have the option to select other resources also. Readers are advised to click the drop down boxes and check other options available.

Screenshot_565

Cost Management

Using Cost Management you can visualize and monitor cloud costs and trends, improve organizational accountability and optimize cloud efficiency.

Cost Management provides following to analyze and optimize cloud costs:

Cost Analysis
Alerts
Budgets
Advisor Recommendation

Exercise 128: Accessing Cost Management Dashboard

  1. In Azure Portal Click Cost Management + Billing in left pane> Cost Management + Billing Dashboard opens>Click Cost Management in left pane> Cost Management Dashboard opens.

    Screenshot_566

    Note: Cloudyn option is being gradually replaced by Azure Cost Management. New Cloudyn registrations are limited to Microsoft CSP partner administrators

Cost Analysis

Cost Analysis helps understand where costs originated within the organization. You can view monthly, Quarterly or Custom dates cost in Cost Analysis. You can view Total cost in subscription or Cost by resource type or Resource Group or custom cost using tags.

Exercise in Resource group Chapter 15 will show how to create Cost Analysis using Tags.

Exercise 129: Cost Analysis Dashboard

  1. In Azure Portal Click Cost Management + Billing in left pane > Cost Management + Billing Pane opens> Click Cost Management in left pane> Cost Management Dashboard opens>Click Cost Analysis in left pane> Cost Analysis dashboard opens. The right pane shows the total cost incurred during the billing period (April) as well as cost by resources in graphical format.

    Screenshot_567

    You can change dates as Last Month, this month, last Quarter, last year or custom dates from dropdown box which currently shows April 2019 in above figure.

  2. Cost Analysis by individual Resource : You can also see individual cost of each Resource by clicking Cost by resource in right pane in previous figure

    Screenshot_568
  3. You can further filter to see Cost by Particular resource type, Resource Group, Location or Tags. In Filter Items Box type Virtual Machine and you can see cost of all Virtual Machines created in the subscription.

    Screenshot_569

Monitor Azure Spend and Create Billing Alarms using Budgets

Budgets feature in Cost Management helps you proactively monitor Cloud cost spending over time. You can use budgets to compare and track spending as you analyze costs.

When the budget thresholds are exceeded, notifications Billing alarms are triggered. Budget feature dosen’t affects consumption and none of the resources are stopped.

You can create monthly, quarterly or Yearly Budgets.

Exercise 130: Create Budgets with Billing Notification alarms

In this exercise we will create Monthly, Quarterly and Yearly Budget. If Cloud spending reaches 80% of the Budget a Billing alert email will be send.

  1. Monthly Budget: In Cost Management Dashboard click Budgets in left pane> Click + Add in right pane> Create Budget blade opens> Enter a name> Enter Budget amount. I entered Rupees 800.> Select Billing Month from Resets dropdown box> Set Billing alert condition in terms of percentage (80%) of Budget. This will trigger an email notification alerts if the percentage threshold is reached> Add an alert email (not Shown)> click create.

    Screenshot_570
  2. Figure below shows monthly budget. It shows current Monthly Cloud spend is Rupee 975.62 against a budget of Rupees 800.

    Screenshot_571
  3. Similarly create Quarterly and Yearly Budget with amount 2500 and 10000 respectively. In my case currency was in Indian Rupees. Set Billing alert condition in terms of percentage (80%) of Budget.

  4. In Budget pane you can see the current spending against the Budget. It shows current Monthly Cloud spend is Rupees 975.62 against a budget of Rupees 800. Monthly spend has exceeded the Budget. Whereas Quarterly and Yearly Budget are within budget and also have not crossed the Billing Alert threshold of 80%

    Screenshot_572

Identify unused or underutilized Resources and Optimize Azure Cost

Azure Advisor Recommendations identifies idle and underutilized resources. It then gives recommendations to optimize the Azure Cost Spend.

Example: Optimizing Azure Cost Spend on Virtual Machines

Azure Advisor monitors your virtual machine usage for 14 days and then identifies underutilized virtual machines. Virtual Machines whose CPU utilization is five percent or less and network usage is seven MB or less for four or more days are considered low-utilization virtual machines. The 5% or less CPU utilization setting is the default, but you can adjust the settings.

It will then give you recommendations to change the size of the Virtual Machine to save on Potential Cost or shutdown underutilized virtual machines to save cost.

Exercise 131: Advisor Recommendations

  1. Go to Cost Management Dashboard> Click Advisor recommendations in left pane. Advisor is giving recommendation on Deleting IP Address which is not associated with any VM. This IP Address was created in Chapter 1. It is also giving Potential Yearly savings.

    Screenshot_573

    Note 1: If you access Advisor through Cost Management pane then you only get recommendation related to Cost only. Otherwise Advisor gives recommendation in 4 areas: Cost, High availability, Security and Performance.

    Note 2: Advisor will be discussed in detail in Chapter 17.

    Note 3: My Subscription did not have any cost recommendation for Virtual Machines. In next step I will use screen shot from Azure Docs.

  2. In the following example, the option chosen resizes current size to a DS13_V2. The recommendation saves $551.30/month or $6,615.60/year. This below screen shot is taken from Azure Docs.

    Screenshot_574

Implementing IT Governance using Azure Policy

Azure Policy helps in implementing IT Governance in an organisation. IT Governance ensures that your organization is able to achieve its goals through an effective and efficient use of IT. IT Governance involves planning and initiative at strategic level to prevent IT issues from derailing IT projects.

Azure Policy is a managed service in Azure that is used to assign and manage policies. These policies enforce rules so that resources stay compliant with your corporate standards and service level agreements.

Azure Policy Example

You have assigned a policy to allow only a DSv2 SKU size of virtual machines in your environment. Once this policy has been implemented it will only allow DSv2 Size Virtual Machines to be created in your environment. Secondly any non DSv2 Virtual Machine which was their before this Policy was assigned will be marked as non-compliant. Azure Policy runs evaluations of your resources and scans for those not compliant with the policies you have created.

Policy Assignment Scope

Azure Policy can be applied at Subscription, Resource Group or at Management Group level. Policy assignments are inherited by all child resources. However, you can exclude a subscope from the policy assignment.

Built in Policies

There are Hundred built in Policies. Some of the built in policies include:

Allowed Storage Account SKUs: This policy definition has a set of conditions/rules that determine if a storage account that is being deployed is within a set of SKU sizes. Its effect is to deny all storage accounts that do not adhere to the set of defined SKU sizes.

Allowed Resource Type: This policy definition has a set of conditions/rules to specify the resource types that your organization can deploy. Its effect is to deny all resources that are not part of this defined list.

Allowed Locations: This policy enables you to restrict the locations that your organization can specify when deploying resources. Its effect is used to enforce your geo-compliance requirements.

Allowed Virtual Machine SKUs: This policy enables you to specify a set of virtual machine SKUs that your organization can deploy.

Apply tag and its default value: Applies a required tag and its default value if it's not specified by the deploy request.

Not allowed resource types: Prevents a list of resource types from being deployed.

Exercise 132: Applying Azure Policy at Subscription Level

  1. Go to Subscription Dashboard>Click Policies in left pane>Policies Blade open>Click Compliance in left pane.

    Screenshot_575
  2. Click Assign Policy>Assign Policy Blade opens as shown below.

    Screenshot_576
  3. Under Policy Defination click ellipsis (…) Box>Available Defination Blade opens>Scroll down and select Allowed Virtual Machine SKU s.

    Screenshot_577
  4. Select Allowed Virtual Machine SKU>Click Select> A drop down Box is created in Azure Policy Blade to select the required SKU> Here I selected Standard_D1 SKU>Click Assign in Bottom of the pane (Not shown).

    Screenshot_578

    Note : An Assignment name is automatically generated. You can change it.

  5. Policies dashboard shows the Policy created. It takes 15-20 minutes for Policy to take effect. You need to refresh it continuously.

    It shows 1 Resource as non-compliant.

    Screenshot_579
  6. Click the Policy in the right pane to get the detail of Non-Compliant Resource. wvmportal VM is non-compliant. wvmportal is DS1 size SKU whereas our policy allows Standard D1 type VM.

    Screenshot_580

Exercise 133: Test the Allowed Virtual Machine SKU Policy

In this Exercise we will try to create A Series Virtual Machine and see whether system allows or not. Our Policy created in previous exercise at Subscription level allows Standard_D1 Machines only.

  1. Click Create a Resource>Compute>Windows Server 2019 Datacenter >Create VM dashboard opens>Select Resource Group RGCloud>enter a name>In size click change size and Select VM size as A1 and enter username and password and click Review + Create> Validation fails and click on it to get the reason> Resource was disallowed by policy and Policy name was Allowed Virtual Machine SKUs. This Policy only allowed Standard_D1 Machines only.

    Screenshot_581
UP

LIMITED OFFER: GET 30% Discount

This is ONE TIME OFFER

ExamSnap Discount Offer
Enter Your Email Address to Receive Your 30% Discount Code

A confirmation link will be sent to this email address to verify your login. *We value your privacy. We will not rent or sell your email address.

Download Free Demo of VCE Exam Simulator

Experience Avanset VCE Exam Simulator for yourself.

Simply submit your e-mail address below to get started with our interactive software demo of your free trial.

Free Demo Limits: In the demo version you will be able to access only first 5 questions from exam.