Skip to content

Commit 8def523

Browse files
authored
Merge pull request #260457 from guywi-ms/patch-90
Update vminsights-enable-resource-manager.md
2 parents f8b3c13 + 686acc5 commit 8def523

2 files changed

Lines changed: 20 additions & 42 deletions

File tree

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ Use the script to enable VM insights using Azure Monitoring Agent and Dependenc
5050

5151
### [Azure Monitor Agent](#tab/AMA)
5252

53-
54-
AMA Onboarding
55-
If AMA is onboarded, a Data Collection Rule (DCR) and a User Assigned Managed Identity (UAMI) is also associated to the VM/VMSS and UAMI settings are passed over to AMA extension.
56-
53+
When you enable VM insights using Azure Monitor Agent, the script associates a Data Collection Rule (DCR) and a User Assigned Managed Identity (UAMI) to the VM/VMSS, and passes the UAMI settings to the Azure Monitor Agent extension.
5754

5855
```powershell
5956
Install-VMInsights.ps1 -SubscriptionId <SubscriptionId> `

articles/azure-monitor/vm/vminsights-enable-resource-manager.md

Lines changed: 19 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -15,50 +15,47 @@ This article describes how to enable VM insights for a virtual machine or Virtua
1515
- Azure Virtual Machine Scale Sets
1616
- Hybrid virtual machines connected with Azure Arc
1717

18+
If you aren't familiar with how to deploy a Resource Manager template, see [Deploy templates](#deploy-templates).
19+
1820
## Prerequisites
1921

2022
- [Log Analytics workspace](./vminsights-configure-workspace.md).
21-
- To enable VM insights for Log Analytics agent, [configure your Log Analytics workspace for VM insights](../vm/vminsights-configure-workspace.md). This prerequisite isn't relevant if you're using Azure Monitor Agent.
2223
- See [Supported operating systems](./vminsights-enable-overview.md#supported-operating-systems) to ensure that the operating system of the virtual machine or Virtual Machine Scale Set you're enabling is supported.
2324
- See [Manage the Azure Monitor agent](../agents/azure-monitor-agent-manage.md#prerequisites) for prerequisites related to Azure Monitor agent.
2425

2526
## Resource Manager templates
26-
Azure Resource Manager templates are available for download that onboard virtual machines and Virtual Machine Scale Sets. A different set of templates is used for Azure Monitor agent and Log Analytics agent. The templates install the required agents and perform the configuration required to onboard to machine to VM insights.
27-
28-
29-
If you aren't familiar how to deploy a Resource Manager template, see [Deploy templates](#deploy-templates) for different options.
27+
Use the Azure Resource Manager templates provided in this article to onboard virtual machines and Virtual Machine Scale Sets using Azure Monitor agent and Log Analytics agent. The templates install the required agents and perform the configuration required to onboard to machine to VM insights.
3028

3129
>[!NOTE]
32-
>The template needs to be deployed in the same resource group as the virtual machine or virtual machine scale set being enabled.
30+
> Deploy the template in the same resource group as the virtual machine or virtual machine scale set being enabled.
3331
34-
## Azure Monitor agent
35-
Download the [Azure Monitor agent templates](https://github.com/Azure/AzureMonitorForVMs-ArmTemplates/releases/download/vmi_ama_ga/DeployDcr.zip). You must first install the data collection rule and can then install agents to use that DCR.
32+
## Enable VM insights using Azure Monitor Agent
33+
First deploy the data collection rule, and then install agents to use that data collection rule.
3634

3735
### Deploy data collection rule
38-
You only need to perform this step once. This will install the DCR that's used by each agent. The DCR will be created in the same resource group as the workspace with a name in the format "MSVMI-{WorkspaceName}".
3936

40-
Use on of the following sets of template and parameter files folders depending on your requirements:
37+
This step installs a data collection rule, named `MSVMI-{WorkspaceName}`, in the same resource group as your Log Analytics workspace:
4138

42-
| Folder | File | Description |
43-
|:---|:---|
44-
| DeployDcr\\<br>PerfAndMapDcr | DeployDcrTemplate<br>DeployDcrParameters | Enable both Performance and Map experience of VM Insights. |
45-
| DeployDcr\\<br>PerfOnlyDcr | DeployDcrTemplate<br>DeployDcrParameters | Enable only Performance experience of VM Insights. |
39+
1. Download the [VM insights data collection rule templates](https://github.com/Azure/AzureMonitorForVMs-ArmTemplates/releases/download/vmi_ama_ga/DeployDcr.zip).
40+
1. Install one of these sets of template and parameter files based on your requirements:
41+
42+
| Folder | File | Description |
43+
|:---|:---|
44+
| DeployDcr\\<br>PerfAndMapDcr | DeployDcrTemplate<br>DeployDcrParameters | Enable both Performance and Map experience of VM Insights. |
45+
| DeployDcr\\<br>PerfOnlyDcr | DeployDcrTemplate<br>DeployDcrParameters | Enable only Performance experience of VM Insights. |
4646

4747

4848
### Deploy agents to machines
49-
Once the data collection rule has been created, deploy the agents using one of the templates in the following table. You specify the resource ID of the DCR that you created in the first step in the parameters file. Each of the templates requires that the virtual machine or Virtual Machine Scale Set is already created.
5049

51-
| Folder | File | Description |
52-
|:---|:---|
53-
| ExistingVmOnboarding\\<br>PerfAndMapOnboarding | ExistingVmOnboardingTemplate.json<br>ExistingVmOnboardingParameters.json | Enable both Performance and Map experience for virtual machine. Use with PerfAndMapDcr. |
54-
| ExistingVmOnboarding\\<br>PerfOnlyOnboarding | ExistingVmOnboardingTemplate.json<br>ExistingVmOnboardingParameters.json | Enable only Performance experience for virtual machine. Use with PerfOnlyDCR. |
55-
| ExistingVmssOnboarding\\<br>PerfAndMapOnboarding | ExistingVmOnboardingTemplate.json<br>ExistingVmssOnboardingParameters.json | Enable both Performance and Map experience for Virtual Machine Scale Set. Use with PerfAndMapDcr. |
56-
| ExistingVmssOnboarding\\<br>PerfOnlyOnboarding | ExistingVmOnboardingTemplate.json<br>ExistingVmssOnboardingParameters.json | Enable only Performance experience for Virtual Machine Scale Set. Use with PerfOnlyDCR. |
50+
After you create the data collection rule, deploy:
5751

52+
- [Azure Monitor Agent for Linux or Windows](../agents/resource-manager-agent.md#azure-monitor-agent).
53+
- [Dependency agent for Linux](../../virtual-machines/extensions/agent-dependency-linux.md) or [Dependency agent or Windows](../../virtual-machines/extensions/agent-dependency-windows.md) if you want to enable the Map feature.
54+
5855
> [!NOTE]
5956
> If your virtual machines scale sets have an upgrade policy set to manual, VM insights will not be enabled for instances by default after installing the template. You must manually upgrade the instances.
6057
61-
## Log Analytics agent
58+
## Enable VM insights using Log Analytics agent
6259
Download the [Logs Analytics agent templates](https://aka.ms/VmInsightsARMTemplates). You must first configure the workspace and can then install agents to use that DCR.
6360

6461
### Configure workspace
@@ -81,20 +78,7 @@ Once the workspace has been configured, deploy the agents using one of the templ
8178
| ExistingVmssOnboarding | ExistingVmssOnboarding.json<br>ExistingVmssOnboarding.json | Enables VM insights on existing Virtual Machine Scale Set. |
8279
| ExistingArcVmOnboarding | ExistingArcVmOnboarding.json<br>ExistingArcVmOnboarding.json | Enables VM insights on existing Arc-enabled server. |
8380

84-
8581
## Deploy templates
86-
The templates can be deployed using [any deployment method for Resource Manager templates](../../azure-resource-manager/templates/deploy-powershell.md) including the following examples using PowerShell and CLI.
87-
88-
```powershell
89-
New-AzResourceGroupDeployment -Name OnboardCluster -ResourceGroupName <ResourceGroupName> -TemplateFile <Template.json> -TemplateParameterFile <Parameters.json>
90-
```
91-
92-
93-
```azurecli
94-
az deployment group create --resource-group <ResourceGroupName> --template-file <Template.json> --parameters <Parameters.json>
95-
```
96-
97-
## To deploy a Resource Manager template
9882
Each folder in the download has a template and a parameters file. Modify the parameters file with required details such as Virtual Machine Resource ID, Workspace resource ID, data collection rule resource ID, Location, and OS Type. Don't modify the template file unless you need to customize it for your particular scenario.
9983

10084
### Deploy with the Azure portal
@@ -116,9 +100,6 @@ az account set --subscription "Subscription Name"
116100
az deployment group create --resource-group <ResourceGroupName> --template-file <Template.json> --parameters <Parameters.json>
117101
```
118102

119-
120-
121-
122103
## Next steps
123104

124105
Now that monitoring is enabled for your virtual machines, this information is available for analysis with VM insights.

0 commit comments

Comments
 (0)