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.
13
13
14
14
In this article, you learn how to:
@@ -23,8 +23,6 @@ To complete the steps in this article you need the following:
23
23
24
24
- An Azure virtual machine to monitor.
25
25
26
-
27
-
28
26
## View the VM availability metric
29
27
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.
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.
Copy file name to clipboardExpand all lines: articles/virtual-machines/monitor-vm-reference.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,16 @@ Azure virtual machines and virtual machine scale sets have the following dimensi
36
36
| VMName | Used with virtual machine scale sets |
37
37
|||
38
38
39
+
## VM availability metric (preview)
40
+
The VM availability metric is currently in public preview. This metric value indicates whether a machine is currently running and available. You can use the metric to trend availability over time and to alert if the machine is stopped. VM availability has the values in the following table.
41
+
42
+
| Value | Description |
43
+
|:---|:---|
44
+
| 1 | VM is running and available. |
45
+
| 0 | VM is unavailable. The VM could be stopped or rebooting. |
46
+
| Null | State of the VM is unknown. |
47
+
48
+
39
49
## Azure Monitor Logs tables
40
50
41
51
This section refers to all the Azure Monitor Logs tables that are relevant to virtual machines and virtual machine scale sets and available for query by Log Analytics.
Copy file name to clipboardExpand all lines: articles/virtual-machines/monitor-vm.md
+12-24Lines changed: 12 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,11 +37,8 @@ The [Activity log](../azure-monitor/essentials/activity-log.md) displays recent
37
37
38
38
:::image type="content" source="media/monitor-vm/activity-log.png" lightbox="media/monitor-vm/activity-log.png" alt-text="Screenshot of the 'Activity log' pane.":::
39
39
40
-
## Collect guest metrics and logs
41
-
Azure Monitor starts automatically collecting metric data for your virtual machine host when you create the VM. To collect metrics from the guest operating system of the virtual machine, though, you must install the A[Azure Monitor agent](../azure-monitor/agents/azure-monitor-agent-overview.md). To learn how to install the Azure Monitor agent and create a data collection rule that defines the data to collect, see [Tutorial: Collect guest logs and metrics from an Azure virtual machine](../azure-monitor/vm/tutorial-monitor-vm-guest.md).
42
-
43
-
If you enable [VM insights](#vm-insights), the Azure Monitor agent is installed and starts sending a predefined set of performance data to Azure Monitor Logs. You can create additional data collection rules to collect events and other performance data. For a tutorial on enabling VM insights for a virtual machine, see [Enable monitoring for Azure virtual machines](../azure-monitor/vm/tutorial-monitor-vm-enable.md).
44
-
40
+
## Azure Monitor agent
41
+
Azure Monitor starts automatically collecting metric data for your virtual machine host when you create the VM. To collect logs and performance data from the guest operating system of the virtual machine, though, you must install the [Azure Monitor agent](../azure-monitor/agents/azure-monitor-agent-overview.md). You can install the agent and configure collection using either [Vm insights](#vminsights) or by [creating a data collection rule](#create-data-collection-rule) as described below.
45
42
46
43
## VM insights
47
44
Some services in Azure display customized monitoring experiences in Azure Monitor. These experiences are called *insights*, and they include pre-built workbooks and other specialized features for that particular service.
@@ -57,10 +54,15 @@ VM insights is designed to monitor your Azure and hybrid virtual machines in a s
57
54
58
55
:::image type="content" source="media/monitor-vm/vminsights-02.png" lightbox="media/monitor-vm/vminsights-02.png" alt-text="Screenshot of the VM insights 'Map' view.":::
59
56
60
-
For quick steps for configuring VM insights and enabling monitoring for a virtual machine, see [Enable Azure Monitor for a single virtual machine or virtual machine scale set in the Azure portal](../azure-monitor/vm/vminsights-enable-portal.md).
57
+
For a tutorial on enabling VM insights for a virtual machine, see [Enable monitoring for Azure virtual machines](../azure-monitor/vm/tutorial-monitor-vm-enable.md).
58
+
61
59
62
60
For general information about enabling insights and a variety of methods for onboarding virtual machines, see [Enable VM insights overview](../azure-monitor/vm/vminsights-enable-overview.md).
63
61
62
+
## Create data collection rule
63
+
If you enable [VM insights](#vm-insights), the Azure Monitor agent is installed and starts sending a predefined set of performance data to Azure Monitor Logs. You can create additional data collection rules to collect events and other performance data. To learn how to install the Azure Monitor agent and create a data collection rule that defines the data to collect, see [Tutorial: Collect guest logs and metrics from an Azure virtual machine](../azure-monitor/vm/tutorial-monitor-vm-guest.md).
64
+
65
+
64
66
## Analyze metrics
65
67
Metrics are numerical values that describe some aspect of a system at a particular point in time. Although platform metrics for the virtual machine host are collected automatically, you must [install the Azure Monitor agent](#collect-guest-metrics-and-logs) to collect guest metrics.
66
68
@@ -79,28 +81,14 @@ To analyze other log data that you collect from your virtual machines, use [log
79
81
80
82
:::image type="content" source="media/monitor-vm/log-analytics-query.png" lightbox="media/monitor-vm/log-analytics-query.png" alt-text="Screenshot of the 'Logs' pane displaying Log Analytics query results.":::
81
83
82
-
## VM availability metric (preview)
83
-
The VM availability metric is currently in public preview. This metric value indicates whether a machine is currently running and available. You can use the metric to trend availability over time and to alert if the machine is stopped. VM availability has the values in the following table.
84
-
85
-
| Value | Description |
86
-
|:---|:---|
87
-
| 1 | VM is running and available. |
88
-
| 0 | VM is unavailable. The VM could be stopped or rebooting. |
89
-
| Null | State of the VM is unknown. |
90
-
91
-
92
-
View the VM availability metric on the [Overview page](#overview-page) for a particular VM. This will show a graph of the availability over time.
93
-
94
-
95
-
96
84
## Alerts
97
85
Azure Monitor alerts proactively notify you when important conditions are found in your monitoring data. These alerts can help you identify and address issues in your system before your customers notice them. You can set alerts on [metrics](/azure/azure-monitor/platform/alerts-metric-overview), [logs](/azure/azure-monitor/platform/alerts-unified-log), and the [activity log](/azure/azure-monitor/platform/activity-log-alerts).
98
86
99
-
### Recommended alerts
100
-
Start by enabling recommended alerts. These are a predefined set of alert rules based on host metrics for the VM. You can quickly enable and customize each of these rules with a few clicks in the Azure portal. See [Enable recommended alert rules in the Azure portal (preview)](alerts/alerts-manage-alert-rules.md#enable-recommended-alert-rules-in-the-azure-portal-preview) for details on enabling recommended alert rules.
101
-
102
87
### Availability alert
103
-
Use the VM availability metric to alert when a VM isn't running. This metric is currently in public preview and not yet included in recommended alerts, so you must create the alert rule yourself.
88
+
Use the VM availability metric to alert when a VM isn't running. This metric is currently in public preview and not yet included in recommended alerts, so you must create the alert rule yourself. See [Tutorial: Create availability alert rule for Azure virtual machine (preview)](../azure-monitor/vm/tutorial-monitor-vm-alert-availability.md).
89
+
90
+
### Recommended alerts
91
+
Start by enabling recommended alerts. These are a predefined set of alert rules based on host metrics for the VM. You can quickly enable and customize each of these rules with a few clicks in the Azure portal. See [Tutorial: Create availability alert rule for Azure virtual machine (preview)](../azure-monitor/vm/tutorial-monitor-vm-alert-recommended.md).
0 commit comments