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/vminsights-enable-powershell.md
+1-4Lines changed: 1 addition & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,10 +50,7 @@ Use the script to enable VM insights using Azure Monitoring Agent and Dependenc
50
50
51
51
### [Azure Monitor Agent](#tab/AMA)
52
52
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.
- 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.
22
23
- 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.
23
24
- See [Manage the Azure Monitor agent](../agents/azure-monitor-agent-manage.md#prerequisites) for prerequisites related to Azure Monitor agent.
24
25
25
26
## 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.
30
28
31
29
>[!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.
33
31
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.
36
34
37
35
### 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}".
39
36
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:
41
38
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. |
46
46
47
47
48
48
### 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.
50
49
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:
57
51
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
+
58
55
> [!NOTE]
59
56
> 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.
60
57
61
-
## Log Analytics agent
58
+
## Enable VM insights using Log Analytics agent
62
59
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.
63
60
64
61
### Configure workspace
@@ -81,20 +78,7 @@ Once the workspace has been configured, deploy the agents using one of the templ
81
78
| ExistingVmssOnboarding | ExistingVmssOnboarding.json<br>ExistingVmssOnboarding.json | Enables VM insights on existing Virtual Machine Scale Set. |
82
79
| ExistingArcVmOnboarding | ExistingArcVmOnboarding.json<br>ExistingArcVmOnboarding.json | Enables VM insights on existing Arc-enabled server. |
83
80
84
-
85
81
## 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.
az deployment group create --resource-group <ResourceGroupName> --template-file <Template.json> --parameters <Parameters.json>
95
-
```
96
-
97
-
## To deploy a Resource Manager template
98
82
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.
99
83
100
84
### Deploy with the Azure portal
@@ -116,9 +100,6 @@ az account set --subscription "Subscription Name"
116
100
az deployment group create --resource-group <ResourceGroupName> --template-file <Template.json> --parameters <Parameters.json>
117
101
```
118
102
119
-
120
-
121
-
122
103
## Next steps
123
104
124
105
Now that monitoring is enabled for your virtual machines, this information is available for analysis with VM insights.
0 commit comments