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
title: 'Quickstart: Configure Network Watcher network security group flow logs using a Bicep file'
3
-
description: Learn how to enable network security group (NSG) flow logs programmatically using Bicep and Azure PowerShell.
4
-
services: network-watcher
2
+
title: 'Quickstart: Configure NSG flow logs using a Bicep file'
3
+
titleSuffix: Azure Network Watcher
4
+
description: In this quickstart, you learn how to enable NSG flow logs programmatically using a Bicep file to log the traffic flowing through a network security group.
#CustomerIntent: As an Azure administrator, I need to enable NSG flow logs using a Bicep file so that I can log the traffic flowing through a network security group.
12
13
---
13
14
14
-
# Quickstart: Configure network security group flow logs using a Bicep file
15
+
# Quickstart: Configure Azure Network Watcher NSG flow logs using a Bicep file
15
16
16
-
In this quickstart, you learn how to enable [network security group (NSG) flow logs](network-watcher-nsg-flow-logging-overview.md) by using a Bicep file
17
+
In this quickstart, you learn how to enable [NSG flow logs](network-watcher-nsg-flow-logging-overview.md) using a Bicep file
We start with an overview of the properties of the NSG flow log object. We provide a sample Bicep file. Then, we deploy the Bicep file.
21
-
22
21
## Prerequisites
23
22
24
-
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
23
+
- An Azure account with an active subscription. If you don't have one, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
24
+
25
+
- To deploy the Bicep files, either Azure CLI or PowerShell installed.
26
+
27
+
# [CLI](#tab/cli)
28
+
29
+
1.[Install Azure CLI locally](/cli/azure/install-azure-cli) to run the commands.
30
+
31
+
1. Sign in to Azure using the [az login](/cli/azure/reference-index#az-login) command.
32
+
33
+
# [PowerShell](#tab/powershell)
34
+
35
+
1.[Install Azure PowerShell locally](/powershell/azure/install-azure-powershell) to run the cmdlets.
36
+
37
+
1. Sign in to Azure using the [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount) cmdlet.
38
+
39
+
---
25
40
26
41
## Review the Bicep file
27
42
28
-
The Bicep file that we use in this quickstart is from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/networkwatcher-flowlogs-create/).
43
+
This quickstart uses the [Create NSG flow logs](https://github.com/Azure/azure-quickstart-templates/blob/master/quickstarts/microsoft.network/networkwatcher-flowLogs-create/main.bicep) Bicep template from [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/networkwatcher-flowlogs-create/).
@@ -75,25 +90,28 @@ You have two options to see whether your deployment succeeded:
75
90
- Your console shows `ProvisioningState` as `Succeeded`.
76
91
- Go to the [NSG flow logs portal page](https://portal.azure.com/#blade/Microsoft_Azure_Network/NetworkWatcherMenuBlade/flowLogs) to confirm your changes.
77
92
78
-
If there were issues with the deployment, see [Troubleshoot common Azure deployment errors with Azure Resource Manager](../azure-resource-manager/troubleshooting/common-deployment-errors.md).
93
+
If there are issues with the deployment, see [Troubleshoot common Azure deployment errors with Azure Resource Manager](../azure-resource-manager/troubleshooting/common-deployment-errors.md).
79
94
80
95
## Clean up resources
81
96
82
-
You can delete Azure resources by using complete deployment mode. To delete a flow logs resource, specify a deployment in complete mode without including the resource you want to delete. Read more about [complete deployment mode](../azure-resource-manager/templates/deployment-modes.md#complete-mode).
97
+
You can delete Azure resources using complete deployment mode. To delete a flow logs resource, specify a deployment in complete mode without including the resource you want to delete. Read more about [complete deployment mode](../azure-resource-manager/templates/deployment-modes.md#complete-mode).
83
98
84
99
You also can disable an NSG flow log in the Azure portal:
85
100
86
101
1. Sign in to the Azure portal.
87
-
1. Select **All services**. In the **Filter** box, enter **network watcher**. In the search results, select **Network Watcher**.
88
-
1. Under **Logs**, select **NSG flow logs**.
89
-
1. In the list of NSGs, select the NSG for which you want to disable flow logs.
90
-
1. Under **Flow logs settings**, select **Off**.
91
-
1. Select **Save**.
92
102
93
-
## Next steps
103
+
1. In the search box at the top of the portal, enter ***network watcher***. Select **Network Watcher** from the search results.
104
+
105
+
1. Under **Logs**, select **Flow logs**.
106
+
107
+
1. In the list of flow logs, select the flow log that you want to disable.
108
+
109
+
1. Select **Disable**.
110
+
111
+
## Related content
94
112
95
-
In this quickstart, you learned how to enable NSG flow logs by using a Bicep file. Next, learn how to visualize your NSG flow data by using one of these options:
113
+
To learn how to visualize your NSG flow logs data, see:
96
114
97
-
- [Microsoft Power BI](network-watcher-visualize-nsg-flow-logs-power-bi.md)
0 commit comments