Setting up alerts in Monitor
1. Setting up alerts in Monitor
We’ve seen that Azure Monitor is the main monitoring platform in Azure. In this video, we’ll create an alert that will trigger if the memory usage for our virtual machine goes over a specific threshold. As usual, Azure Portal is our starting point. You can find Monitor in the sidebar. If you don't see it, you can also search for it in the search bar. After clicking Monitor, you’ll see the overview screen with the different monitoring services. Here, we can find ‘Alerts’. Click on ‘View’ to go to the alerts screen. At the top, we can click ‘Create’. You’ll now see a dropdown list with the following options: alert rule, action group, and alert processing rule. The first option is to create the alert itself. The second allows us to determine actions that need to be taken, like sending an email notification. And the final option is to manage and process multiple alerts automatically, for example if we need to suppress notifications during maintenance. We first need to create the alert itself, so we click on ‘Alert Rule’. We are now in the ‘Create an alert rule’ screen. You’ll see that on the right, an additional screen has been opened automatically, ‘Select a resource’. This is a drop-down that allows you to select the scope of the rule, in other words, the resource or groups of resources the rule should apply to. We want the rule to apply only to the VM, so we drop down until we get to ‘vm01’, check the box, and then click ‘Apply’. The scope of the rule is now set to the VM. Next, we need to select the condition, which configures when the alert triggers. When you click on the ‘select a signal’ box, you’ll get a drop-down list with recommended conditions. There are, however, many more conditions you can see by clicking on the ‘see all the signals’ text below. We’ll use the ‘Available Memory’ condition. This was also one of the suggested conditions. Click on ‘Apply’, and ‘Alert Logic’ appears. This will set the specific threshold for the alert to trigger. Note that Azure has already filled in some settings by default. We can mouse over the different settings to see a description. The most important setting here is the threshold value and its unit. If available memory falls below this threshold, the alert will trigger. For this case, we’ll set the threshold to 2 gigabytes. On the right you can see a preview graph, with the current available memory, and the threshold we set. It is possible to set additional conditions if needed. In the other tabs, we can set actions that need to be taken if the alert triggers. We can either create an action group here or assign one that is already available. These can help us set up email notifications for example. But we don’t have to do this now, we can also do this later. As with resources, we can also assign tags to the alert. There is only one thing we still need to do: give the alert a proper name. After that is done, we can click ‘Review + create’. As usual, Azure will do some validation checks. After that, the alert is ready. Now it’s up to you to create an alert!2. Let's practice!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.