Skip to content

Commit fd86075

Browse files
Merge pull request #296379 from halkazwini/nw-vnetflow2
Corrections
2 parents cfc34a1 + b6e50cb commit fd86075

File tree

1 file changed

+31
-32
lines changed

1 file changed

+31
-32
lines changed

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

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In this article, you learn how to create, change, enable, disable, or delete a v
2121

2222
# [**Portal**](#tab/portal)
2323

24-
An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
24+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2525

2626
- Insights provider. For more information, see [Register Insights provider](#register-insights-provider).
2727

@@ -190,39 +190,38 @@ Use [New-AzNetworkWatcherFlowLog](/powershell/module/az.network/new-aznetworkwat
190190
191191
Use [az network watcher flow-log create](/cli/azure/network/watcher/flow-log#az-network-watcher-flow-log-create) command to create a virtual network flow log.
192192
193-
### Enable virtual network flow logs without traffic analytics
194-
195-
```azurecli-interactive
196-
# Create a VNet flow log.
197-
az network watcher flow-log create --location 'eastus' --resource-group 'myResourceGroup' --name 'myVNetFlowLog' --vnet 'myVNet' --storage-account 'myStorageAccount'
198-
```
199-
200-
```azurecli-interactive
201-
# Create a VNet flow log (storage account is in a different resource group from the virtual network).
202-
az network watcher flow-log create --location 'eastus' --resource-group 'myResourceGroup' --name 'myVNetFlowLog' --vnet 'myVNet' --storage-account '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/StorageRG/providers/Microsoft.Storage/storageAccounts/myStorageAccount'
203-
```
204-
205-
### Enable virtual network flow logs and traffic analytics
206-
207-
```azurecli-interactive
208-
# Create a traffic analytics workspace.
209-
az monitor log-analytics workspace create --name 'myWorkspace' --resource-group 'myResourceGroup' --location 'eastus'
193+
- Enable virtual network flow logs without traffic analytics
210194
211-
# Create a VNet flow log.
212-
az network watcher flow-log create --location 'eastus' --name 'myVNetFlowLog' --resource-group 'myResourceGroup' --vnet 'myVNet' --storage-account 'myStorageAccount' --traffic-analytics true --workspace 'myWorkspace' --interval 10
213-
```
195+
```azurecli-interactive
196+
# Create a VNet flow log.
197+
az network watcher flow-log create --location 'eastus' --resource-group 'myResourceGroup' --name 'myVNetFlowLog' --vnet 'myVNet' --storage-account 'myStorageAccount'
198+
```
199+
200+
```azurecli-interactive
201+
# Create a VNet flow log (storage account is in a different resource group from the virtual network).
202+
az network watcher flow-log create --location 'eastus' --resource-group 'myResourceGroup' --name 'myVNetFlowLog' --vnet 'myVNet' --storage-account '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/StorageRG/providers/Microsoft.Storage/storageAccounts/myStorageAccount'
203+
```
214204
215-
```azurecli-interactive
216-
# Create a traffic analytics workspace.
217-
az monitor log-analytics workspace create --name 'myWorkspace' --resource-group 'myResourceGroup' --location 'eastus'
205+
- Enable virtual network flow logs and traffic analytics
218206
219-
# Create a VNet flow log (storage account and traffic analytics workspace are in different resource groups from the virtual network).
220-
az network watcher flow-log create --location 'eastus' --name 'myVNetFlowLog' --resource-group 'myResourceGroup' --vnet 'myVNet' --storage-account '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/StorageRG/providers/Microsoft.Storage/storageAccounts/myStorageAccount' --traffic-analytics true --workspace '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/WorkspaceRG/providers/Microsoft.OperationalInsights/workspaces/myWorkspace' --interval 10
221-
```
207+
```azurecli-interactive
208+
# Create a traffic analytics workspace.
209+
az monitor log-analytics workspace create --name 'myWorkspace' --resource-group 'myResourceGroup' --location 'eastus'
210+
211+
# Create a VNet flow log.
212+
az network watcher flow-log create --location 'eastus' --name 'myVNetFlowLog' --resource-group 'myResourceGroup' --vnet 'myVNet' --storage-account 'myStorageAccount' --traffic-analytics true --workspace 'myWorkspace' --interval 10
213+
```
214+
215+
```azurecli-interactive
216+
# Create a traffic analytics workspace.
217+
az monitor log-analytics workspace create --name 'myWorkspace' --resource-group 'myResourceGroup' --location 'eastus'
218+
219+
# Create a VNet flow log (storage account and traffic analytics workspace are in different resource groups from the virtual network).
220+
az network watcher flow-log create --location 'eastus' --name 'myVNetFlowLog' --resource-group 'myResourceGroup' --vnet 'myVNet' --storage-account '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/StorageRG/providers/Microsoft.Storage/storageAccounts/myStorageAccount' --traffic-analytics true --workspace '/subscriptions/aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e/resourceGroups/WorkspaceRG/providers/Microsoft.OperationalInsights/workspaces/myWorkspace' --interval 10
221+
```
222222
223223
---
224224
225-
226225
## Enable or disable traffic analytics
227226
228227
Enable traffic analytics for a flow log to analyze the flow log data. Traffic analytics provides insights into the traffic patterns of your virtual network. You can enable or disable traffic analytics for a flow log at any time.
@@ -276,6 +275,7 @@ $workspace = Get-AzOperationalInsightsWorkspace -Name 'myWorkspace' -ResourceGro
276275
277276
# Update the VNet flow log.
278277
Set-AzNetworkWatcherFlowLog -Enabled $true -Name 'myVNetFlowLog' -NetworkWatcherName 'NetworkWatcher_eastus' -ResourceGroupName 'NetworkWatcherRG' -StorageId $storageAccount.Id -TargetResourceId $vnet.Id -FormatVersion 2 -EnableTrafficAnalytics -TrafficAnalyticsWorkspaceId $workspace.ResourceId -TrafficAnalyticsInterval 10
278+
```
279279

280280
To disable traffic analytics on the flow log resource and continue to generate and save virtual network flow logs to storage account, use [Set-AzNetworkWatcherFlowLog](/powershell/module/az.network/set-aznetworkwatcherflowlog) cmdlet.
281281

@@ -295,7 +295,6 @@ Set-AzNetworkWatcherFlowLog -Enabled $true -Name 'myVNetFlowLog' -NetworkWatcher
295295
To enable traffic analytics on a flow log resource, use [az network watcher flow-log update](/cli/azure/network/watcher/flow-log#az-network-watcher-flow-log-update) command.
296296

297297
```azurecli-interactive
298-
299298
# Update the VNet flow log.
300299
az network watcher flow-log update --location 'eastus' --name 'myVNetFlowLog' --resource-group 'myResourceGroup' --vnet 'myVNet' --storage-account 'myStorageAccount' --traffic-analytics true --workspace 'myWorkspace' --interval 10
301300
```
@@ -407,7 +406,7 @@ You can download the flow logs data from the storage account that you saved the
407406
408407
# [**PowerShell**](#tab/powershell)
409408
410-
To download virtual network flow logs from your storage account, use [Get-AzStorageBlobContent](/powershell/module/az.storage/get-azstorageblobcontent) cmdlet.
409+
To download virtual network flow logs from your storage account, use [Get-AzStorageBlobContent](/powershell/module/az.storage/get-azstorageblobcontent) cmdlet. For more information, see [Download a blob](../storage/blobs/storage-quickstart-blobs-powershell.md#download-blobs).
411410
412411
Virtual network flow log files are saved to the storage account at the following path:
413412
@@ -417,7 +416,7 @@ https://{storageAccountName}.blob.core.windows.net/insights-logs-flowlogfloweven
417416
418417
# [**Azure CLI**](#tab/cli)
419418
420-
To download virtual network flow logs from your storage account, use the [az storage blob download](/cli/azure/storage/blob#az-storage-blob-download) command.
419+
To download virtual network flow logs from your storage account, use the [az storage blob download](/cli/azure/storage/blob#az-storage-blob-download) command. For more information, see [Download a blob](../storage/blobs/storage-quickstart-blobs-cli.md#download-a-blob).
421420
422421
Virtual network flow log files are saved to the storage account at the following path:
423422
@@ -428,7 +427,7 @@ https://{storageAccountName}.blob.core.windows.net/insights-logs-flowlogfloweven
428427
---
429428
430429
> [!NOTE]
431-
> As an alternative way to access and download flow logs from your storage account, you can use Azure Storage Explorer. For more information, see [Get started with Storage Explorer](../storage/storage-explorer/vs-azure-tools-storage-manage-with-storage-explorer.md).
430+
> As an alternative way to access and download flow logs from your storage account, you can use Azure Storage Explorer. For more information, see [Get started with Storage Explorer](../storage/storage-explorer/vs-azure-tools-storage-manage-with-storage-explorer.md) and [Download blobs using Storage Explorer](../storage/blobs/quickstart-storage-explorer.md#download-blobs).
432431
433432
For information about the structure of a flow log, see [Log format of virtual network flow logs](vnet-flow-logs-overview.md#log-format).
434433

0 commit comments

Comments
 (0)