You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the most common monitoring requirements for a virtual machine is to create an alert if it stops running. The best method for this is to create a metric alert rule in Azure Monitor using the VM availability metric which is currently in public preview.
12
+
One of the most common monitoring requirements for a virtual machine is to create an alert if it stops running. The best method for this is to create a metric alert rule in Azure Monitor using the **VM availability** metric which is currently in public preview.
13
13
14
14
In this article, you learn how to:
15
15
16
16
> [!div class="checklist"]
17
-
> * View the VM availability metric that shows when a VM is running.
17
+
> * View the VM availability metric that indicates whether a VM is running.
18
18
> * Create an alert rule using the VM availability metric to notify you if the virtual machine is unavailable.
19
19
> * Create an action group to be proactively notified when an alert is created.
20
20
@@ -35,9 +35,7 @@ There are multiple methods to create an alert rule in Azure Monitor. In this tut
35
35
> [!TIP]
36
36
> You can create an alert rule for a group of VMs in the same region by changing the scope of the alert rule to a subscription or resource group.
37
37
38
-
Click on the **VM availability** chart to open the metric in [metrics explorer](../essentials/metrics-getting-started.md). This is a tool in Azure Monitor that allows you to interactively analyze metrics collected from your Azure resources.
39
-
40
-
Click **New alert rule**. This starts the creation of a new alert rule using the VM availability metric and the current VM.
38
+
Click on the **VM availability** chart to open the metric in [metrics explorer](../essentials/metrics-getting-started.md). This is a tool in Azure Monitor that allows you to interactively analyze metrics collected from your Azure resources. Click **New alert rule**. This starts the creation of a new alert rule using the VM availability metric and the current VM.
41
39
42
40
:::image type="content" source="media/tutorial-monitor-vm/vm-availability-metric-explorer.png" alt-text="Screenshot of VM Availability metric in metrics explorer." lightbox="media/tutorial-monitor-vm/vm-availability-metric-explorer.png":::
43
41
@@ -84,7 +82,7 @@ Select **Notifications** and add one or more methods to notify appropriate peopl
84
82
## Configure details
85
83
The **Details** page allows you to configure different settings for the alert rule.
86
84
87
-
| Setting } Description |
85
+
| Setting | Description |
88
86
|:---|:---|
89
87
| Subscription | Subscription where the alert rule will be stored. |
90
88
| Resource group | Resource group where the alert rule will be stored. This doesn't need to be in the same resource group as the resource that you're monitoring. |
@@ -98,13 +96,10 @@ The **Details** page allows you to configure different settings for the alert ru
98
96
Click **Review + create** to create the alert rule.
99
97
100
98
## View the alert
101
-
To test the alert rule, stop the virtual machine. If you configured a notification in your action group, then you should receive that notification within a few minutes. You'll also see an alert indicated in the summary shown in the **Alerts** page for the virtual machine.
To test the alert rule, stop the virtual machine. If you configured a notification in your action group, then you should receive that notification within a few seconds. You'll also see an alert indicated in the summary shown in the **Alerts** page for the virtual machine.
104
100
105
-
Click on the **Severity** to see the list of those alerts. Click on the alert itself to view its details.
Now that you know how to create an alert from log data, collect additional logs and performance data from the virtual machine with a data collection rule.
When you create a new Azure virtual machine, you can quickly enable a set of recommended alert rules that will provide you with initial monitoring for a common set of performance counters.
11
+
# Tutorial: Enable recommended alert rules for Azure virtual machine
12
+
[Alerts in Azure Monitor](../alerts/alerts-overview.md) identify when a resource isn't healthy. When you create a new Azure virtual machine, you can quickly enable a set of recommended alert rules that will provide you with initial monitoring for a common set of metrics including CPU percentage and available memory.
13
+
14
+
> [!NOTE]
15
+
> If you selected the **Enable recommended alert rules** option when you created your virtual machine, then the recommended alert rules described in this tutorial will already exist.
13
16
14
17
In this article, you learn how to:
15
18
16
19
> [!div class="checklist"]
17
-
> *View the VM availability metric that shows when a VM is running.
18
-
> *Create an alert rule using the VM availability metric to notify you if the virtual machine is unavailable.
19
-
> *Create an action group to be proactively notified when an alert is created.
20
+
> *Enable recommended alerts for a new Azure virtual machine.
21
+
> *Specify an email address to be notified when an alert files.
22
+
> *View the resulting alert rules.
20
23
21
24
## Prerequisites
22
25
To complete the steps in this article you need the following:
23
26
24
27
- An Azure virtual machine to monitor.
25
28
26
29
> [!IMPORTANT]
27
-
> If the VM has any other alert rules associate with it, then recommended alerts will not be available.
30
+
> If the VM has any other alert rules associate with it, then recommended alerts will not be available. You can access recommended alerts by removing any alert rules targeted to the VM.
28
31
29
32
30
-
## Create alert rules
31
-
From the menu for the VM, select **Alerts**. You'll se a brief description of recommended alerts and the option to enable them. Click **Enable recommended alert rules**.
33
+
## Create recommended alert rules
34
+
From the menu for the VM, select **Alerts**. You'll see a brief description of recommended alerts and the option to enable them. Click **Enable recommended alert rules**.
32
35
33
36
:::image type="content" source="media/tutorial-monitor-vm/recommended-alerts-enable.png" alt-text="Screenshot of option to enable recommended alerts for a virtual machine." lightbox="media/tutorial-monitor-vm/recommended-alerts-enable.png":::
34
37
35
38
36
-
A list of recommended alert rules is displayed. You can select which ones to create and change their recommended threshold if you want. Ensure that **Email** is enabled and provide an email address to be notified when any of the alert rules fires. An [action group](../alerts/action-groups.md) will be created with this address. If you already have an action group that you want to use, you can specify it instead.
39
+
A list of recommended alert rules is displayed. You can select which ones to create and change their recommended threshold if you want. Ensure that **Email** is enabled and provide an email address to be notified when any of the alerts fire. An [action group](../alerts/action-groups.md) will be created with this address. If you already have an action group that you want to use, you can specify it instead.
37
40
38
41
39
42
:::image type="content" source="media/tutorial-monitor-vm/recommended-alerts-configure.png" alt-text="Screenshot of recommended alert rule configuration." lightbox="media/tutorial-monitor-vm/recommended-alerts-configure.png":::
@@ -44,19 +47,11 @@ When the alert rule creation is complete, you'll see the alerts screen for the V
44
47
45
48
:::image type="content" source="media/tutorial-monitor-vm/recommended-alerts-complete.png" alt-text="Screenshot of alert screen for a VM." lightbox="media/tutorial-monitor-vm/recommended-alerts-complete.png":::
46
49
47
-
Click **Alert rules** to view the alert rules that you just created. You can see that a rule has been created for each that you selected. If the threshold is exceeded for any of these rules, an Azure Monitor alert will be created, and an email will be sent to the address that you specified.
50
+
Click **Alert rules** to view the rules you just created. You can click on any of the rules to view their details and to modify their threshold if you want.
48
51
49
52
:::image type="content" source="media/tutorial-monitor-vm/recommended-alerts-rules.png" alt-text="Screenshot of list of created alert rules." lightbox="media/tutorial-monitor-vm/recommended-alerts-rules.png":::
50
53
51
54
52
-
## View the alert
53
-
To test the alert rule, stop the virtual machine. If you configured a notification in your action group, then you should receive that notification within a few minutes. You'll also see an alert indicated in the summary shown in the **Alerts** page for the virtual machine.
Now that you know how to create an alert from log data, collect additional logs and performance data from the virtual machine with a data collection rule.
0 commit comments