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
Copy file name to clipboardExpand all lines: articles/azure-monitor/vm/tutorial-monitor-vm-alert-availability.md
+30-15Lines changed: 30 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,14 +8,15 @@ ms.date: 11/04/2021
8
8
ms.reviewer: Xema Pathak
9
9
---
10
10
11
-
# Create availability alert run for Azure virtual machine (preview)
12
-
One of the most common alerting conditions for a virtual machine is whether the virtual machine is running. The best method is to create a metric alert rule in Azure Monitor using VM availability metric which is currently in public preview.
11
+
# Create availability alert rule for Azure virtual machine (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
17
> * View the VM availability metric that shows when 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
+
> * Create an action group to be proactively notified when an alert is created.
19
20
20
21
## Prerequisites
21
22
To complete the steps in this article you need the following:
@@ -25,14 +26,22 @@ To complete the steps in this article you need the following:
25
26
26
27
27
28
## View the VM availability metric
28
-
Start by viewing the VM availability metric for your VM. Open the **Overview** page and then the **Monitoring** tab. This shows trending for several common metrics for the VM. Scroll down to view the chart for VM availability (preview). The value of the metric will be 1 when the VM is running and 0 when it's not.
29
+
Start by viewing the VM availability metric for your VM. Open the **Overview** page for the VM and then the **Monitoring** tab. This shows trending for several common metrics for the VM. Scroll down to view the chart for VM availability (preview). The value of the metric will be 1 when the VM is running and 0 when it's not.
30
+
31
+
:::image type="content" source="media/tutorial-monitor-vm/vm-availability-metric.png" alt-text="Screenshot of VM Availability metric for a VM." lightbox="media/tutorial-monitor-vm/vm-availability-metric.png":::
29
32
30
33
31
34
## Create alert rule
32
-
There are multiple methods to create an alert rule in Azure Monitor. In this tutorial, we'll create it right from the metric value. Click on the VM availability chart to open the metric in [metrics explorer](). This is a tool in Azure Monitor that allows you to interactively analyze metrics collected from your Azure resources.
35
+
There are multiple methods to create an alert rule in Azure Monitor. In this tutorial, we'll create it right from the metric value. This will prefill required values such as the VM and metric we want to monitor. You'll just need to provide the detailed logic for the alert rule.
36
+
37
+
> [!TIP]
38
+
> 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.
39
+
40
+
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.
33
41
42
+
Click **New alert rule**. This starts the creation of a new alert rule using the VM availability metric and the current VM.
34
43
35
-
Click **New alert rule**. This starts the creation of a new alert rule using the VM availability metric and the current VM. You do need to provide a couple of details though. The logic you want is to fire an alert when the value of the metric is less than 1. We'll have the alert rule check every minute.
44
+
:::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":::
36
45
37
46
Set the following values for the **Alert logic**. This specifies that the alert will fire whenever the average value of the availability metric falls below 1, which indicates that the VM isn't running.
38
47
@@ -52,21 +61,23 @@ Set the following values for **When to evaluate**. This specifies that the rule
52
61
| Check every | 1 minute |
53
62
| Loopback period | 1 minute |
54
63
64
+
:::image type="content" source="media/tutorial-monitor-vm/vm-availability-metric-alert-logic.png" alt-text="Screenshot of alert rule details for VM Availability metric." lightbox="media/tutorial-monitor-vm/vm-availability-metric-alert-logic.png":::
55
65
56
-
> [!TIP]
57
-
> 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.
58
66
59
67
60
68
## Configure action group
61
69
The **Actions** page allows you to add one or more [action groups](../alerts/action-groups.md) to the alert rule. Action groups define a set of actions to take when an alert is fired such as sending an email or an SMS message.
62
70
63
-
If you already have an action group, click **Add action group** to add an existing group to the alert rule.
71
+
> [!TIP]
72
+
> If you already have an action group, click **Add action group** to add an existing group to the alert rule instead of creating a new one.
73
+
74
+
Click **Create action group** to create a new one.
:::image type="content" source="media/tutorial-monitor-vm/vm-availability-metric-create-action-group.png" alt-text="Screenshot of option to create new action group." lightbox="media/tutorial-monitor-vm/vm-availability-metric-create-action-group.png":::
66
77
67
-
If you don't already have an action group in your subscription to select, then click **Create action group** to create a new one. Select a **Subscription** and **Resource group** for the action group and give it an **Action group name** that will appear in the portal and a **Display name** that will appear in email and SMS notifications.
78
+
Select a **Subscription** and **Resource group** for the action group and give it an **Action group name** that will appear in the portal and a **Display name** that will appear in email and SMS notifications.
68
79
69
-
:::image type="content" source="media/tutorial-monitor-vm/action-group-basics.png" lightbox="./media/tutorial-monitor-vm/action-group-basics.png" alt-text="Action group basics":::
80
+
:::image type="content" source="media/tutorial-monitor-vm/vm-availability-metric-action-group-basics.png" lightbox="./media/tutorial-monitor-vm/vm-availability-metric-action-group-basics.png" alt-text="Screenshot of action group basics":::
70
81
71
82
Select **Notifications** and add one or more methods to notify appropriate people when the alert is fired.
72
83
@@ -75,10 +86,14 @@ Select **Notifications** and add one or more methods to notify appropriate peopl
75
86
## Configure details
76
87
The **Details** page allows you to configure different settings for the alert rule.
77
88
78
-
-**Subscription** and **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.
79
-
-**Severity** for the alert. The severity allows you to group alerts with a similar relative importance. A severity of **Error** is appropriate for an unresponsive virtual machine.
80
-
- Keep the box checked to **Enable alert upon creation**.
81
-
- Keep the box checked to **Automatically resolve alerts**. This will automatically resolve the alert when the virtual machine comes back online and heartbeat records are seen again.
89
+
| Setting } Description |
90
+
|:---|:---|
91
+
| Subscription | Subscription where the alert rule will be stored. |
92
+
| 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. |
93
+
| Severity | The severity allows you to group alerts with a similar relative importance. A severity of **Error** is appropriate for an unresponsive virtual machine. |
94
+
| Alert rule name | Name of the alert that's displayed when it fires. |
95
+
| Alert rule description | Optional description of the alert rule. |
Copy file name to clipboardExpand all lines: articles/azure-monitor/vm/tutorial-monitor-vm-enable.md
+8-11Lines changed: 8 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.reviewer: Xema Pathak
9
9
---
10
10
11
11
# Enable monitoring with VM insights for Azure virtual machine
12
-
To monitor the performance of the guest operating system and workloads in an Azure virtual machine, you need to install the Azure Monitor agent to collect data from its guest operating system. One option is to use VM insights, which installs the Azure Monitor agent and starts collecting a predefined set of performance counters. You can optionally enable the collection detailed process and telemetry to enable the Map feature of VM insights which gives you a visual representation of your VM environment.
12
+
To monitor the guest operating system and workloads on an Azure virtual machine, you need to install the [Azure Monitor agent](../agents/azure-monitor-agent-overview.md) and create a [data collection rule (DCR)](../essentials/data-collection-rule-overview.md) that specifies which data to collect. One option is to use VM insights, which installs the agent and starts collecting a predefined set of performance counters. You can optionally enable the collection detailed process and telemetry to enable the Map feature of VM insights which gives you a visual representation of your VM environment.
13
13
14
14
15
15
> [!NOTE]
@@ -33,26 +33,23 @@ To complete this tutorial, you need the following:
33
33
- An Azure virtual machine to monitor.
34
34
35
35
> [NOTE!]
36
-
> If you selected the option to **Enable virtual machine insights when you created your virtual machine, then VM insights will already be enabled.
36
+
> If you selected the option to **Enable virtual machine insights** when you created your virtual machine, then VM insights will already be enabled. If the machine was previously enabled for VM insights using Log Analytics agent, see [Enable VM insights in the Azure portal](vminsights-enable-portal.md) for upgrading to Azure Monitor agent.
Select **Insights** from your virtual machine's menu in the Azure portal. If VM insights hasn't been enabled, you should see a short description of it and an option to enable it. Click **Enable** to open the **Monitoring configuration** pane. Leave the default option of **Azure Monitor agent**. VM insights will create a default data collection rule that doesn't include collection of processes and dependencies. Click **Create new** to create a new data collection rule.
42
42
43
+
:::image type="content" source="media/tutorial-monitor-vm/enable-vminsights.png" lightbox="media/tutorial-monitor-vm/enable-vminsights.png" alt-text="Enable VM insights with workspace":::
43
44
44
-
## Enable monitoring
45
-
Select **Insights** from your virtual machine's menu in the Azure portal. If VM insights hasn't been enabled, you should see a screen similar to the following allowing you to enable monitoring. Click **Enable**.
45
+
Provide a **Data collection rule name** and then select **Enable processes and dependencies (Map)**. Keep the default Log Analytics workspace for the subscription unless you have another workspace that you want to use. Click **Create** to create the new data collection rule. and then **Configure** to start VM insights configuration.
46
46
47
-
> [!NOTE]
48
-
> If you selected the option to **Enable detailed monitoring** when you created your virtual machine, VM insights may already be enabled. Select your workspace and click **Enable** again. This is the workspace where data collected by VM insights will be sent.
47
+
:::image type="content" source="media/tutorial-monitor-vm/enable-vminsights-create-new-rule.png" lightbox="media/tutorial-monitor-vm/enable-vminsights-create-new-rule.png" alt-text="Enable VM insights with workspace":::
49
48
50
-
:::image type="content" source="media/tutorial-monitor-vm/enable-vminsights-02.png" lightbox="media/tutorial-monitor-vm/enable-vminsights-02.png" alt-text="Enable VM insights with workspace":::
51
49
52
50
You'll see a message saying that monitoring is being enabled. It may take several minutes for the agent to be installed and for data collection to begin.
53
51
54
-
> [!NOTE]
55
-
> You may receive a message about an upgrade being available for VM insights. If so, select the option to perform the upgrade before proceeding.
52
+
56
53
57
54
## View performance
58
55
When the deployment is complete, you'll see views in the **Performance** tab in VM insights with performance data for the machine. This shows you the values of key guest metrics over time.
Copy file name to clipboardExpand all lines: articles/azure-monitor/vm/tutorial-monitor-vm-guest.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,18 +9,21 @@ ms.reviewer: Xema Pathak
9
9
---
10
10
11
11
# Collect guest logs and metrics from Azure virtual machine
12
-
When you [enable monitoring with VM insights](tutorial-monitor-vm-enable.md), it collects performance data using the Log Analytics agent. To collect logs from the guest operating system and to send performance data to Azure Monitor Metrics, install the [Azure Monitor agent](../agents/azure-monitor-agent-overview.md) and create a [data collection rule](../essentials/data-collection-rule-overview.md)(DCR) that defines the data to collect and where to send it.
12
+
To monitorthe guest operating system and workloads on an Azure virtual machine, you need to install the [Azure Monitor agent](../agents/azure-monitor-agent-overview.md) and create a [data collection rule (DCR)](../essentials/data-collection-rule-overview.md) that specifies which data to collect.
13
13
14
14
> [!NOTE]
15
-
> Prior to the Azure Monitor agent, guest metrics for Azure virtual machines were collected with the [Azure diagnostic extension](../agents/diagnostics-extension-overview.md) for Windows (WAD) and Linux (LAD). These agents are still available and can be configured with the **Diagnostic settings** menu item for the virtual machine, but they are in the process of being replaced with Azure Monitor agent.
15
+
> If you're completely new to Azure Monitor, you should start with [Tutorial: Monitor Azure resources with Azure Monitor](../essentials/monitor-azure-resource.md). Azure virtual machines generate similar monitoring data as other Azure resources such as platform metrics and Activity log. This tutorial describes how to enable additional monitoring unique to virtual machines.
16
16
17
17
In this tutorial, you learn how to:
18
18
19
19
> [!div class="checklist"]
20
-
> * Create a data collection rule that send guest performance data to Azure Monitor metrics and log events to Azure Monitor Logs.
20
+
> * Create a data collection rule that send guest performance data to Azure Monitor Metrics and log events to Azure Monitor Logs.
21
21
> * View guest metrics in metrics explorer.
22
22
> * View guest logs in Log Analytics.
23
23
24
+
> [!TIP]
25
+
> An alternative to the method described in this tutorial is to enable VM insights for the VM as described in [Enable monitoring with VM insights for Azure virtual machine](tutorial-monitor-vm-enable.md). This will also install the Azure Monitor agent on the VM and enable a predefined set of performance data to be collected.
0 commit comments