Skip to content

Commit 7759ab4

Browse files
Remove Log Analytics agent.
1 parent 93e3eac commit 7759ab4

File tree

2 files changed

+7
-134
lines changed

2 files changed

+7
-134
lines changed

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

Lines changed: 4 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.topic: conceptual
55
ms.custom: devx-track-azurepowershell
66
author: guywi-ms
77
ms.author: guywild
8-
ms.date: 12/13/2023
8+
ms.date: 05/20/2024
99
---
1010

1111
# Enable VM insights by using PowerShell
@@ -14,13 +14,11 @@ This article describes how to enable VM insights on Azure virtual machines by us
1414
- Azure Virtual Machines
1515
- Azure Virtual Machine Scale Sets
1616

17-
This script installs VM extensions for Log Analytics/Azure Monitoring Agent (AMA) and, if necessary, the Dependency Agent to enable VM Insights. If AMA is onboarded, a Data Collection Rule (DCR) and a User Assigned Managed Identity (UAMI) is also associated with the virtual machines and virtual machine scale sets.
18-
19-
[!INCLUDE [Log Analytics agent deprecation](../../../includes/log-analytics-agent-deprecation.md)]
20-
17+
This script installs VM extensions for Azure Monitoring Agent (AMA) and, if necessary, the Dependency Agent to enable VM Insights. If AMA is onboarded, a Data Collection Rule (DCR) and a User Assigned Managed Identity (UAMI) is also associated with the virtual machines and virtual machine scale sets.
2118

2219
> [!NOTE]
2320
> Azure Monitor Agent is supported from version 1.10.1.
21+
2422
## Prerequisites
2523

2624
You need to:
@@ -48,11 +46,7 @@ For a list of the script's argument details and example usage, run `Get-Help`.
4846
Get-Help Install-VMInsights.ps1 -Detailed
4947
```
5048

51-
Use the script to enable VM insights using Azure Monitoring Agent and Dependency Agent, or Log Analytics Agent.
52-
53-
54-
55-
### [Azure Monitor Agent](#tab/AMA)
49+
Use the script to enable VM insights using Azure Monitoring Agent and Dependency Agent.
5650

5751
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/Virtual Machine Scale Set. The UAMI settings are passed to the Azure Monitor Agent extension.
5852

@@ -135,102 +129,6 @@ Failed : 0
135129
VMSS Instance Upgrade Failures : 0
136130
```
137131

138-
139-
### [Log Analytics Agent](#tab/LogAnalyticsAgent)
140-
141-
142-
Required Arguments:
143-
+ `-WorkspaceId <String>` Log Analytics WorkspaceID (GUID).
144-
+ `-WorkspaceKey <String>` Log Analytics Workspace primary or secondary key.
145-
146-
Optional Arguments:
147-
+ `-ReInstall [<SwitchParameter>]` Trigger removal of existing Log analytics extension and reinstallation to migrate log analytics workspaces with Legacy Agent (Linux) - OMSAgent.
148-
+ `-Name <String>` Name of the VM or Virtual Machine Scale Set to be onboarded. If not specified, all VMs and Virtual Machine Scale Sets in the subscription or resource group are onboarded. Use wildcards to specify multiple VMs or Virtual Machine Scale Sets.
149-
+ `- ResourceGroup <String>` Name of the resource group containing the VM or Virtual Machine Scale Set to be onboarded. If not specified, all VMs and Virtual Machine Scale Sets in the subscription are onboarded. Use wildcards to specify multiple resource groups.
150-
+ `-PolicyAssignmentName <String>` Only include VMs associated with this policy. When the PolicyAssignmentName parameter is specified, the VMs part of the parameter SubscriptionId are considered.
151-
+ `-TriggerVmssManualVMUpdate [<SwitchParameter>]` Trigger the update of VM instances in a scale set whose upgrade policy is set to Manual.
152-
+ `-WhatIf [<SwitchParameter>]` Get info about expected effect of the commands in the script.
153-
+ `-Confirm [<SwitchParameter>]` Confirm each action in the script.
154-
+ `-Approve [<SwitchParameter>]` Provide the approval for the installation to start with no confirmation prompt for the listed VM's/Virtual Machine Scale Sets.
155-
156-
The script supports wildcards for `-Name` and `-ResourceGroup`. For example, `-Name vm*` enables VM insights for all VMs and Virtual Machine Scale Sets that start with "vm". For more information, see [Wildcards in Windows PowerShell](/powershell/module/microsoft.powershell.core/about/about_wildcards).
157-
158-
159-
Example:
160-
161-
```powershell
162-
Install-VMInsights.ps1 -WorkspaceId \<WorkspaceId\> `
163-
-WorkspaceKey \<WorkspaceKey\> `
164-
-SubscriptionId \<SubscriptionId\> `
165-
-ResourceGroup \<ResourceGroup\>
166-
167-
Install-VMInsights.ps1 -WorkspaceId \<WorkspaceId\> `
168-
-WorkspaceKey \<WorkspaceKey\> `
169-
-SubscriptionId \<SubscriptionId\> `
170-
-ResourceGroup \<ResourceGroup\> `
171-
-ReInstall
172-
```
173-
174-
175-
Use the following command to enable VM insights using Log Analytics Agent and Dependency Agent.
176-
177-
178-
```powershell
179-
$WorkspaceId = "<GUID>"
180-
$WorkspaceKey = "<Key>"
181-
$SubscriptionId = "<GUID>"
182-
183-
Install-VMInsights.ps1 -WorkspaceId $WorkspaceId `
184-
-WorkspaceKey $WorkspaceKey `
185-
-SubscriptionId $SubscriptionId `
186-
-WorkspaceRegion <region>
187-
```
188-
The output has the following format:
189-
190-
```powershell
191-
Getting list of VMs or virtual machine scale sets matching criteria specified
192-
193-
VMs or virtual machine scale sets matching criteria:
194-
195-
db-ws-1 VM running
196-
db-ws2012 VM running
197-
198-
This operation will install the Log Analytics and Dependency agent extensions on the previous two VMs or virtual machine scale sets.
199-
VMs in a non-running state will be skipped.
200-
Extension will not be reinstalled if already installed. Use -ReInstall if desired, for example, to update workspace.
201-
202-
Confirm
203-
Continue?
204-
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
205-
206-
db-ws-1 : Deploying DependencyAgentWindows with name DAExtension
207-
db-ws-1 : Successfully deployed DependencyAgentWindows
208-
db-ws-1 : Deploying MicrosoftMonitoringAgent with name MMAExtension
209-
db-ws-1 : Successfully deployed MicrosoftMonitoringAgent
210-
db-ws2012 : Deploying DependencyAgentWindows with name DAExtension
211-
db-ws2012 : Successfully deployed DependencyAgentWindows
212-
db-ws2012 : Deploying MicrosoftMonitoringAgent with name MMAExtension
213-
db-ws2012 : Successfully deployed MicrosoftMonitoringAgent
214-
215-
Summary:
216-
217-
Already onboarded: (0)
218-
219-
Succeeded: (4)
220-
db-ws-1 : Successfully deployed DependencyAgentWindows
221-
db-ws-1 : Successfully deployed MicrosoftMonitoringAgent
222-
db-ws2012 : Successfully deployed DependencyAgentWindows
223-
db-ws2012 : Successfully deployed MicrosoftMonitoringAgent
224-
225-
Connected to different workspace: (0)
226-
227-
Not running - start VM to configure: (0)
228-
229-
Failed: (0)
230-
```
231-
232-
---
233-
234132
Check your VM/Virtual Machine Scale Set in Azure portal to see if the extensions are installed or use the following command:
235133

236134
```powershell

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

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.topic: conceptual
55
ms.custom: devx-track-arm-template, devx-track-azurepowershell
66
author: guywi-ms
77
ms.author: guywild
8-
ms.date: 09/28/2023
8+
ms.date: 05/20/2024
99
---
1010

1111
# Enable VM insights using Resource Manager templates
@@ -19,13 +19,12 @@ If you aren't familiar with how to deploy a Resource Manager template, see [Depl
1919

2020
## Prerequisites
2121

22-
- [Log Analytics workspace](../logs/quick-create-workspace.md).
2322
- 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.
2423
- See [Manage the Azure Monitor agent](../agents/azure-monitor-agent-manage.md#prerequisites) for prerequisites related to Azure Monitor agent.
2524
- To enable network isolation for Azure Monitor Agent, see [Enable network isolation for Azure Monitor Agent by using Private Link](../agents/azure-monitor-agent-private-link.md).
2625

2726
## Resource Manager templates
28-
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.
27+
Use the Azure Resource Manager templates provided in this article to onboard virtual machines and Virtual Machine Scale Sets using Azure Monitor agent. The templates install the required agents and perform the configuration required to onboard to machine to VM insights.
2928

3029
>[!NOTE]
3130
> Deploy the template in the same resource group as the virtual machine or virtual machine scale set being enabled.
@@ -35,7 +34,7 @@ First deploy the data collection rule, and then install agents to use that data
3534

3635
### Deploy data collection rule
3736

38-
This step installs a data collection rule, named `MSVMI-{WorkspaceName}`, in the same resource group as your Log Analytics workspace:
37+
This step installs a data collection rule, named `MSVMI-{WorkspaceName}`:
3938

4039
1. Download the [VM insights data collection rule templates](https://github.com/Azure/AzureMonitorForVMs-ArmTemplates/releases/download/vmi_ama_ga/DeployDcr.zip).
4140
1. [Deploy a template](#deploy-templates) from the downloaded zip file. The following table describes the templates available:
@@ -45,7 +44,6 @@ This step installs a data collection rule, named `MSVMI-{WorkspaceName}`, in the
4544
| DeployDcr\\<br>PerfAndMapDcr | DeployDcrTemplate<br>DeployDcrParameters | Enable both Performance and Map experience of VM Insights. |
4645
| DeployDcr\\<br>PerfOnlyDcr | DeployDcrTemplate<br>DeployDcrParameters | Enable only Performance experience of VM Insights. |
4746

48-
4947
### Deploy agents to machines
5048

5149
After you create the data collection rule, deploy:
@@ -56,29 +54,6 @@ After you create the data collection rule, deploy:
5654
> [!NOTE]
5755
> 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.
5856
59-
## Enable VM insights using Log Analytics agent
60-
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.
61-
62-
### Configure workspace
63-
You only need to perform this step once for each workspace that will use VM insights.
64-
65-
66-
| Folder | File | Description |
67-
|:---|:---|
68-
| ConfigureWorkspace | ConfigureWorkspaceTemplate.json<br>ConfigureWorkspaceParameters | Install *VMInsights* solution required for the workspace. |
69-
70-
### Deploy agents to machines
71-
Once the workspace has been configured, deploy the agents using one of the templates in the following table. Templates are available that apply to an existing machine or create a new machine enabled for VM insights.
72-
73-
74-
| Folder | File | Description |
75-
|:---|:---|
76-
| NewVmOnboarding | NewVmOnboardingTemplate.json<br>NewVmOnboardingParameters.json | Creates a virtual machine and enables it to be monitored with VM insights. |
77-
| ExistingVmOnboarding | ExistingVmOnboarding.json<br>ExistingVmOnboarding.json | Enables VM insights on existing virtual machine. |
78-
| NewVmssOnboarding | NewVmssOnboarding.json<br>NewVmssOnboarding.json | Creates a Virtual Machine Scale Set and enables it to be monitored with VM insights. |
79-
| ExistingVmssOnboarding | ExistingVmssOnboarding.json<br>ExistingVmssOnboarding.json | Enables VM insights on existing Virtual Machine Scale Set. |
80-
| ExistingArcVmOnboarding | ExistingArcVmOnboarding.json<br>ExistingArcVmOnboarding.json | Enables VM insights on existing Arc-enabled server. |
81-
8257
## Deploy templates
8358
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.
8459

0 commit comments

Comments
 (0)