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/network-watcher/vnet-flow-logs-policy.md
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: halkazwini
6
6
ms.author: halkazwini
7
7
ms.service: network-watcher
8
8
ms.topic: how-to
9
-
ms.date: 05/01/2024
9
+
ms.date: 05/02/2024
10
10
---
11
11
12
12
# Manage virtual network flow logs using Azure Policy
@@ -26,7 +26,7 @@ In this article, you learn how to use two built-in policies to manage your setup
26
26
27
27
The **Audit flow logs configuration for every virtual network** policy audits all existing virtual networks in a scope by checking all Azure Resource Manager objects of type `Microsoft.Network/virtualNetwork` for linked flow logs via the flow log property of the virtual network. It then flags any virtual network that doesn't have flow logging enabled.
28
28
29
-
To audit your flow logs using the built-in policy, take the following steps:
29
+
To audit your flow logs using the built-in policy, follow these steps:
30
30
31
31
1. Sign in to the [Azure portal](https://portal.azure.com).
32
32
@@ -66,7 +66,10 @@ To audit your flow logs using the built-in policy, take the following steps:
66
66
67
67
The **Deploy a flow log resource with target virtual network** policy checks all existing virtual networks in a scope by checking all Azure Resource Manager objects of type `Microsoft.Network/networkSecurityGroups`. It then checks for linked flow logs via the flow log property of the virtual network. If the property doesn't exist, the policy deploys a flow log.
68
68
69
-
To assign the *deployIfNotExists* policy:
69
+
> [!IMPORTANT]
70
+
> We recommend disabling network security group flow logs before enabling virtual network flow logs on the same underlying workloads to avoid duplicate traffic recording and additional costs. For example, if you enable network security group flow logs on the network security group of a subnet, then you enable virtual network flow logs on the same subnet or parent virtual network, you might get duplicate logging (both network security group flow logs and virtual network flow logs generated for all supported workloads in that particular subnet).
71
+
72
+
To assign the *deployIfNotExists* policy, follow these steps:
70
73
71
74
1. Sign in to the [Azure portal](https://portal.azure.com).
72
75
@@ -126,7 +129,15 @@ To assign the *deployIfNotExists* policy:
126
129
127
130
:::image type="content" source="./media/vnet-flow-logs-policy/deploy-policy-compliance-details.png" alt-text="Screenshot that shows the noncompliant virtual networks based on the deploy policy." lightbox="./media/vnet-flow-logs-policy/deploy-policy-compliance-details.png":::
128
131
129
-
1. Leave the policy run to evaluate and deploy flow logs for all noncompliant virtual networks. It will deploy flow logs for all noncompliant virtual networks in the specified scope.
132
+
The policy takes some time to evaluate and deploy flow logs for all noncompliant virtual networks in the specified scope.
133
+
134
+
1. Verify that there are no noncompliant virtual networks in the policy compliance page.
135
+
136
+
:::image type="content" source="./media/vnet-flow-logs-policy/deploy-policy-compliance-details-compliant.png" alt-text="Screenshot that shows there aren't any noncompliant virtual networks after the deployment policy deployed flow logs in the defined scope." lightbox="./media/vnet-flow-logs-policy/deploy-policy-compliance-details-compliant.png":::
137
+
138
+
You can view the deployed virtual network flow logs by going to **Flow logs** under **Logs** in **Network Watcher**.
139
+
140
+
:::image type="content" source="./media/vnet-flow-logs-policy/flow-logs.png" alt-text="Screenshot that shows the flow logs list in Network Watcher." lightbox="./media/vnet-flow-logs-policy/flow-logs.png":::
0 commit comments