Skip to content

Commit cd48505

Browse files
authored
Merge pull request #274147 from halkazwini/nw-policy
Add screenshot
2 parents 88e48b1 + 3462624 commit cd48505

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed
57.4 KB
Loading
-18 Bytes
Loading
181 KB
Loading

articles/network-watcher/vnet-flow-logs-policy.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: halkazwini
66
ms.author: halkazwini
77
ms.service: network-watcher
88
ms.topic: how-to
9-
ms.date: 05/01/2024
9+
ms.date: 05/02/2024
1010
---
1111

1212
# 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
2626

2727
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.
2828

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:
3030

3131
1. Sign in to the [Azure portal](https://portal.azure.com).
3232

@@ -66,7 +66,10 @@ To audit your flow logs using the built-in policy, take the following steps:
6666

6767
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.
6868

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:
7073

7174
1. Sign in to the [Azure portal](https://portal.azure.com).
7275

@@ -126,7 +129,15 @@ To assign the *deployIfNotExists* policy:
126129

127130
:::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":::
128131

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":::
130141

131142
## Related content
132143

0 commit comments

Comments
 (0)