Book Image

Learn Azure Administration

By : Kamil Mrzygłód
Book Image

Learn Azure Administration

By: Kamil Mrzygłód

Overview of this book

Microsoft Azure is one of the upcoming cloud platforms that provide cost-effective solutions and services to help businesses overcome complex infrastructure-related challenges. This book will help you scale your cloud administration skills with Microsoft Azure. Learn Azure Administration starts with an introduction to the management of Azure subscriptions, and then takes you through Azure resource management. Next, you'll configure and manage virtual networks and find out how to integrate them with a set of Azure services. You'll then handle the identity and security for users with the help of Azure Active Directory, and manage access from a single place using policies and defined roles. As you advance, you'll get to grips with receipts to manage a virtual machine. The next set of chapters will teach you how to solve advanced problems such as DDoS protection, load balancing, and networking for containers. You'll also learn how to set up file servers, along with managing and storing backups. Later, you'll review monitoring solutions and backup plans for a host of services. The last set of chapters will help you to integrate different services with Azure Event Grid, Azure Automation, and Azure Logic Apps, and teach you how to manage Azure DevOps. By the end of this Azure book, you'll be proficient enough to easily administer your Azure-based cloud environment.
Table of Contents (15 chapters)
1
Section 1: Understanding the Basics
5
Section 2: Identity and Access Management
9
Section 3: Advanced Topics

Cost monitoring and analysis

If you are an Azure administrator, you are probably responsible for monitoring and managing the cost of all services hosted in the cloud. There are many factors related to this particular case—the types of used resources, the scale of your projects, or different discounts that you may apply, depending on the contract you have with Microsoft. Azure offers different options to make your life easier—starting from easy-to-read dashboards to cost alerts, which help you to monitor the current usage. In this section, you will learn how to use those tools and understand their outcome.

Before you really get started with hosted services, you can estimate the cost of the architecture using the following calculators:

  • Pricing calculator: An Azure cost calculator, which can be found at https://azure.microsoft.com/en-us/pricing/calculator/, it is a tool that you can use to estimate how much each Azure service will cost. Of course, these calculations are only estimates as it is really hard to plan everything upfront. Nonetheless, treat it as the first step in planning funds for your architecture.
  • Total Cost of Ownership (TCO) calculator: This is another Azure calculator, which is available at https://azure.microsoft.com/en-us/pricing/tco/calculator/. Using the cloud is not only about using cloud services, but also about changing the responsibilities and moving expenses from one place to another. This calculator helps you to understand the total cost of your architecture including managing server infrastructure, updates, licenses, and many more. 

The preceding tools are great to understand the expected cost of the whole cloud architecture that we are about to manage. However, they require that you know how each service is configured and what features will be enabled. Doing this upfront may be tricky, so they are not always an ideal solution for managing the cost. This is why we will have to take a look at the real usage and calculated cost to be able to control it.

To work with cost analysis, you will need a working Azure subscription. The important thing here is also correct permission assigned to your account—you have to be able to read subscription cost data (by being, for example, the owner of a subscription).

Cost management is enabled by default on all subscriptionsall you need here is to access the correct section in the Azure portal:

  1. To access the cost management option, search for it in the search field at the top of the portal:
Figure 1.31 - Searching for the Cost Management blade

From this point, you can access different blades such as Cost analysis, Budgets, and CloudynWhen you enter the subscription screen, you should be able to see a screen similar to mine:

Figure 1.32 - Current cost charts

Let's focus quickly on the information displayed here. We have two categories, which inform us about the current cost of the subscription:

  • Cost by resource: This chart displays the total cost of the subscription divided by the resources. As you can see, in my case, almost 90% of the cost is generated by a resource named kamzcosmos (which is probably an Azure Cosmos DB instance).
  • Spending rate and forecast: This is an interesting chart that gives you an insight into the forecast of your spending. It also allows you to see how dynamically the cost changes.
The Spending rate and forecast chart may look a little bit different depending on the type of your subscription. In the preceding example, I presented a subscription that has a fixed limit of 130 EUR allowed for each month. When using, for example, a PAYG subscription, starting credit will not be displayed.

When you go to the Cost Management, you will see a new blade where multiple features are available:

Figure 1.33 - The Cost analysis blade

The available options will be briefly described in the following.