Skip to content

Commit d9739b2

Browse files
Merge pull request #281353 from bwren/dcr-policy
DCR associations
2 parents 69edbba + 7e6ec37 commit d9739b2

13 files changed

+129
-141
lines changed

articles/azure-monitor/agents/azure-monitor-agent-data-collection.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ When you create a DCR in the Azure portal, you're walked through a series of pag
6060

6161
## Create data collection rule
6262

63-
On the **Monitor** menu, select **Data Collection Rules** > **Create** to open the DCR creation page.
63+
> [!IMPORTANT]
64+
> Create your data collection rule in the same region as your destination Log Analytics workspace or Azure Monitor workspace. You can associate the data collection rule to machines or containers from any subscription or resource group in the tenant. To send data across tenants, you must first enable [Azure Lighthouse](../../lighthouse/overview.md).
65+
66+
67+
On the **Monitor** menu in the Azure portal, select **Data Collection Rules** > **Create** to open the DCR creation page.
6468

6569
:::image type="content" source="media/azure-monitor-agent-data-collection/create-data-collection-rule.png" lightbox="media/azure-monitor-agent-data-collection/create-data-collection-rule.png" alt-text="Screenshot that shows Create button for a new data collection rule.":::
6670

@@ -102,6 +106,9 @@ The **Collect and deliver** page allows you to add and configure data sources fo
102106

103107
A DCR can contain multiple different data sources up to a limit of 10 data sources in a single DCR. You can combine different data sources in the same DCR, but you will typically want to create different DCRs for different data collection scenarios. See [Best practices for data collection rule creation and management in Azure Monitor](../essentials/data-collection-rule-best-practices.md) for recommendations on how to organize your DCRs.
104108

109+
> [!NOTE]
110+
> It can take up to 5 minutes for data to be sent to the destinations when you create a data collection rule using the data collection rule wizard.
111+
105112
## Verify operation
106113
Once you've created a DCR and associated it with a machine, you can verify that the agent is operational and that data is being collected by running queries in the Log Analytics workspace.
107114

articles/azure-monitor/agents/azure-monitor-agent-policy.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,31 @@ ms.reviewer: jeffwo
1212

1313
# Use Azure Policy to install and manage the Azure Monitor agent
1414

15+
Using [Azure Policy](../../governance/policy/overview.md), you can have the Azure Monitor agent automatically installed on your existing and new virtual machines and have the appropriate DCRs automatically associated with them. This article describes the built-in policies and initiatives that you can leverage for this functionality and features of Azure Monitor to assist in managing them.
16+
1517
Use the following policies and policy initiatives to automatically install the agent and associate it with a data collection rule every time you create a virtual machine, scale set, or Azure Arc-enabled server.
1618

19+
> [!NOTE]
20+
> Azure Monitor has a preview [data collection rule DCR](../essentials/data-collection-rule-overview.md) experience that simplifies creating assignments for policies and initiatives that use DCRs. This includes initiatives that install the Azure Monitor agent. You may choose to use that experience to create assignments for the initiatives described in this article. See [Manage data collection rules (DCRs) and associations in Azure Monitor](../essentials/data-collection-rule-view.md#azure-policy) for more information.
21+
22+
## Prerequisites
23+
Before you proceed, review [prerequisites for agent installation](azure-monitor-agent-manage.md#prerequisites).
24+
1725
> [!NOTE]
1826
> As per Microsoft Identity best practices, policies for installing Azure Monitor Agent on virtual machines and scale sets rely on user-assigned managed identity. This option is the more scalable and resilient managed identity for these resources.
1927
> For Azure Arc-enabled servers, policies rely on system-assigned managed identity as the only supported option today.
2028
21-
## Built-in policy initiatives
2229

23-
Before you proceed, review [prerequisites for agent installation](azure-monitor-agent-manage.md#prerequisites).
30+
## Built-in policies
31+
32+
You can choose to use the individual policies from the preceding policy initiative to perform a single action at scale. For example, if you only want to automatically install the agent, use the second agent installation policy from the initiative, as shown.
33+
34+
:::image type="content" source="media/azure-monitor-agent-install/built-in-ama-dcr-policy.png" lightbox="media/azure-monitor-agent-install/built-in-ama-dcr-policy.png" alt-text="Partial screenshot from the Azure Policy Definitions page that shows policies contained within the initiative for configuring Azure Monitor Agent.":::
35+
36+
37+
38+
## Built-in policy initiatives
39+
2440

2541
There are built-in policy initiatives for Windows and Linux virtual machines, scale sets that provide at-scale onboarding using Azure Monitor agents end-to-end
2642
- [Deploy Windows Azure Monitor Agent with user-assigned managed identity-based auth and associate with Data Collection Rule](https://ms.portal.azure.com/#view/Microsoft_Azure_Policy/InitiativeDetailBlade/id/%2Fproviders%2FMicrosoft.Authorization%2FpolicySetDefinitions%2F0d1b56c6-6d1f-4a5d-8695-b15efbea6b49/scopes~/%5B%22%2Fsubscriptions%2Fae71ef11-a03f-4b4f-a0e6-ef144727c711%22%5D)
@@ -52,11 +68,7 @@ These initiatives above comprise individual policies that:
5268
- Assigning policy to resource groups. If the assignment scope of the policy is a resource group and not a subscription, the identity used by policy assignment (different from the user-assigned identity used by agent) must be manually granted [these roles](../../active-directory/managed-identities-azure-resources/how-to-assign-managed-identity-via-azure-policy.md#required-authorization) prior to assignment/remediation. Failing to do this step will result in *deployment failures*.
5369
- Other [Managed Identity limitations](../../active-directory/managed-identities-azure-resources/managed-identities-faq.md#limitations).
5470

55-
## Built-in policies
56-
57-
You can choose to use the individual policies from the preceding policy initiative to perform a single action at scale. For example, if you *only* want to automatically install the agent, use the second agent installation policy from the initiative, as shown.
5871

59-
:::image type="content" source="media/azure-monitor-agent-install/built-in-ama-dcr-policy.png" lightbox="media/azure-monitor-agent-install/built-in-ama-dcr-policy.png" alt-text="Partial screenshot from the Azure Policy Definitions page that shows policies contained within the initiative for configuring Azure Monitor Agent.":::
6072

6173
## Remediation
6274

@@ -67,6 +79,7 @@ When you create the assignment by using the Azure portal, you have the option of
6779
:::image type="content" source="media/azure-monitor-agent-install/built-in-ama-dcr-remediation.png" lightbox="media/azure-monitor-agent-install/built-in-ama-dcr-remediation.png" alt-text="Screenshot that shows initiative remediation for Azure Monitor Agent." border="false":::
6880

6981

82+
7083
## Next steps
7184

7285
[Create a data collection rule](./azure-monitor-agent-send-data-to-event-hubs-and-storage.md) to collect data from the agent and send it to Azure Monitor.

0 commit comments

Comments
 (0)