Tools for migrating from Log Analytics Agent to Azure Monitor Agent
Azure Monitor Agent (AMA) replaces the Log Analytics Agent (MMA/OMS) for Windows and Linux virtual machines, scale sets, and on premise and Arc-enabled servers. The benefits of migrating to Azure Monitor Agent include enhanced security, cost-effectiveness, performance, manageability and reliability. This article explains how to use the AMA Migration Helper and DCR Config Generator tools to help automate and track the migration from Log Analytics Agent to Azure Monitor Agent.
Do not remove the legacy agents if being used by other Azure solutions or services. Use the migration helper to discover which solutions/services you use today.
Using AMA Migration Helper (preview)
AMA Migration Helper is a workbook-based Azure Monitor solution that helps you discover what to migrate and track progress as you move from Log Analytics Agent to Azure Monitor Agent. Use this single pane of glass view to expedite and track the status of your agent migration journey.
Installing and using DCR Config Generator (preview)
Azure Monitor Agent relies only on data collection rules (DCRs) for configuration, whereas Log Analytics Agent inherits its configuration from Log Analytics workspaces.
Use the DCR Config Generator tool to parse Log Analytics Agent configuration from your workspaces and generate corresponding data collection rules automatically. You can then associate the rules to machines running the new agent using built-in association policies.
DCR Config Generator does not currently support additional configuration for Azure solutions or services dependent on Log Analytics Agent.
To install DCR Config Generator, you need:
- PowerShell version 5.1 or higher. We recommend using PowerShell version 7.1.3 or higher.
- Read access for the specified workspace resources.
Az Powershellmodule to pull workspace agent configuration information.
- The Azure credentials for running
Select-AzSubscription, which set the context for the script to run.
To install DCR Config Generator:
Run the script:
.\WorkspaceConfigToDCRMigrationTool.ps1 -SubscriptionId $subId -ResourceGroupName $rgName -WorkspaceName $workspaceName -DCRName $dcrName -Location $location -FolderPath $folderPath
Option 2 (if you just want the DCR payload JSON file):
$dcrJson = Get-DCRJson -ResourceGroupName $rgName -WorkspaceName $workspaceName -PlatformType $platformType $dcrJson | ConvertTo-Json -Depth 10 | Out-File "<filepath>\OutputFiles\dcr_output.json"
Parameter Required? Description
Yes ID of the subscription that contains the target workspace.
Yes Resource group that contains the target workspace.
Yes Name of the target workspace.
Yes Name of the new DCR.
Yes Region location for the new DCR.
No Path in which to save the new data collection rules. By default, Azure Monitor uses the current directory.
Review the output data collection rules. The script can produce two types of ARM template files, depending on the agent configuration in the target workspace:
- Windows ARM template and parameter files - if the target workspace contains Windows performance counters or Windows events.
- Linux ARM template and parameter files - if the target workspace contains Linux performance counters or Linux Syslog events.
Use the built-in rule association policies to associate the generated data collection rules with virtual machines running the new agent.
Submit and view feedback for