Skip to content

Commit e39f0be

Browse files
committed
updates
1 parent 8cd169d commit e39f0be

File tree

1 file changed

+15
-41
lines changed

1 file changed

+15
-41
lines changed

articles/network-watcher/network-watcher-nsg-flow-logging-overview.md

Lines changed: 15 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: halkazwini
66
author: halkazwini
77
ms.service: network-watcher
88
ms.topic: concept-article
9-
ms.date: 02/07/2024
9+
ms.date: 02/15/2024
1010

1111
#CustomerIntent: As an Azure administrator, I want to learn about NSG flow logs so that I can log my network traffic to analyze and optimize the network performance.
1212
---
@@ -399,68 +399,42 @@ Here's an example bandwidth calculation for flow tuples from a TCP conversation
399399

400400
For continuation (`C`) and end (`E`) flow states, byte and packet counts are aggregate counts from the time of the previous flow's tuple record. In the example conversation, the total number of packets transferred is 1021+52+8005+47 = 9125. The total number of bytes transferred is 588096+29952+4610880+27072 = 5256000.
401401

402-
## Enabling NSG flow logs
402+
## Managing NSG flow logs
403403

404-
For more information about enabling flow logs, see the following guides:
404+
To learn how to create, change, disable, or delete NSG flow logs, see one of the following guides:
405405

406406
- [Azure portal](./nsg-flow-logging.md)
407407
- [PowerShell](./network-watcher-nsg-flow-logging-powershell.md)
408408
- [Azure CLI](./network-watcher-nsg-flow-logging-cli.md)
409409
- [REST API](./network-watcher-nsg-flow-logging-rest.md)
410410
- [Azure Resource Manager](./network-watcher-nsg-flow-logging-azure-resource-manager.md)
411411

412-
## Updating parameters
413-
414-
On the Azure portal:
415-
416-
1. Go to the **NSG flow logs** section in Network Watcher.
417-
1. Select the name of the network security group.
418-
1. On the settings pane for the NSG flow log, change the parameters that you want.
419-
1. Select **Save** to deploy the changes.
420-
421-
To update parameters via command-line tools, use the same command that you used to enable flow logs.
422-
423412
## Working with flow logs
424413

425414
### Read and export flow logs
426415

416+
To learn how to read and export NSG flow logs, see one of the following guides:
417+
427418
- [Download and view flow logs from the portal](./nsg-flow-logging.md#download-a-flow-log)
428419
- [Read flow logs by using PowerShell functions](./network-watcher-read-nsg-flow-logs.md)
429420
- [Export NSG flow logs to Splunk](https://www.splunk.com/en_us/blog/platform/splunking-azure-nsg-flow-logs.html)
430421

431-
NSG flow logs target network security groups and aren't displayed the same way as the other logs. NSG flow logs are stored only in a storage account and follow the logging path shown in the following example:
422+
NSG flow log files are stored only in a storage account at the following path:
432423

433424
```
434425
https://{storageAccountName}.blob.core.windows.net/insights-logs-networksecuritygroupflowevent/resourceId=/SUBSCRIPTIONS/{subscriptionID}/RESOURCEGROUPS/{resourceGroupName}/PROVIDERS/MICROSOFT.NETWORK/NETWORKSECURITYGROUPS/{nsgName}/y={year}/m={month}/d={day}/h={hour}/m=00/macAddress={macAddress}/PT1H.json
435426
```
436427

437428
### Visualize flow logs
438429

430+
To learn how to visualize NSG flow logs, see one of the following guides:
431+
439432
- [Visualize NSG flow logs using Network Watcher traffic analytics](./traffic-analytics.md)
440433
- [Visualize NSG flow logs using Power BI](./network-watcher-visualize-nsg-flow-logs-power-bi.md)
441434
- [Visualize NSG flow logs using Elastic Stack](./network-watcher-visualize-nsg-flow-logs-open-source-tools.md)
442435
- [Manage and analyze NSG flow logs using Grafana](./network-watcher-nsg-grafana.md)
443436
- [Manage and analyze NSG flow logs using Graylog](./network-watcher-analyze-nsg-flow-logs-graylog.md)
444437

445-
### Disable flow logs
446-
447-
When you disable an NSG flow log, you stop the flow logging for the associated network security group. But the flow log continues to exist as a resource, with all its settings and associations. You can enable it anytime to begin flow logging on the configured network security group.
448-
449-
You can disable a flow log using the [Azure portal](nsg-flow-logging.md#disable-a-flow-log), [PowerShell](network-watcher-nsg-flow-logging-powershell.md#disable-a-flow-log), the [Azure CLI](network-watcher-nsg-flow-logging-cli.md#disable-a-flow-log), or the [REST API](/rest/api/network-watcher/flow-logs/create-or-update).
450-
451-
For steps to disable and enable NSG flow logs, see [Configure NSG flow logs](./network-watcher-nsg-flow-logging-powershell.md).
452-
453-
### Delete flow logs
454-
455-
When you delete an NSG flow log, you not only stop the flow logging for the associated network security group but also delete the flow log resource (with all its settings and associations). To begin flow logging again, you must create a new flow log resource for that network security group.
456-
457-
You can delete a flow log using the [Azure portal](nsg-flow-logging.md#delete-a-flow-log), [PowerShell](network-watcher-nsg-flow-logging-powershell.md#delete-a-flow-log), the [Azure CLI](network-watcher-nsg-flow-logging-cli.md#delete-a-flow-log), or the [REST API](/rest/api/network-watcher/flow-logs/delete).
458-
459-
When you delete a network security group, the associated flow log resource is deleted by default.
460-
461-
> [!NOTE]
462-
> To move a network security group to a different resource group or subscription, you must delete the associated flow logs. Just disabling the flow logs won't work. After you migrate a network security group, you must re-create the flow logs to enable flow logging on it.
463-
464438
## Considerations for NSG flow logs
465439

466440
### Storage account
@@ -474,20 +448,18 @@ When you delete a network security group, the associated flow log resource is de
474448

475449
NSG flow logging is billed on the volume of logs produced. High traffic volume can result in large flow-log volume which increases the associated costs.
476450

477-
NSG flow log pricing doesn't include the underlying costs of storage. Using the retention policy feature with NSG flow logs means incurring separate storage costs for extended periods of time.
478-
479-
If you want to retain data forever and don't want to apply a retention policy, set retention days to 0. For more information, see [Network Watcher Pricing](https://azure.microsoft.com/pricing/details/network-watcher/) and [Azure Storage Pricing](https://azure.microsoft.com/pricing/details/storage/blobs/).
451+
NSG flow log pricing doesn't include the underlying costs of storage. Retaining NSG flow logs data forever or using the retention policy feature means incurring storage costs for extended periods of time.
480452

481453
### Non-default inbound TCP rules
482454

483455
Network security groups are implemented as a [stateful firewall](https://en.wikipedia.org/wiki/Stateful_firewall?oldformat=true). But because of current platform limitations, network security group non-default security rules that affect inbound TCP flows are implemented in a stateless way.
484456

485457
Flows affected by non-default inbound rules become non-terminating. Additionally, byte and packet counts aren't recorded for these flows. Because of those factors, the number of bytes and packets reported in NSG flow logs (and Network Watcher traffic analytics) could be different from actual numbers.
486458

487-
You can resolve this difference by setting the `FlowTimeoutInMinutes` property on the associated virtual networks to a non-null value. You can achieve default stateful behavior by setting `FlowTimeoutInMinutes` to 4 minutes. For long-running connections where you don't want flows to disconnect from a service or destination, you can set `FlowTimeoutInMinutes` to a value of up to 30 minutes. Use [Get-AzVirtualNetwork](/powershell/module/az.network/set-azvirtualnetwork) to set `FlowTimeoutInMinutes` property:
459+
You can resolve this difference by setting the `FlowTimeoutInMinutes` property on the associated virtual networks to a non-null value. You can achieve default stateful behavior by setting `FlowTimeoutInMinutes` to 4 minutes. For long-running connections where you don't want flows to disconnect from a service or destination, you can set `FlowTimeoutInMinutes` to a value of up to 30 minutes. Use [Set-AzVirtualNetwork](/powershell/module/az.network/set-azvirtualnetwork) to set `FlowTimeoutInMinutes` property:
488460

489-
```powershell
490-
$virtualNetwork = Get-AzVirtualNetwork -Name myVNet -ResourceGroupName myResourceGroup
461+
```azurepowershell-interactive
462+
$virtualNetwork = Get-AzVirtualNetwork -Name 'myVNet' -ResourceGroupName 'myResourceGroup'
491463
$virtualNetwork.FlowTimeoutInMinutes = 4
492464
$virtualNetwork | Set-AzVirtualNetwork
493465
```
@@ -558,7 +530,9 @@ This problem might be related to:
558530

559531
## Pricing
560532

561-
NSG flow logs are charged per gigabyte of *Network flow logs collected* and come with a free tier of 5 GB/month per subscription. If traffic analytics is enabled with NSG flow logs, traffic analytics pricing applies at per gigabyte processing rates. Traffic analytics isn't offered with a free tier of pricing. For more information, see [Network Watcher pricing](https://azure.microsoft.com/pricing/details/network-watcher/).
533+
NSG flow logs are charged per gigabyte of ***Network flow logs collected*** and come with a free tier of 5 GB/month per subscription.
534+
535+
If traffic analytics is enabled with NSG flow logs, traffic analytics pricing applies at per gigabyte processing rates. Traffic analytics isn't offered with a free tier of pricing. For more information, see [Network Watcher pricing](https://azure.microsoft.com/pricing/details/network-watcher/).
562536

563537
Storage of logs is charged separately. For more information, see [Azure Blob Storage pricing](https://azure.microsoft.com/pricing/details/storage/blobs/).
564538

0 commit comments

Comments
 (0)