Edit

Share via


Create a data collection rule for Azure Change Tracking and Inventory

When you enable Change Tracking in the Azure portal by using the Azure Monitor Agent (AMA), the process automatically creates a data collection rule (DCR). This rule appears in the resource group with a name in the format ct-dcr-aaaaaaaaa. After the rule is created, add the required resources.

This article explains how to explicitly create a DCR for Azure Change Tracking and Inventory.

To enable Change Tracking and Inventory from the Azure portal, see Quickstart: Enable Azure Change Tracking and Inventory.

Note

You can associate only a single Change Tracking DCR with any resource. Any other Change Tracking DCRs are ignored.

Create a DCR

A DCR defines what data to collect from sources, how to transform it, and where to send it (like Azure Monitor Logs).

To create a DCR, follow these steps:

  1. Download the CtDcrCreation.json file on your machine.

  2. Sign in to the Azure portal. In the search bar, enter Deploy a custom template.

  3. On the Custom deployment pane, on the Select a template tab, select Build your own template in the editor.

    Screenshot that shows how to get started building a template.

  4. Select Save to proceed to the next tab.

  5. On the Basics tab, select Edit template > Load file to upload the CtDcrCreation.json file.

  6. Select Save.

  7. On the Basics tab, select the subscription and resource group where you want to deploy the DCR. The DCR name is optional.

    Screenshot that shows entering subscription and resource group details to deploy the DCR.

    Note

    • The resource group must be the same as the resource group associated with the Azure Monitor Logs workspace ID chosen here.
    • The name of your DCR must be unique in that resource group. Otherwise, the deployment overwrites the existing DCR.
    • The Azure Monitor Logs workspace resource ID specifies the Azure resource ID of the Azure Monitor Logs workspace used to store Change Tracking data.
    • The location of the workspace must be from one of the Change Tracking supported regions.
  8. Select Next : Review + create >.

  9. On the Review + create tab, select Create to initiate the deployment of CtDcrCreation.

  10. After the deployment finishes, select CtDcr-Deployment to see the DCR name. Use the resource ID of the newly created DCR for Change Tracking and Inventory deployment through policy.

    Screenshot that shows deployment notification.

After you create the DCR by using the AMA Change Tracking schema, ensure that you don't add any data sources to this rule. Adding data sources could cause Change Tracking and Inventory to fail. You must add only new resources in this section.