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/azure-monitor/essentials/diagnostics-settings-policies-deployifnotexists.md
+11-13Lines changed: 11 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,9 @@ ms.reviewer: lualderm
13
13
Policies and policy initiatives provide a simple method to enable logging at-scale via diagnostics settings for Azure Monitor. Using a policy initiative, you can turn on audit logging for all [supported resources](#supported-resources) in your Azure environment.
14
14
15
15
Enable resource logs to track activities and events that take place on your resources and give you visibility and insights into any changes that occur.
16
-
Assign policies to enable resource logs and to send them to destinations according to your needs. Send logs to Event Hubs for third-party SIEM systems, enabling continuous security operations. Send logs to storage accounts for longer term storage or the fulfillment of regulatory compliance.
16
+
Assign policies to enable resource logs and to send them to destinations according to your needs. Send logs to event hubs for third-party SIEM systems, enabling continuous security operations. Send logs to storage accounts for longer term storage or the fulfillment of regulatory compliance.
17
17
18
-
A set of built-in policies and initiatives exists to direct resource logs to Log Analytics Workspaces, Event Hubs, and Storage Accounts. The policies enable audit logging, sending logs belonging to the **audit** log category group to an Event Hub, Log Analytics workspace or Storage Account. The policies' `effect` is `DeployIfNotExists`, which deploys the policy as a default if there aren't other settings defined.
18
+
A set of built-in policies and initiatives exists to direct resource logs to Log Analytics Workspaces, Event Hubs, and Storage Accounts. The policies enable audit logging, sending logs belonging to the **audit** log category group to an event hub, Log Analytics workspace or Storage Account. The policies' `effect` is `DeployIfNotExists`, which deploys the policy as a default if there aren't other settings defined.
19
19
20
20
21
21
## Deploy policies.
@@ -31,7 +31,7 @@ The following steps show how to apply the policy to send audit logs to for key v
31
31
1. Select **Monitoring** from the Category dropdown
32
32
1. Enter *keyvault* in the **Search** field.
33
33
1. Select the **Enable logging by category group for Key vaults (microsoft.keyvault/vaults) to Log Analytics** policy,
34
-
:::image type="content" source="./media/diagnostics-settings-policies-deployifnotexists/policy-definitions.png" alt-text="A screenshot of the policy definitions page.":::
34
+
:::image type="content" source="./media/diagnostics-settings-policies-deployifnotexists/policy-definitions.png" lightbox="./media/diagnostics-settings-policies-deployifnotexists/policy-definitions.png" alt-text="A screenshot of the policy definitions page.":::
35
35
1. From the policy definition page, select **Assign**
36
36
1. Select the **Parameters** tab.
37
37
1. Select the Log Analytics Workspace that you want to send the audit logs to.
@@ -78,7 +78,7 @@ Find the role in the policy definition by searching for *roleDefinitionIds*
When assigning policies that send logs to Event Hubs, you must manually add the *Azure Event Hubs Data Owner* permissions for the event hub to your policy assigned identity.
81
+
When assigning policies that send logs to event hubs, you must manually add the *Azure Event Hubs Data Owner* role for the event hub to your policy assigned identity.
82
82
83
83
```azurecli
84
84
az role assignment create --assignee <Principal ID> --role "Azure Event Hubs Data Owner" --scope /subscriptions/<subscription ID>/resourceGroups/<event hub's resource group>
@@ -137,7 +137,7 @@ To apply a policy using the PowerShell, use the following commands:
1. When assigning policies that send logs to Event Hubs, you must manually add the *Azure Event Hubs Data Owner* permissions for the event hub to your system assigned Managed Identity.
140
+
When assigning policies that send logs to event hubs, you must manually add the *Azure Event Hubs Data Owner* role for the event hub to your system assigned Managed Identity.
@@ -154,8 +154,8 @@ To apply a policy using the PowerShell, use the following commands:
154
154
```
155
155
---
156
156
157
-
> [!Important]
158
-
> When assigning policies that send logs to Event Hubs, you must manually add the *Azure Event Hubs Data Owner*permissions for the event hub to your policy assigned identity.
157
+
> [!Note]
158
+
> When assigning policies that send logs to event hubs, you must manually add the *Azure Event Hubs Data Owner*role for the event hub to your policy assigned identity.
159
159
> Use the `az role assignment create` Azure CLI command.
160
160
> ```azurecli
161
161
> az role assignment create --assignee <Principal ID> --role "Azure Event Hubs Data Owner" --scope /subscriptions/<subscription ID>/resourceGroups/<event hub's resource group>
@@ -166,11 +166,9 @@ To apply a policy using the PowerShell, use the following commands:
166
166
>```
167
167
>
168
168
> Find your principal ID on the **Policy Assignment** page, **Managed Identity** tab.
Policies are applied to new resources when they're created. To apply a policy to existing resources, create a remediation task. Remediation tasks bring resources into compliance with a policy.
@@ -387,13 +385,13 @@ The following table describes the common parameters for each set of policies.
387
385
388
386
### Event Hubs policy parameters
389
387
390
-
This policy deploys a diagnostic setting using a category group to route logs to an Event Hub.
388
+
This policy deploys a diagnostic setting using a category group to route logs to an event hub.
391
389
392
390
|Parameter| Description| Valid Values|Default|
393
391
|---|---|---|---|
394
392
|resourceLocation|Resource Location must be the same location as the event hub Namespace|Supported locations||
395
-
|eventHubAuthorizationRuleId|Event Hub Authorization Rule ID. The authorization rule is at event hub namespace level. For example, /subscriptions/{subscription ID}/resourceGroups/{resource group}/providers/Microsoft.EventHub/namespaces/{Event Hub namespace}/authorizationrules/{authorization rule}|||
396
-
|eventHubName|Event Hub Name||Monitoring|
393
+
|eventHubAuthorizationRuleId|Event hub Authorization Rule ID. The authorization rule is at event hub namespace level. For example, /subscriptions/{subscription ID}/resourceGroups/{resource group}/providers/Microsoft.EventHub/namespaces/{Event Hub namespace}/authorizationrules/{authorization rule}|||
0 commit comments