The course is part of these learning paths
Azure Advisor Cost Recommendations
Monitoring Cost Consumption
Cost Management Report
This course looks into how to capture log data and metrics from Azure services and feed this information into different locations for processing. We take a look at diagnostic logging which can help to troubleshoot services and create queries and alerts based on that data. We also look into Azure Adviser, cost consumption reporting and how we can baseline resources. This aims to be an introduction to these advanced areas of Azure services.
- Understand how to use and configure diagnostic logging for Azure services
- Gain an understanding of Azure Monitor and how to create and manage alerts
- Review cost consumption reporting and how to create scheduled reports
- Investigate different methods for baselining resources
- People who want to become Azure cloud architects
- People preparing for Microsoft’s AZ-100 or AZ-300 exam
- General knowledge of Azure services
For more MS Azure-related training content, visit our dedicated MS Azure Training Library.
For this next example, let's use a WordPress website running as a past service to create an alert looking for page 404 http responses, and send ourselves an email. So, first thing you wanna do is go to the monitor in Azure and select Alerts. So again, this is a central place to record all the alerts. We can see here we've got a total of alert rules 14, and each are enabled. You'll also notice here that there is different severities, so when you create your alert, you can choose your severity. So this sort of helps collect all your infrastructure into a single place, and give yourself an idea of what's critical, and what's not. So, we're gonna create a new rule, and here's the conditions we mentioned earlier, sort of an alert condition, which is a target and criteria. There's the alert action, so define the rules, severity, and then defining the action group. So, the first thing we do is select a target, and select App Services, and we can see Azurefieldnotes. So if we select that, done. We can now see what's our target, and we wanna add the criteria. So what we do notice hear, is there are 168 different signals we can alert on.
So as we said, there are some metrics, these sort of come from the platform itself, and there is also activity logs, within the activity logs there a different categories. So here's Administrative, Security, Recommendations, and Policy. In our case, we wanna alert on http 404. When I select the metric signal, we get a sample graph of data collected over the last 6 hours. We also see in this case, there happens to be multiple instances, because the app services planned, there are three instances that run this website. So we wanna select all of them, and what this allows us to see is a sum of the time of each of these. So before, when we had the aggregation, we can see that there is a total of 40 as we were on alert.
So we wanna ignore these bumps, and just alert when we have this kinda spike. So, we'll make it 50. We're not gonna select a specific instance, and we're just gonna say when greater than total aggregation of 50, and select Done. So, now we're gonna put in an alert name for our rule, so Page404 Greater than 50. and we'll call it severity 3. Enable the rule upon creation, and now we need to create an action group. So we're gonna do a new action group, we're gonna call this WebAlerts, Short name, WebAlerts, and we need to choose a resource group to put this in, so we have a default resource group here set up. And if we choose email, we're gonna send an email to Matt. And select OK, and OK. So we need we to wait for that action group to create it, in this case, that's added that for us. If we already had an action group we wanted to use, we could say Select action group, and see our existing action groups we've already created. In this case, we're using a new one, and click Create rule. As we wait for that rule to be created, we should get an email that tells us we've been added to the action monitor group. So this allows us to know that we've received the email, and that alert set up. And if we go back to Manage alerts, we can see our page created a 404 response here, Target Resource, Target Resource Type, and the Signal. So in this case, that's our alert. If we look in here, we can go and modify the conditions if we need to. There we can see the bar before it's gonna get triggered, and that's creating an alert.
About the Author
Matthew Quickenden is a motivated Infrastructure Consultant with over 20 years of industry experience supporting Microsoft systems and other Microsoft products and solutions. He works as a technical delivery lead managing resources, understanding and translating customer requirements and expectations into architecture, and building technical solutions. In recent years, Matthew has been focused on helping businesses consume and utilize cloud technologies with a focus on leveraging automation to rapidly deploy and manage cloud resources at scale.