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/nat-gateway/troubleshoot-nat.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ To analyze outbound traffic from NAT gateway, use NSG flow logs. NSG flow logs p
59
59
60
60
* To learn more about NSG flow logs, see [NSG flow log overview](../network-watcher/network-watcher-nsg-flow-logging-overview.md).
61
61
62
-
* For guides on how to enable NSG flow logs, see [Enabling NSG flow logs](../network-watcher/network-watcher-nsg-flow-logging-overview.md#enabling-nsg-flow-logs).
62
+
* For guides on how to enable NSG flow logs, see [Managing NSG flow logs](../network-watcher/network-watcher-nsg-flow-logging-overview.md#managing-nsg-flow-logs).
63
63
64
64
* For guides on how to read NSG flow logs, see [Working with NSG flow logs](../network-watcher/network-watcher-nsg-flow-logging-overview.md#working-with-flow-logs).
Copy file name to clipboardExpand all lines: articles/network-watcher/network-watcher-nsg-flow-logging-overview.md
+19-45Lines changed: 19 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,14 +6,14 @@ ms.author: halkazwini
6
6
author: halkazwini
7
7
ms.service: network-watcher
8
8
ms.topic: concept-article
9
-
ms.date: 02/07/2024
9
+
ms.date: 02/15/2024
10
10
11
11
#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.
12
12
---
13
13
14
14
# Flow logging for network security groups
15
15
16
-
Network security groups flow logging is a feature of Azure Network Watcher that allows you to log information about IP traffic flowing through a [network security group](../virtual-network/network-security-groups-overview.md). Flow data is sent to Azure Storage from where you can access it and export it to any visualization tool, security information and event management (SIEM) solution, or intrusion detection system (IDS) of your choice.
16
+
Network security group (NSG) flow logging is a feature of Azure Network Watcher that allows you to log information about IP traffic flowing through a [network security group](../virtual-network/network-security-groups-overview.md). Flow data is sent to Azure Storage from where you can access it and export it to any visualization tool, security information and event management (SIEM) solution, or intrusion detection system (IDS) of your choice.
17
17
18
18
:::image type="content" source="./media/network-watcher-nsg-flow-logging-overview/nsg-flow-logs-portal.png" alt-text="Screenshot showing Network Watcher NSG flow logs page in the Azure portal.":::
19
19
@@ -399,68 +399,42 @@ Here's an example bandwidth calculation for flow tuples from a TCP conversation
399
399
400
400
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.
401
401
402
-
## Enabling NSG flow logs
402
+
## Managing NSG flow logs
403
403
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:
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
-
423
412
## Working with flow logs
424
413
425
414
### Read and export flow logs
426
415
416
+
To learn how to read and export NSG flow logs, see one of the following guides:
417
+
427
418
-[Download and view flow logs from the portal](./nsg-flow-logging.md#download-a-flow-log)
428
419
-[Read flow logs by using PowerShell functions](./network-watcher-read-nsg-flow-logs.md)
429
420
-[Export NSG flow logs to Splunk](https://www.splunk.com/en_us/blog/platform/splunking-azure-nsg-flow-logs.html)
430
421
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 in a storage account at the following path:
To learn how to visualize NSG flow logs, see one of the following guides:
431
+
439
432
-[Visualize NSG flow logs using Network Watcher traffic analytics](./traffic-analytics.md)
440
433
-[Visualize NSG flow logs using Power BI](./network-watcher-visualize-nsg-flow-logs-power-bi.md)
441
434
-[Visualize NSG flow logs using Elastic Stack](./network-watcher-visualize-nsg-flow-logs-open-source-tools.md)
442
435
-[Manage and analyze NSG flow logs using Grafana](./network-watcher-nsg-grafana.md)
443
436
-[Manage and analyze NSG flow logs using Graylog](./network-watcher-analyze-nsg-flow-logs-graylog.md)
444
437
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
-
464
438
## Considerations for NSG flow logs
465
439
466
440
### Storage account
@@ -472,22 +446,20 @@ When you delete a network security group, the associated flow log resource is de
472
446
473
447
### Cost
474
448
475
-
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.
449
+
NSG flow logging is billed on the volume of produced logs. High traffic volume can result in large flow-log volume, which increases the associated costs.
476
450
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.
480
452
481
453
### Non-default inbound TCP rules
482
454
483
455
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.
484
456
485
457
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.
486
458
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:
@@ -504,7 +476,7 @@ We don't recommend that you log flows on an Azure ExpressRoute gateway subnet be
504
476
505
477
### Traffic to a private endpoint
506
478
507
-
Traffic to private endpoints can only be captured at source VM, the traffic is recorded with source IP address of the VM and destination IP address of the private endpoint. Traffic can't be recorded at the private endpoint itself due to platform limitations.
479
+
Traffic to private endpoints can only be captured at source VM. The traffic is recorded with source IP address of the VM and destination IP address of the private endpoint. Traffic can't be recorded at the private endpoint itself due to platform limitations.
508
480
509
481
### Support for network security groups associated to Application Gateway v2 subnet
510
482
@@ -546,7 +518,7 @@ Currently, these Azure services don't support NSG flow logs:
546
518
547
519
### I can't enable NSG flow logs
548
520
549
-
If you get an "AuthorizationFailed" or "GatewayAuthenticationFailed" error, you might not have enabled the **Microsoft.Insights** resource provider on your subscription. For more information, see [Register Insights provider](./nsg-flow-logging.md#register-insights-provider).
521
+
You might get an *AuthorizationFailed* or *GatewayAuthenticationFailed* error, if you didn't enable the **Microsoft.Insights** resource provider on your subscription before trying to enable NSG flow logs. For more information, see [Register Insights provider](nsg-flow-logging.md#register-insights-provider).
550
522
551
523
### I enabled NSG flow logs but don't see data in my storage account
552
524
@@ -558,7 +530,9 @@ This problem might be related to:
558
530
559
531
## Pricing
560
532
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/).
562
536
563
537
Storage of logs is charged separately. For more information, see [Azure Blob Storage pricing](https://azure.microsoft.com/pricing/details/storage/blobs/).
0 commit comments