Skip to content

Commit b4c39d6

Browse files
committed
vm insights tutorial
1 parent 4d5ac45 commit b4c39d6

10 files changed

+44
-29
lines changed
268 KB
Loading
-73 Bytes
Loading
97.3 KB
Loading
154 KB
Loading
51.3 KB
Loading
89 KB
Loading
297 KB
Loading

articles/azure-monitor/vm/tutorial-monitor-vm-alert-availability.md

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ ms.date: 11/04/2021
88
ms.reviewer: Xema Pathak
99
---
1010

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.
1313

1414
In this article, you learn how to:
1515

1616
> [!div class="checklist"]
1717
> * View the VM availability metric that shows when a VM is running.
1818
> * 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.
1920
2021
## Prerequisites
2122
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:
2526

2627

2728
## 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":::
2932

3033

3134
## 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.
3341

42+
Click **New alert rule**. This starts the creation of a new alert rule using the VM availability metric and the current VM.
3443

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":::
3645

3746
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.
3847

@@ -52,21 +61,23 @@ Set the following values for **When to evaluate**. This specifies that the rule
5261
| Check every | 1 minute |
5362
| Loopback period | 1 minute |
5463

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":::
5565

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.
5866

5967

6068
## Configure action group
6169
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.
6270

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.
6475

65-
:::image type="content" source="media/tutorial-monitor-vm/alert-rule-actions.png" lightbox="media/tutorial-monitor-vm/alert-rule-actions.png" alt-text="Alert rule add action group.":::
76+
:::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":::
6677

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.
6879

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":::
7081

7182
Select **Notifications** and add one or more methods to notify appropriate people when the alert is fired.
7283

@@ -75,10 +86,14 @@ Select **Notifications** and add one or more methods to notify appropriate peopl
7586
## Configure details
7687
The **Details** page allows you to configure different settings for the alert rule.
7788

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. |
96+
8297

8398
:::image type="content" source="media/tutorial-monitor-vm/alert-rule-details.png" lightbox="media/tutorial-monitor-vm/alert-rule-details.png" alt-text="Alert rule details.":::
8499

articles/azure-monitor/vm/tutorial-monitor-vm-enable.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.reviewer: Xema Pathak
99
---
1010

1111
# 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.
1313

1414

1515
> [!NOTE]
@@ -33,26 +33,23 @@ To complete this tutorial, you need the following:
3333
- An Azure virtual machine to monitor.
3434

3535
> [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.
3737
3838

3939

40-
## Create a Log Analytics workspace
41-
[!INCLUDE [Create workspace](../../../includes/azure-monitor-tutorial-workspace.md)]
40+
## Enable VM insights
41+
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.
4242

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":::
4344

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.
4646

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":::
4948

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":::
5149

5250
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.
5351

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+
5653

5754
## View performance
5855
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.

articles/azure-monitor/vm/tutorial-monitor-vm-guest.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,21 @@ ms.reviewer: Xema Pathak
99
---
1010

1111
# 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 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.
1313

1414
> [!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.
1616
1717
In this tutorial, you learn how to:
1818

1919
> [!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.
2121
> * View guest metrics in metrics explorer.
2222
> * View guest logs in Log Analytics.
2323
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.
26+
2427
## Prerequisites
2528
To complete this tutorial you need the following:
2629

0 commit comments

Comments
 (0)