Migration guidance from Change Tracking and inventory using Log Analytics to Change Tracking and inventory using Azure Monitoring Agent version
Artikkeli
Applies to: ✔️ Windows VMs ✔️ Linux VMs ✔️ Azure Arc-enabled servers.
This article provides guidance to move from Change Tracking and Inventory using Log Analytics (LA) version to the Azure Monitoring Agent (AMA) version.
Using the Azure portal, you can migrate from Change Tracking & Inventory with LA agent to Change Tracking & Inventory with AMA and there are two ways to do this migration:
Migrate single/multiple VMs from the Virtual Machines page.
Migrate multiples VMs on LA version solution within a particular Automation Account.
To onboard through Azure portal, follow these steps:
Sign in to the Azure portal and select your virtual machine
Under Operations , select Change tracking.
Select Configure with AMA and in the Configure with Azure monitor agent, provide the Log analytics workspace and select Migrate to initiate the deployment.
Select Switch to CT&I with AMA to evaluate the incoming events and logs across LA agent and AMA version.
Sign in to Azure portal and select your Automation account.
Under Configuration Management, select Change tracking and then select Configure with AMA.
On the Onboarding to Change Tracking with Azure Monitoring page, you can view your automation account and list of both Azure and Azure Arc machines that are currently on Log Analytics and ready to be onboarded to Azure Monitoring Agent of Change Tracking and inventory.
On the Assess virtual machines tab, select the machines and then select Next.
On Assign workspace tab, assign a new Log Analytics workspace resource ID to which the settings of AMA based solution should be stored and select Next.
On Review tab, you can review the machines that are being onboarded and the new workspace.
Select Migrate to initiate the deployment.
After a successful migration, select Switch to CT&I with AMA to compare both the LA and AMA experience.
Sign in to the Azure portal. Search for and select Machines-Azure Arc.
Select the specific Arc machine with Change Tracking V1 enabled that needs to be migrated to Change Tracking V2.
Select Migrate to Change Tracking with AMA and in the Configure with Azure monitor agent, provide the resource id in the Log analytics workspace and select Migrate to initiate the deployment.
Select Manage Activity log connection to evaluate the incoming events and logs across LA agent and AMA version.
Ensure you have Azure credentials to run Connect-AzAccount and Select-AzContext which set the script's context.
Follow these steps to migrate using scripts.
Migration guidance
Install the script and run it to conduct migrations. The script does the following:
It ensures the new workspace resource ID is different from the one associated with the Change Tracking and Inventory using the LA version.
It migrates the settings for the following data types:
Windows Services
Linux Files
Windows Files
Windows Registry
Linux Daemons
The script consists of the following Parameters that require an input from you.
Parameter
Required
Description
InputWorkspaceResourceId
Yes
Resource ID of the workspace associated with Change Tracking & Inventory with Log Analytics.
OutputWorkspaceResourceId
Yes
Resource ID of the workspace associated with Change Tracking & Inventory with Azure Monitoring Agent.
OutputDCRName
Yes
Custom name of the new DCR created.
OutputDCRLocation
Yes
Azure location of the output workspace ID.
OutputDCRTemplateFolderPath
Yes
Folder path where DCR templates are created.
A DCR template is generated when you run the above script and the template is available in OutputDCRTemplateFolderPath. You have to associate the new DCR to transfer the settings to the Change Tracking and Inventory using AMA.
Sign in to Azure portal and go to Monitor and under Settings, select Data Collection Rules.
Select the data collection rule that you have created in Step 1 from the listing page.
In the data collection rule page, under Configurations, select Resources and then select Add.
In the Select a scope, from Resource types, select Machines-Azure Arc that is connected to the subscription and then select Apply to associate the ctdcr created in Step 1 to the Arc-enabled machine and it will also install the Azure Monitoring Agent extension. For more information, see Enable Change Tracking and Inventory - for Arc-enabled VMs - using portal/CLI.
Install the Change Tracking extension as per the OS type for the Arc-enabled VM.
Linux
az connectedmachine extension create --name ChangeTracking-Linux --publisher Microsoft.Azure.ChangeTrackingAndInventory --type-handler-version 2.20 --type ChangeTracking-Linux --machine-name XYZ --resource-group XYZ-RG --location X --enable-auto-upgrade
Windows
az connectedmachine extension create --name ChangeTracking-Windows --publisher Microsoft.Azure.ChangeTrackingAndInventory --type-handler-version 2.20 --type ChangeTracking-Windows --machine-name XYZ --resource-group XYZ-RG --location X --enable-auto-upgrade
If the CT logs table schema does not exist, the script mentioned in Step 1 will fail. To troubleshoot, run the following script -
Compare data across Log analytics Agent and Azure Monitoring Agent version
After you complete the onboarding to Change tracking with AMA version, select Switch to CT with AMA on the landing page to switch across the two versions and compare the following events.
For example, if the onboarding to AMA version of service takes place after 3rd November at 6:00 a.m. You can compare the data by keeping consistent filters across parameters like Change Types, Time Range. You can compare incoming logs in Changes section and in the graphical section to be assured on data consistency.
Note
You must compare for the incoming data and logs after the onboarding to AMA version is done.
Obtain Log Analytics Workspace Resource ID
To obtain the Log Analytics Workspace resource ID, follow these steps:
100 VMs per Automation Account can be migrated in one instance.
Any VM with > 100 file/registry settings for migration via portal isn't supported now.
Arc VM migration isn't supported with portal, we recommend that you use PowerShell script migration.
For File Content changes-based settings, you have to migrate manually from LA version to AMA version of Change Tracking & Inventory. Follow the guidance listed in Track file contents.
Alerts that you configure using the Log Analytics Workspace must be manually configured.
For File Content changes-based settings, you must migrate manually from LA version to AMA version of Change Tracking & Inventory. Follow the guidance listed in Track file contents.
Any VM with > 100 file/registry settings for migration via Azure portal isn't supported.
Alerts that you configure using the Log Analytics Workspace must be manually configured.
Disable Change tracking using Log Analytics Agent
After you enable management of your virtual machines using Change Tracking and Inventory using Azure Monitoring Agent, you might decide to stop using Change Tracking & Inventory with LA agent version and remove the configuration from the account.