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/network-watcher/flow-logs-read.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: halkazwini
6
6
ms.author: halkazwini
7
7
ms.service: network-watcher
8
8
ms.topic: how-to
9
-
ms.date: 04/22/2024
9
+
ms.date: 04/24/2024
10
10
ms.custom: devx-track-azurepowershell
11
11
12
12
#CustomerIntent: As an Azure administrator, I want to read my flow logs using a PowerShell script so I can see the latest data.
@@ -24,15 +24,15 @@ The concepts discussed in this article aren't limited to the PowerShell and are
24
24
25
25
- PowerShell installed on your machine. For more information, see [Install PowerShell on Windows, Linux, and macOS](/powershell/scripting/install/installing-powershell). This article requires the Az PowerShell module. For more information, see [How to install Azure PowerShell](/powershell/azure/install-azure-powershell). To find the installed version, run `Get-Module -ListAvailable Az`.
26
26
27
-
- Flow logs in a region or more. For more information, see [Create NSG flow logs](nsg-flow-logs-portal.md#create-a-flow-log) or [Create VNet flow logs](vnet-flow-logs-portal.md#create-a-flow-log).
27
+
- Flow logs in a region or more. For more information, see [Create network security group flow logs](nsg-flow-logs-portal.md#create-a-flow-log) or [Create virtual network flow logs](vnet-flow-logs-portal.md#create-a-flow-log).
28
28
29
29
- Necessary RBAC permissions for the subscriptions of flow logs and storage account. For more information, see [Network Watcher RBAC permissions](required-rbac-permissions.md).
30
30
31
31
## Retrieve the blocklist
32
32
33
-
# [**NSG flow logs**](#tab/nsg)
33
+
# [**Network security group flow logs**](#tab/nsg)
34
34
35
-
The following PowerShell script sets up the variables needed to query the NSG flow log blob and list the blocks within the [CloudBlockBlob](/dotnet/api/microsoft.azure.storage.blob.cloudblockblob) block blob. Update the script to contain valid values for your environment.
35
+
The following PowerShell script sets up the variables needed to query the network security group flow log blob and list the blocks within the [CloudBlockBlob](/dotnet/api/microsoft.azure.storage.blob.cloudblockblob) block blob. Update the script to contain valid values for your environment.
36
36
37
37
```powershell
38
38
function Get-NSGFlowLogCloudBlockBlob {
@@ -48,16 +48,16 @@ function Get-NSGFlowLogCloudBlockBlob {
48
48
)
49
49
50
50
process {
51
-
# Retrieve the primary storage account key to access the NSG logs
51
+
# Retrieve the primary storage account key to access the network security group logs
The following PowerShell script sets up the variables needed to query the VNet flow log blob and list the blocks within the [CloudBlockBlob](/dotnet/api/microsoft.azure.storage.blob.cloudblockblob) block blob. Update the script to contain valid values for your environment.
96
+
The following PowerShell script sets up the variables needed to query the virtual network flow log blob and list the blocks within the [CloudBlockBlob](/dotnet/api/microsoft.azure.storage.blob.cloudblockblob) block blob. Update the script to contain valid values for your environment.
97
97
98
98
```powershell
99
99
function Get-VNetFlowLogCloudBlockBlob {
@@ -109,16 +109,16 @@ function Get-VNetFlowLogCloudBlockBlob {
109
109
)
110
110
111
111
process {
112
-
# Retrieve the primary storage account key to access the VNet flow logs
112
+
# Retrieve the primary storage account key to access the virtual network flow logs
In this section, you read the `$blocklist` variable to retrieve the data. In the following example, we iterate through the blocklist to read the bytes from each block and store them in an array. Use the [DownloadRangeToByteArray](/dotnet/api/microsoft.azure.storage.blob.cloudblob.downloadrangetobytearray) method to retrieve the data.
176
176
177
-
# [**NSG flow logs**](#tab/nsg)
177
+
# [**Network security group flow logs**](#tab/nsg)
178
178
179
179
```powershell
180
180
function Get-NSGFlowLogReadBlock {
@@ -218,7 +218,7 @@ function Get-NSGFlowLogReadBlock {
Copy file name to clipboardExpand all lines: articles/network-watcher/network-watcher-overview.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: halkazwini
5
5
ms.author: halkazwini
6
6
ms.service: network-watcher
7
7
ms.topic: overview
8
-
ms.date: 04/22/2024
8
+
ms.date: 04/24/2024
9
9
10
10
#CustomerIntent: As someone with basic Azure network experience, I want to understand how Azure Network Watcher can help me resolve some of the network-related problems I've encountered and provide insight into how I use Azure networking.
11
11
---
@@ -90,8 +90,8 @@ Network Watcher offers two traffic tools that help you log and visualize network
90
90
### Flow logs
91
91
92
92
**Flow logs** allows you to log information about your Azure IP traffic and stores the data in Azure storage. You can log IP traffic flowing through a network security group or Azure virtual network. For more information, see:
93
-
-[NSG flow logs](nsg-flow-logs-overview.md) and [Manage NSG flow logs](nsg-flow-logs-portal.md).
94
-
-[VNet flow logs](vnet-flow-logs-overview.md) and [Manage VNet flow logs](vnet-flow-logs-portal.md).
93
+
-[Network security group flow logs](nsg-flow-logs-overview.md) and [Manage network security group flow logs](nsg-flow-logs-portal.md).
94
+
-[Virtual network flow logs](vnet-flow-logs-overview.md) and [Manage virtual network flow logs](vnet-flow-logs-portal.md).
Copy file name to clipboardExpand all lines: articles/network-watcher/nsg-flow-logs-migrate.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,43 +1,44 @@
1
1
---
2
-
title: Migrate to VNet flow logs
2
+
title: Migrate to virtual network flow logs
3
3
titleSuffix: Azure Network Watcher
4
-
description: Learn how to migrate your Azure Network Watcher NSG flow logs to VNet flow logs using the Azure portal and a PowerShell script.
4
+
description: Learn how to migrate your Azure Network Watcher network security group flow logs to virtual network flow logs using the Azure portal and a PowerShell script.
5
5
author: halkazwini
6
6
ms.author: halkazwini
7
7
ms.service: network-watcher
8
8
ms.topic: how-to
9
-
ms.date: 04/22/2024
9
+
ms.date: 04/24/2024
10
+
ms.custom: devx-track-azurepowershell
10
11
11
-
#CustomerIntent: As an Azure administrator, I want to migrate my NSG flow logs to the new VNet flow logs so that I can use all the benefits of VNet flow logs, which overcome some of the NSG flow logs limitations..
12
+
#CustomerIntent: As an Azure administrator, I want to migrate my network security group flow logs to the new virtual network flow logs so that I can use all the benefits of virtual network flow logs, which overcome some of the network security group flow logs limitations.
12
13
---
13
14
14
-
# Migrate from NSG flow logs to VNet flow logs
15
+
# Migrate from network security group flow logs to virtual network flow logs
15
16
16
-
In this article, you learn how to migrate your existing NSG flow logs to VNet flow logs. VNet flow logs overcome some of the limitations of NSG flow logs. For more information, see [VNet flow logs](vnet-flow-logs-overview.md).
17
+
In this article, you learn how to migrate your existing network security group flow logs to virtual network flow logs. Virtual network flow logs overcome some of the limitations of network security group flow logs. For more information, see [Virtual network flow logs](vnet-flow-logs-overview.md).
17
18
18
19
## Prerequisites
19
20
20
21
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
21
22
22
23
- PowerShell installed on your machine. For more information, see [Install PowerShell on Windows, Linux, and macOS](/powershell/scripting/install/installing-powershell). This article requires the Az PowerShell module. For more information, see [How to install Azure PowerShell](/powershell/azure/install-azure-powershell). To find the installed version, run `Get-Module -ListAvailable Az`.
23
24
24
-
- Necessary RBAC permissions for subscriptions of the flow logs and Log Analytics workspaces if traffic analytics is enabled for any of the NSG flow logs. For more information, see [Network Watcher RBAC permissions](required-rbac-permissions.md).
25
+
- Necessary RBAC permissions for subscriptions of the flow logs and Log Analytics workspaces if traffic analytics is enabled for any of the network security group flow logs. For more information, see [Network Watcher RBAC permissions](required-rbac-permissions.md).
25
26
26
-
-NSG flow logs in a region or more. For more information, see [Create NSG flow logs](nsg-flow-logs-portal.md#create-a-flow-log).
27
+
-Network security group flow logs in a region or more. For more information, see [Create network security group flow logs](nsg-flow-logs-portal.md#create-a-flow-log).
27
28
28
29
## Generate migration script
29
30
30
-
In this section, you learn how to generate and download the migration files for the NSG flow logs that you want to migrate.
31
+
In this section, you learn how to generate and download the migration files for the network security group flow logs that you want to migrate.
31
32
32
33
1. In the search box at the top of the portal, enter *network watcher*. Select **Network Watcher** in the search results.
33
34
34
35
:::image type="content" source="./media/nsg-flow-logs-migrate/portal-search.png" alt-text="Screenshot that shows how to search for Network Watcher in the Azure portal." lightbox="./media/nsg-flow-logs-migrate/portal-search.png":::
35
36
36
37
1. Under **Logs**, select **Migrate flow logs**.
37
38
38
-
:::image type="content" source="./media/nsg-flow-logs-migrate/migrate-flow-logs.png" alt-text="Screenshot that shows the NSG flow logs migration page in the Azure portal." lightbox="./media/nsg-flow-logs-migrate/migrate-flow-logs.png":::
39
+
:::image type="content" source="./media/nsg-flow-logs-migrate/migrate-flow-logs.png" alt-text="Screenshot that shows the network security group flow logs migration page in the Azure portal." lightbox="./media/nsg-flow-logs-migrate/migrate-flow-logs.png":::
39
40
40
-
1. Select the subscriptions that contain the NSG flow logs that you want to migrate.
41
+
1. Select the subscriptions that contain the network security group flow logs that you want to migrate.
41
42
42
43
1. For each subscription, select the regions that contain the flow logs that you want to migrate. **Total NSG flow logs** shows the total number of flow logs that are in the selected subscriptions. **Selected NSG flow logs** shows the number of flow logs in the selected regions.
43
44
@@ -51,7 +52,7 @@ In this section, you learn how to generate and download the migration files for
51
52
52
53
## Run migration script
53
54
54
-
In this section, you learn how to use the script file that you downloaded in the previous section to migrate your NSG flow logs.
55
+
In this section, you learn how to use the script file that you downloaded in the previous section to migrate your network security group flow logs.
55
56
56
57
> [!IMPORTANT]
57
58
> Once you start running the script, you shouldn't make any changes to the topology in the regions and subscriptions of the flow logs that you're migrating.
@@ -81,7 +82,7 @@ In this section, you learn how to use the script file that you downloaded in the
81
82
Please enter the number of threads you would like to use, press enter for using default value of 16:
82
83
```
83
84
84
-
After the analysis is complete, you'll see the analysis report on screen and in an html file in the same directory of the migration files. The report lists the number of NSG flow logs that will be disabled and the number of VNet flow logs that are created to replace them. The number of VNet flow logs that are created depends on the type of migration that you choose. For example, if the network security group that you're migrating its flow log is associated with three network interfaces in the same virtual network, then you can choose *migration with aggregation* to have a single VNet flow log resource applied to the virtual network. You can also choose *migration without aggregation* to have three VNet flow logs (one VNet flow log resource per network interface).
85
+
After the analysis is complete, you'll see the analysis report on screen and in an html file in the same directory of the migration files. The report lists the number of network security group flow logs that will be disabled and the number of virtual network flow logs that are created to replace them. The number of virtual network flow logs that are created depends on the type of migration that you choose. For example, if the network security group that you're migrating its flow log is associated with three network interfaces in the same virtual network, then you can choose *migration with aggregation* to have a single virtual network flow log resource applied to the virtual network. You can also choose *migration without aggregation* to have three virtual network flow logs (one virtual network flow log resource per network interface).
85
86
86
87
> [!NOTE]
87
88
> See `AnalysisReport-<subscriptionId>-<region>-<time>.html` file for a full report of the analysis that you performed. The file is available in the same directory of the script.
@@ -102,14 +103,14 @@ In this section, you learn how to use the script file that you downloaded in the
102
103
Do you want to rollback? You won't get the option to revert the actions done now again (y/n): n
103
104
```
104
105
105
-
1. Check the Azure portal to confirm that the status of NSG flow logs that you migrated became disabled, and VNet flow logs are created to replace them.
106
+
1. Check the Azure portal to confirm that the status of network security group flow logs that you migrated became disabled, and virtual network flow logs are created to replace them.
106
107
107
-
:::image type="content" source="./media/nsg-flow-logs-migrate/list-flow-logs.png" alt-text="Screenshot that shows the newly created VNet flow log as a result of migrating from NSG flow log." lightbox="./media/nsg-flow-logs-migrate/list-flow-logs.png":::
108
+
:::image type="content" source="./media/nsg-flow-logs-migrate/list-flow-logs.png" alt-text="Screenshot that shows the newly created virtual network flow log as a result of migrating from network security group flow log." lightbox="./media/nsg-flow-logs-migrate/list-flow-logs.png":::
108
109
109
110
> [!NOTE]
110
111
> Keep the script and analysis report files for reference in case you have any issues with the migration.
111
112
112
113
## Related content
113
114
114
-
- [NSG flow logs](nsg-flow-logs-overview.md)
115
-
- [VNet flow logs](vnet-flow-logs-overview.md)
115
+
- [Network security group flow logs](nsg-flow-logs-overview.md)
Copy file name to clipboardExpand all lines: articles/network-watcher/required-rbac-permissions.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ author: halkazwini
6
6
ms.author: halkazwini
7
7
ms.service: network-watcher
8
8
ms.topic: concept-article
9
-
ms.date: 04/22/2024
9
+
ms.date: 04/24/2024
10
10
11
11
#CustomerIntent: As an Azure administrator, I want to know the required Azure role-based access control (Azure RBAC) permissions to use each of the Network Watcher capabilities, so I can assign them correctly to users using any of those capabilities.
12
12
---
@@ -78,7 +78,7 @@ Since traffic analytics is enabled as part of the Flow log resource, the followi
78
78
> | Microsoft.Insights/dataCollectionEndpoints/write <sup>1</sup> | Create or update a data collection endpoint |
79
79
> | Microsoft.Insights/dataCollectionEndpoints/delete <sup>1</sup> | Delete a data collection endpoint |
80
80
81
-
<sup>1</sup> Only required when using traffic analytics to analyze VNet flow logs. For more information, see [Data collection rules in Azure Monitor](../azure-monitor/essentials/data-collection-rule-overview.md?toc=/azure/network-watcher/toc.json) and [Data collection endpoints in Azure Monitor](../azure-monitor/essentials/data-collection-endpoint-overview.md?toc=/azure/network-watcher/toc.json).
81
+
<sup>1</sup> Only required when using traffic analytics to analyze virtual network flow logs. For more information, see [Data collection rules in Azure Monitor](../azure-monitor/essentials/data-collection-rule-overview.md?toc=/azure/network-watcher/toc.json) and [Data collection endpoints in Azure Monitor](../azure-monitor/essentials/data-collection-endpoint-overview.md?toc=/azure/network-watcher/toc.json).
82
82
83
83
> [!CAUTION]
84
84
> Data collection rule and data collection endpoint resources are created and managed by traffic analytics. If you perform any operation on these resources, traffic analytics may not function as expected.
0 commit comments