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/automation/change-tracking/change-tracking-data-collection-rule-creation.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
title: Script sample - Create a data collection rule in change tracking.
3
3
description: Learn about how to create a data collection rule
4
4
ms.topic: sample
5
-
ms.date: 06/28/2023
5
+
ms.date: 11/15/2024
6
6
author: SnehaSudhirG
7
7
ms.author: sudhirsneha
8
8
---
@@ -366,7 +366,7 @@ This script helps you to create a data collection rule in Change tracking and in
366
366
367
367
## Execute the script
368
368
369
-
Save the above script on your machine with a name as *CtDcrCreation.json*. For more information, see [Enable Change Tracking and Inventory using Azure Monitoring Agent (Preview)](enable-vms-monitoring-agent.md#enable-change-tracking-at-scale-using-azure-monitoring-agent).
369
+
Save the above script on your machine with a name as *CtDcrCreation.json*. For more information, see [Enable Change Tracking and Inventory using Azure Monitoring Agent](enable-vms-monitoring-agent.md#enable-change-tracking-at-scale-using-policy).
370
370
371
371
> [!NOTE]
372
372
> A reference JSON script to configure windows file settings:
# Enable Change Tracking and Inventory using Azure Monitoring Agent
@@ -22,7 +25,11 @@ This article describes how you can enable [Change Tracking and Inventory](overvi
22
25
23
26
## Enable Change Tracking and Inventory
24
27
25
-
This section provides detailed procedure on how you can enable change tracking on a single VM and multiple VMs.
28
+
::: zone pivot="single-portal"
29
+
30
+
### Enable change tracking and inventory for single VM from Azure portal
31
+
32
+
This section provides detailed procedure on how you can enable change tracking on a single Azure VM and Arc-enabled VM.
26
33
27
34
#### [Single Azure VM -portal](#tab/singlevm)
28
35
@@ -45,6 +52,30 @@ This section provides detailed procedure on how you can enable change tracking o
45
52
> - When you enable Change Tracking in the Azure portal using the Azure Monitoring Agent, the process automatically creates a Data Collection Rule (DCR). This rule will appear in the resource group with a name in the format ct-dcr-aaaaaaaaa. After the rule is created, add the required resources.
46
53
> - It usually takes up to two to three minutes to successfully onboard and enable the virtual machine(s). After you enable a virtual machine for change tracking, you can make changes to the files, registries, or software for the specific VM.
47
54
55
+
#### [Single Azure Arc VM - portal](#tab/singlearcvm)
56
+
57
+
1. Sign in to [Azure portal](https://portal.azure.com). Search for and select **Machines-Azure Arc**.
58
+
59
+
:::image type="content" source="media/enable-vms-monitoring-agent/select-arc-machines-portal.png" alt-text="Screenshot showing how to select Azure Arc machines from the portal." lightbox="media/enable-vms-monitoring-agent/select-arc-machines-portal.png":::
60
+
61
+
1. Select the Azure-Arc machine for which you want to enable Change Tracking.
62
+
1. Under **Operations**, select **Change tracking** to view the change tracking and inventory page.
63
+
1. In the **Stay up-to-date with all changes** layout, select **Enable using AMA agent (Recommended)** option and **Enable**.
64
+
65
+
:::image type="content" source="media/enable-vms-monitoring-agent/select-change-tracking-arc-vm.png" alt-text="Screenshot showing to select change tracking option for a single Azure arc virtual machine from the portal." lightbox="media/enable-vms-monitoring-agent/select-change-tracking-arc-vm.png":::
66
+
67
+
It will initiate the deployment and the notification appears on the top right corner of the screen.
68
+
69
+
---
70
+
71
+
:::zone-end
72
+
73
+
::: zone pivot="multiple-portal-cli"
74
+
75
+
### Enable change tracking and inventory for multiple VMs using Azure portal and Azure CLI
76
+
77
+
This section provides detailed procedure on how you can enable change tracking and inventory on multiple Azure VMs and Azure Arc-enabled VMs.
1. Sign in to [Azure portal](https://portal.azure.com) and navigate to **Virtual machines**.
@@ -69,22 +100,6 @@ This section provides detailed procedure on how you can enable change tracking o
69
100
1. Select **Enable** to initiate the deployment.
70
101
1. A notification appears on the top right corner of the screen indicating the status of deployment.
71
102
72
-
73
-
#### [Single Azure Arc VM - portal](#tab/singlearcvm)
74
-
75
-
1. Sign in to [Azure portal](https://portal.azure.com). Search for and select **Machines-Azure Arc**.
76
-
77
-
:::image type="content" source="media/enable-vms-monitoring-agent/select-arc-machines-portal.png" alt-text="Screenshot showing how to select Azure Arc machines from the portal." lightbox="media/enable-vms-monitoring-agent/select-arc-machines-portal.png":::
78
-
79
-
1. Select the Azure-Arc machine for which you want to enable Change Tracking.
80
-
1. Under **Operations**, select **Change tracking** to view the change tracking and inventory page.
81
-
1. In the **Stay up-to-date with all changes** layout, select **Enable using AMA agent (Recommended)** option and **Enable**.
82
-
83
-
:::image type="content" source="media/enable-vms-monitoring-agent/select-change-tracking-arc-vm.png" alt-text="Screenshot showing to select change tracking option for a single Azure arc virtual machine from the portal." lightbox="media/enable-vms-monitoring-agent/select-change-tracking-arc-vm.png":::
84
-
85
-
It will initiate the deployment and the notification appears on the top right corner of the screen.
86
-
87
-
88
103
#### [Arc-enabled VMs - portal/CLI](#tab/arcvms)
89
104
90
105
To enable the Change Tracking and Inventory on Arc-enabled servers, ensure that the custom Change Tracking Data collection rule is associated to the Arc-enabled VMs.
@@ -119,9 +134,13 @@ Follow these steps to associate the data collection rule to the Arc-enabled VMs:
119
134
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
120
135
```
121
136
---
137
+
:::zone-end
122
138
139
+
::: zone pivot="at-scale-policy"
123
140
124
-
## Enable Change Tracking at scale using Azure Monitoring Agent
141
+
### Enable Change Tracking at scale using policy
142
+
143
+
This section provides detailed procedure on how you can enable change tracking and inventory at scale using policy.
125
144
126
145
### Prerequisite
127
146
- You must [create the Data collection rule](#create-data-collection-rule).
@@ -173,15 +192,17 @@ Using the Deploy if not exist (DINE) policy, you can enable Change tracking with
173
192
1. Provide the **Data Collection Rule Resource id**. Learn more on [how to obtain the Data Collection Rule Resource ID after you create the Data collection rule](#create-data-collection-rule).
174
193
1. Select **Review + create**.
175
194
195
+
:::zone-end
176
196
177
197
### Create data collection rule
198
+
178
199
1. Download [CtDcrCreation.json](change-tracking-data-collection-rule-creation.md) file on your machine.
179
200
1. Go to Azure portal and in the search, enter *Deploy a custom template*.
180
201
1. In the **Custom deployment** page > **select a template**, select **Build your own template in the editor**.
181
202
:::image type="content" source="media/enable-vms-monitoring-agent/build-template.png" alt-text="Screenshot to get started with building a template.":::
182
203
1. In the **Edit template**, select **Load file** to upload the *CtDcrCreation.json* file.
183
204
1. Select **Save**.
184
-
1. In the **Custom deployment** > **Basics** tab, provide **Subscription** and **Resource group** where you want to deploy the Data Collection Rule. The **Data Collection Rule Name** is optional. The resource group must be same as the resource group associated with the Log Analytic workspace id chosen here.
205
+
1. In the **Custom deployment** > **Basics** tab, provide **Subscription** and **Resource group** where you want to deploy the Data Collection Rule. The **Data Collection Rule Name** is optional. The resource group must be same as the resource group associated with the Log Analytic workspace ID chosen here.
185
206
186
207
:::image type="content" source="media/enable-vms-monitoring-agent/build-template-basics.png" alt-text="Screenshot to provide subscription and resource group details to deploy data collection rule.":::
0 commit comments