Skip to content

Commit 91a4edf

Browse files
authored
Merge pull request #190206 from bwren/vm-health-migrate
VM insights guest health migration
2 parents 86e850d + 68229fc commit 91a4edf

11 files changed

+136
-20
lines changed

articles/azure-monitor/azure-monitor-operations-manager.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@ When you move machines to the cloud, the monitoring requirements for their softw
9191

9292
Azure Monitor also doesn't measure the health of different applications and services running on a virtual machine. Metric alerts can automatically resolve when a value drops below a threshold, but Azure Monitor doesn't currently have the ability to define health criteria for applications and services running on the machine, nor does it provide health rollup to group the health of related components.
9393

94-
> [!NOTE]
95-
> A new [guest health feature for VM insights](vm/vminsights-health-overview.md) is now in public preview and does alert based on the health state of a set of performance metrics. This is initially limited though to a specific set of performance counters related to the guest operating system and not applications or other workloads running in the virtual machine.
96-
>
97-
> [![VM insights guest health](media/azure-monitor-operations-manager/vm-insights-guest-health.png)](media/azure-monitor-operations-manager/vm-insights-guest-health.png#lightbox)
98-
9994
Monitoring the software on your machines in a hybrid environment will typically use a combination of VM insights and Operations Manager, depending on the requirements of each machine and on your maturity developing operational processes around Azure Monitor. The Microsoft Management Agent (referred to as the Log Analytics agent in Azure Monitor) is used by both platforms so that a single machine can be simultaneously monitored by both.
10095

10196
> [!NOTE]

articles/azure-monitor/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,6 +1205,8 @@ items:
12051205
items:
12061206
- name: Overview
12071207
href: vm/vminsights-health-overview.md
1208+
- name: Migrate
1209+
href: vm/vminsights-health-migrate.md
12081210
- name: Enable
12091211
href: vm/vminsights-health-enable.md
12101212
- name: Alerts
-8.03 KB
Loading

articles/azure-monitor/vm/vminsights-health-alerts.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ description: Describes the alerts created by VM insights guest health including
44
ms.topic: conceptual
55
author: bwren
66
ms.author: bwren
7-
ms.date: 11/10/2020
7+
ms.date: 05/03/2022
88

99
---
1010

1111
# VM insights guest health alerts (preview)
1212
VM insights guest health allows you to view the health of a virtual machine as defined by a set of performance measurements that are sampled at regular intervals. An alert can be created when a virtual machine or monitor changes to an unhealthy state. You can view and manage these alerts with [those created by alert rules in Azure Monitor](../alerts/alerts-overview.md) and choose to be proactively notified when a new alert is created.
1313

14+
[!INCLUDE [guest-health-deprecate](../../../includes/azure-monitor-guest-health-deprecation.md)]
15+
1416
## Configure alerts
1517
You cannot create an explicit alert rule for VM insights guest health while this feature is in preview. By default, alerts will be created for each virtual machine but not for each monitor. This means that if a monitor changes to a state that doesn't affect the current state of the virtual machine, then no alert is created because the virtual machine state didn't change.
1618

articles/azure-monitor/vm/vminsights-health-configure-dcr.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ description: Describes how to modify default monitoring in VM insights guest hea
44
ms.topic: conceptual
55
author: bwren
66
ms.author: bwren
7-
ms.date: 10/15/2020
7+
ms.date: 05/03/2022
88

99
---
1010

1111
# Configure monitoring in VM insights guest health using data collection rules (preview)
1212
[VM insights guest health](vminsights-health-overview.md) allows you to view the health of a virtual machine as defined by a set of performance measurements that are sampled at regular intervals. This article describes how you can modify default monitoring across multiple virtual machines using data collection rules.
1313

14+
[!INCLUDE [guest-health-deprecate](../../../includes/azure-monitor-guest-health-deprecation.md)]
15+
1416

1517
## Monitors
1618
The health state of a virtual machine is determined by the [rollup of health](vminsights-health-overview.md#health-rollup-policy) from each of its monitors. There are two types of monitors in VM insights guest health as shown in the following table.

articles/azure-monitor/vm/vminsights-health-configure.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ description: Describes how to modify default monitoring for VM insights guest he
44
ms.topic: conceptual
55
author: bwren
66
ms.author: bwren
7-
ms.date: 12/14/2020
7+
ms.date: 05/03/2022
88

99
---
1010

1111
# Configure monitoring in VM insights guest health (preview)
1212
VM insights guest health allows you to view the health of a virtual machine as defined by a set of performance measurements that are sampled at regular intervals. This article describes how you can modify default monitoring using the Azure portal. It also describes fundamental concepts of monitors required for [configuring monitoring using a data collection rule](vminsights-health-configure-dcr.md).
1313

14+
[!INCLUDE [guest-health-deprecate](../../../includes/azure-monitor-guest-health-deprecation.md)]
15+
16+
1417
## Open monitor configuration
1518
Open monitor configuration in the Azure portal by selecting the monitor and then the **Configuration** tab.
1619

articles/azure-monitor/vm/vminsights-health-enable.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ description: Describes how to enable VM insights guest health in your subscripti
44
ms.topic: conceptual
55
author: bwren
66
ms.author: bwren
7-
ms.date: 04/05/2021
7+
ms.date: 05/03/2022
88
ms.custom: references_regions, devx-track-azurepowershell
99

1010
---
1111

1212
# Enable VM insights guest health (preview)
1313
VM insights guest health allows you to view the health of a virtual machine as defined by a set of performance measurements that are sampled at regular intervals. This article describes how to enable this feature in your subscription and how to enable guest monitoring for each virtual machine.
1414

15+
[!INCLUDE [guest-health-deprecate](../../../includes/azure-monitor-guest-health-deprecation.md)]
16+
17+
1518
## Current limitations
1619
VM insights guest health has the following limitations in public preview:
1720

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
title: Migrate from VM insights guest health (preview) to Azure Monitor log alerts
3+
description: Describes how to migrate from VM insights guest health to Azure Monitor log alerts.
4+
ms.topic: conceptual
5+
ms.date: 03/01/2022
6+
7+
---
8+
9+
# Migrate from VM insights guest health to Azure Monitor log alerts
10+
This article walks through migrating from the VM insights guest health (preview) to Azure Monitor log alerts to configure alerts on key VM metrics and offboard VMs from VM insights guest health (preview). [VM insights guest health (preview)](vminsights-health-overview.md) will retire on 30 November 2022. If you are using this feature to configure alerts on VM metrics (CPU utilization, Available memory, Free disk space), make sure to transition to Azure Monitor log alerts before this date.
11+
12+
## Configure Azure Monitor log alerts
13+
Before you remove VM insights guest health, you should create alert rules to replace its alerting functionality. See [Monitor virtual machines with Azure Monitor: Alerts](monitor-virtual-machine-alerts.md#log-alerts) for instructions on creating Azure Monitor log alerts.
14+
15+
> [!IMPORTANT]
16+
> Transitioning to log alerts will result in charges according to Azure Monitor log alert rates. See [Azure Monitor pricing](https://azure.microsoft.com/pricing/details/monitor/) for details.
17+
18+
19+
Alert rules for the key metrics used by VM health include the following:
20+
21+
- [CPU utilization](monitor-virtual-machine-alerts.md#log-alert-rules)
22+
- [Available memory](monitor-virtual-machine-alerts.md#log-alert-rules-1)
23+
- [Free disk space](monitor-virtual-machine-alerts.md#log-query-alert-rules-1)
24+
25+
To create a an alert rule for a single VM that alerts on any of the three conditions, create a [log alert rule](monitor-virtual-machine-alerts.md#log-alerts) with the following details.
26+
27+
28+
| Setting | Value |
29+
|:---|:---|
30+
| **Scope** | |
31+
| Target scope | Select your virtual machine. |
32+
| **Condition** | |
33+
| Signal type | Log |
34+
| Signal name | Custom log search |
35+
| Query | \<Use the query below\> |
36+
| Measurement | Measure: *Table rows*<br>Aggregation type: Count<br>Aggregation granularity: 15 minutes |
37+
| Alert Logic | Operator: Greater than<br>Threshold value: 0<br>Frequency of evaluation: 15 minutes |
38+
| Actions | Select or add an [action group](../alerts/action-groups.md) to notify you when the threshold is exceeded. |
39+
| **Details** | |
40+
| Severity| Warning |
41+
| Alert rule name | Daily data limit reached |
42+
43+
Replace the values in the following query if you want to set different thresholds.
44+
45+
```kusto
46+
InsightsMetrics
47+
| where TimeGenerated >= ago(15m)
48+
| where Origin == "vm.azm.ms"
49+
| where Namespace == "Processor" and Name == "UtilizationPercentage"
50+
| summarize UtilizationPercentage = avg(Val) by Computer, _ResourceId
51+
| where UtilizationPercentage >= 90
52+
| union (
53+
InsightsMetrics
54+
| where TimeGenerated >= ago(15m)
55+
| where Origin == "vm.azm.ms"
56+
| where Namespace == "Memory" and Name == "AvailableMB"
57+
| summarize AvailableMB = avg(Val) by Computer, _ResourceId
58+
| where AvailableMB <= 100)
59+
| union (
60+
InsightsMetrics
61+
| where Origin == "vm.azm.ms"
62+
| where TimeGenerated >= ago(15m)
63+
| where Namespace == "LogicalDisk" and Name == "FreeSpacePercentage"
64+
| summarize FreeSpacePercentage = avg(Val) by Computer, _ResourceId
65+
| where FreeSpacePercentage <= 10)
66+
| summarize UtilizationPercentage = max(UtilizationPercentage), AvailableMB = max(AvailableMB), FreeSpacePercentage = max(FreeSpacePercentage) by Computer, _ResourceId
67+
```
68+
69+
## Offboard VMs from VM insights guest health
70+
Use the following steps to offboard the VMs from the VM insights guest health (preview) feature. The **Health** tab and the **Guest VM Health** status in VM insights will not be available after retirement.
71+
72+
73+
### 1. Uninstall the VM extension for VM insights guest health
74+
The VM Extension is called *GuestHealthWindowsAgent* for Windows VMs and *GuestHealthLinuxAgent* for Linux VMs. You can remove the extension from the **Extensions + applications** page for the virtual machine in the Azure portal, [Azure PowerShell](/powershell/module/az.compute/remove-azvmextension), or [Azure CLI](/cli/azure/vm/extension#az-vm-extension-delete).
75+
76+
77+
### 2. Delete the Data Collection Rule Association created for VM insights guest health
78+
Before you can remove the data collection rule for VM insights guest health, you need to remove its association with any VMs. If the VM was onboarded to VM insights guest health using the Azure portal, a default DCR with a name similar to *Microsoft-VMInsights-Health-xxxxx* will have been created. If you onboarded with another method, you may have given the DCR a different name.
79+
80+
From the **Monitor** menu in the Azure portal, select **Data Collection Rules**. Click on the DCR for VM insights guest health, and then select **Resources**. Select the VMs to remove and click **Delete**.
81+
82+
You can also remove the Data Collection Rule Association using [Azure PowerShell](../agents/data-collection-rule-azure-monitor-agent.md#manage-rules-and-association-using-powershell) or [Azure CLI](/cli/azure/monitor/data-collection/rule/association#az-monitor-data-collection-rule-association-delete).
83+
84+
85+
### 3. Delete Data Collection Rule created for VM insights guest health
86+
To remove the data collection rule, click **Delete** from the DCR page in the Azure portal. You can also delete the Data Collection Rule using [Azure PowerShell](../agents/data-collection-rule-azure-monitor-agent.md#manage-rules-and-association-using-powershell) or [Azure CLI](/cli/azure/monitor/data-collection/rule#az-monitor-data-collection-rule-delete).
87+
88+
89+
## Next steps
90+
91+
- [Read more about log query alerts for virtual machine](monitor-virtual-machine-alerts.md)

articles/azure-monitor/vm/vminsights-health-overview.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,16 @@ description: Overview of the health feature in VM insights including how you can
44
ms.topic: conceptual
55
author: bwren
66
ms.author: bwren
7-
ms.date: 10/27/2020
7+
ms.date: 05/03/2022
88

99
---
1010

1111
# VM insights guest health (preview)
1212
VM insights guest health allows you to view the health of virtual machines based on a set of performance measurements that are sampled at regular intervals from the guest operating system. You can quickly check the health of all virtual machines in a subscription or resource group, drill down on the detailed health of a particular virtual machine, or be proactively notified when a virtual machine becomes unhealthy.
1313

14+
[!INCLUDE [guest-health-deprecate](../../../includes/azure-monitor-guest-health-deprecation.md)]
15+
16+
1417
## Enable virtual machine health
1518
See [Enable VM insights guest health (preview)](vminsights-health-enable.md) for details on enabling the guest health feature and onboarding virtual machines.
1619

articles/azure-monitor/vm/vminsights-health-troubleshoot.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@ description: Describes troubleshooting steps that you can take when you have iss
44
ms.topic: conceptual
55
author: bwren
66
ms.author: bwren
7-
ms.date: 02/25/2021
7+
ms.date: 05/03/2022
88

99
---
1010

1111
# Troubleshoot VM insights guest health (preview)
1212
This article describes troubleshooting steps that you can take when you have issues with VM insights health.
1313

14+
[!INCLUDE [guest-health-deprecate](../../../includes/azure-monitor-guest-health-deprecation.md)]
15+
1416
## Installation errors
15-
If any of the following solutions do not solve your installation issue, collect VM Health agent log located at `/var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealthLinuxAgent/*.log` and contact Microsoft for further investigation.
17+
If any of the following solutions don't solve your installation issue, collect VM Health agent log located at `/var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealthLinuxAgent/*.log` and contact Microsoft for further investigation.
1618

1719
### Error message showing db5 error
1820
Your installation didn't succeed and your installation error message is similar to the following:
@@ -33,7 +35,7 @@ Your installation didn't succeed and your installation error message is similar
3335
Exiting with the following error: "Failed to install VM Guest Health Agent: Init already exists: /etc/systemd/system/vmGuestHealthAgent.service"install vmGuestHealthAgent service execution failed with exit code 37
3436
```
3537

36-
VM Health Agent will uninstall the existing service first before installing the current version. The reason for this error is likely because the previous service file didn't get cleaned up due to some reason. Login to the VM and run the following command backup existing service file and try re-install again.
38+
VM Health Agent will uninstall the existing service first before installing the current version. The reason for this error is likely because the previous service file didn't get cleaned up due to some reason. Log in to the VM and run the following command backup existing service file and try re-install again.
3739

3840
```
3941
sudo mv /etc/systemd/system/vmGuestHealthAgent.service /etc/systemd/system/vmGuestHealthAgent.service.bak
@@ -51,28 +53,28 @@ Your installation didn't succeed and your installation error message is similar
5153
```
5254
Exiting with the following error: "Failed to install VM Guest Health Agent: exit status 1"install vmGuestHealthAgent service execution failed with exit code 37
5355
```
54-
This is likely because VM Guest Agent couldn't acquire the lock for the service file. Try to reboot your VM which will release the lock.
56+
This is likely because VM Guest Agent couldn't acquire the lock for the service file. Try to reboot your VM, which will release the lock.
5557

5658

5759
## Upgrade errors
5860

5961
### Upgrade available message is still displayed after upgrading guest health
6062

61-
- Verify that VM is running in global Azure. Azure Arc-enabled servers are not yet supported.
63+
- Verify that VM is running in global Azure. Azure Arc-enabled servers aren't yet supported.
6264
- Verify that the virtual machine's region and operating system version are supported as described in [Enable Azure Monitor for VMs guest health (preview)](vminsights-health-enable.md).
6365
- Verify that guest health extension installed successfully with 0 exit code.
6466
- Verify that Azure Monitor agent extension is installed successfully.
6567
- Verify that system-assigned managed identity is enabled for the virtual machine.
6668
- Verify that no user-assigned managed identities are specified for the virtual machine.
67-
- Verify for Windows virtual machines that locale is *US English*. Localization is not currently supported by Azure Monitor agent.
68-
- Verify that the virtual machine is not using the network proxy. Azure Monitor agent does not currently support proxies.
69+
- Verify for Windows virtual machines that locale is *US English*. Localization isn't currently supported by Azure Monitor agent.
70+
- Verify that the virtual machine isn't using the network proxy. Azure Monitor agent doesn't currently support proxies.
6971
- Verify that the health extension agent started without errors. If the agent can't start, the agent's state may be corrupt. Delete the contents of the agent state folder and restart the agent.
7072
- For Linux: Daemon is *vmGuestHealthAgent*. State folder is */var/opt/vmGuestHealthAgent/**
7173
- For Windows: Service is *VM Guest Health agent*. State folder is _%ProgramData%\Microsoft\VMGuestHealthAgent\\*_.
7274
- Verify the Azure Monitor agent has network connectivity.
7375
- From the virtual machine, attempt to ping _\<region\>.handler.control.monitor.azure.com_. For example, for a virtual machine in westeurope, attempt to ping _westeurope.handler.control.monitor.azure.com:443_.
7476
- Verify that virtual machine has an association with a data collection rule in the same region as the Log Analytics workspace.
75-
- Refer to **Create data collection rule (DCR)** in [Enable Azure Monitor for VMs guest health (preview)](vminsights-health-enable.md) to ensure structure of the DCR is correct. Pay particular attention to presence of *performanceCounters* data source section set up to samples three counters and presence of *inputDataSources* section in health extension configuration to send counters to the extension.
77+
- Refer to **Create data collection rule (DCR)** in [Enable Azure Monitor for VMs guest health (preview)](vminsights-health-enable.md) to ensure structure of the DCR is correct. Pay particular attention to presence of *performanceCounters* data source section setup to samples three counters and presence of *inputDataSources* section in health extension configuration to send counters to the extension.
7678
- Check the virtual machine for guest health extension errors.
7779
- For Linux: Check logs at _/var/log/azure/Microsoft.Azure.Monitor.VirtualMachines.GuestHealthLinuxAgent/*.log_.
7880
- For Windows: Check logs at _C:\WindowsAzure\Logs\Plugins\Microsoft.Azure.Monitor.VirtualMachines.GuestHealthWindowsAgent\{extension version}\*.log_.
@@ -90,7 +92,7 @@ This is likely because VM Guest Agent couldn't acquire the lock for the service
9092

9193
#### Verify that the virtual machine meets configuration requirements
9294

93-
1. Verify that the virtual machine is an Azure virtual machine. Azure Arc for servers is not currently supported.
95+
1. Verify that the virtual machine is an Azure virtual machine. Azure Arc for servers isn't currently supported.
9496
2. Verify that the virtual machine is running a [supported operating system](vminsights-health-enable.md?current-limitations.md).
9597
3. Verify that the virtual machine is installed in a [supported region](vminsights-health-enable.md?current-limitations.md).
9698
4. Verify that the Log Analytics workspace is installed in a [supported region](vminsights-health-enable.md?current-limitations.md).
@@ -116,7 +118,7 @@ This error indicates that the **Microsoft.WorkloadMonitor** resource provider wa
116118
### Health shows as "unknown" after guest health is enabled.
117119

118120
#### Verify that performance counters on Windows nodes are working correctly
119-
Guest health relies on the agent being able to collect performance counters from the node. he base set of performance counter libraries may become corrupted and may need to be rebuilt. Follow the instructions at [Manually rebuild performance counter library values](/troubleshoot/windows-server/performance/rebuild-performance-counter-library-values) to rebuild the performance counters.
121+
Guest health relies on the agent being able to collect performance counters from the node. the base set of performance counter libraries may become corrupted and may need to be rebuilt. Follow the instructions at [Manually rebuild performance counter library values](/troubleshoot/windows-server/performance/rebuild-performance-counter-library-values) to rebuild the performance counters.
120122

121123

122124

0 commit comments

Comments
 (0)