Skip to content

Commit 9918a6c

Browse files
authored
Merge pull request #222708 from halkazwini/nw-create
Network Watcher: Freshness: Create an Azure Network Watcher instance
2 parents 7973d98 + 14e85e9 commit 9918a6c

File tree

5 files changed

+70
-54
lines changed

5 files changed

+70
-54
lines changed

articles/network-watcher/frequently-asked-questions.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sections:
2525
- question: |
2626
What is Network Watcher?
2727
answer: |
28-
Network Watcher is designed to monitor and repair the network health of IaaS (Infrastructure-as-a-Service) components, which includes Virtual Machines, Virtual Networks, Application Gateways, Load balancers, and other resources in an Azure virtual network. It is not a solution for monitoring PaaS (Platform-as-a-Service) infrastructure or getting web/mobile analytics.
28+
Network Watcher is designed to monitor and repair the network health of IaaS (Infrastructure-as-a-Service) components, which includes Virtual Machines, Virtual Networks, Application Gateways, Load balancers, and other resources in an Azure virtual network. It isn't a solution for monitoring PaaS (Platform-as-a-Service) infrastructure or getting web/mobile analytics.
2929
3030
- question: |
3131
What tools does Network Watcher provide?
@@ -77,7 +77,7 @@ sections:
7777
- question: |
7878
What is the NetworkWatcherRG?
7979
answer: |
80-
Network Watcher resources are located in the hidden **NetworkWatcherRG** resource group which is created automatically. For example, the NSG Flow Logs resource is a child resource of Network Watcher and is enabled in the NetworkWatcherRG.
80+
Network Watcher resources are located in the hidden **NetworkWatcherRG** resource group, which is created automatically. For example, the NSG Flow Logs resource is a child resource of Network Watcher and is enabled in the NetworkWatcherRG.
8181
8282
- question: |
8383
Why do I need to install the Network Watcher extension?
@@ -97,12 +97,12 @@ sections:
9797
- question: |
9898
Why is only one instance of Network Watcher allowed per region?
9999
answer: |
100-
Network Watcher just needs to be enabled once for a subscription for its features to work, this is not a service limit.
100+
Network Watcher just needs to be enabled once for a subscription for its features to work, this isn't a service limit.
101101
102102
- question: |
103103
How can I manage the Network Watcher Resource?
104104
answer: |
105-
The Network Watcher resource represents the backend service for Network Watcher and is fully managed by Azure. Customers do no need to manage it. Operations like move are not supported on the resource. However, [the resource can be deleted](./network-watcher-create.md#delete-a-network-watcher-in-the-portal).
105+
The Network Watcher resource represents the backend service for Network Watcher and is fully managed by Azure. Customers don't need to manage it. Operations like move aren't supported on the resource. However, [the resource can be deleted](./network-watcher-create.md#delete-a-network-watcher-using-the-azure-portal).
106106
107107
- name: Service availability and redundancy
108108
questions:
@@ -131,15 +131,15 @@ sections:
131131
* Navigate to the storage account by typing the storage account's name in the global search on the portal or from the [Storage Accounts page](https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.Storage%2FStorageAccounts)
132132
* Under the **SETTINGS** section, select **Firewalls and virtual networks**
133133
* In "Allow access from", select **Selected networks**. Then under **Exceptions**, tick the box next to **"Allow trusted Microsoft services to access this storage account"**
134-
* If it is already selected, no change is needed.
134+
* If it's already selected, no change is needed.
135135
* Locate your target NSG on the [NSG Flow Logs overview page](https://portal.azure.com/#blade/Microsoft_Azure_Network/NetworkWatcherMenuBlade/flowLogs) and enable NSG Flow Logs with the above storage account selected.
136136
137137
You can check the storage logs after a few minutes, you should see an updated TimeStamp or a new JSON file created.
138138
139139
- question: |
140140
How do I use NSG Flow Logs with a Storage account behind a Service Endpoint?
141141
answer: |
142-
NSG Flow Logs are compatible with Service Endpoints without requiring any extra configuration. Please see the [tutorial on enabling Service Endpoints](../virtual-network/tutorial-restrict-network-access-to-resources.md#enable-a-service-endpoint) in your virtual network.
142+
NSG Flow Logs are compatible with Service Endpoints without requiring any extra configuration. See the [tutorial on enabling Service Endpoints](../virtual-network/tutorial-restrict-network-access-to-resources.md#enable-a-service-endpoint) in your virtual network.
143143
144144
145145
- question: |
156 KB
Loading
63.5 KB
Loading
136 KB
Loading
Lines changed: 64 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,30 @@
11
---
2-
title: Create an Azure Network Watcher instance | Microsoft Docs
3-
description: Learn how to create an Azure Network Watcher in an Azure region by using the Azure portal or other technologies, and how to delete a Network Watcher.
2+
title: Create an Azure Network Watcher instance
3+
description: Learn how to create or delete an Azure Network Watcher using the Azure portal, PowerShell, the Azure CLI or the REST API.
44
services: network-watcher
5-
documentationcenter: na
65
author: damendo
76
ms.assetid: b1314119-0b87-4f4d-b44c-2c4d0547fb76
87
ms.service: network-watcher
98
ms.topic: how-to
10-
ms.tgt_pltfrm: na
11-
ms.workload: infrastructure-services
12-
ms.date: 10/08/2021
9+
ms.workload: infrastructure-services
10+
ms.date: 12/30/2022
1311
ms.author: damendo
14-
ms.custom: devx-track-azurepowershell, devx-track-azurecli, engagement-fy23
12+
ms.custom: template-how-to, devx-track-azurepowershell, devx-track-azurecli, engagement-fy23
1513
ms.devlang: azurecli
1614
---
1715

1816
# Create an Azure Network Watcher instance
1917

2018
Network Watcher is a regional service that enables you to monitor and diagnose conditions at a network scenario level in, to, and from Azure. Scenario level monitoring enables you to diagnose problems at an end to end network level view. Network diagnostic and visualization tools available with Network Watcher help you understand, diagnose, and gain insights to your network in Azure. Network Watcher is enabled through the creation of a Network Watcher resource. This resource allows you to utilize Network Watcher capabilities.
2119

22-
23-
[!INCLUDE [updated-for-az](../../includes/updated-for-az.md)]
24-
2520
## Network Watcher is automatically enabled
26-
When you create or update a virtual network in your subscription, Network Watcher will be enabled automatically in your Virtual Network's region. There's no impact to your resources or associated charge for automatically enabling Network Watcher.
21+
When you create or update a virtual network in your subscription, Network Watcher will be enabled automatically in your Virtual Network's region. Automatically enabling Network Watcher doesn't affect your resources or associated charge.
2722

28-
#### Opt-out of Network Watcher automatic enablement
23+
### Opt-out of Network Watcher automatic enablement
2924
If you would like to opt out of Network Watcher automatic enablement, you can do so by running the following commands:
3025

3126
> [!WARNING]
32-
> Opting-out of Network Watcher automatic enablement is a permanent change. Once you opt-out, you cannot opt-in without contacting [support](https://azure.microsoft.com/support/options/).
27+
> Opting-out of Network Watcher automatic enablement is a permanent change. Once you opt-out, you cannot opt-in without contacting [Azure support](https://azure.microsoft.com/support/options/).
3328
3429
```azurepowershell-interactive
3530
Register-AzProviderFeature -FeatureName DisableNetworkWatcherAutocreation -ProviderNamespace Microsoft.Network
@@ -40,45 +35,53 @@ Register-AzResourceProvider -ProviderNamespace Microsoft.Network
4035
az feature register --name DisableNetworkWatcherAutocreation --namespace Microsoft.Network
4136
az provider register -n Microsoft.Network
4237
```
38+
## Prerequisites
4339

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

4642
## Create a Network Watcher in the portal
4743

48-
1. Log into the [Azure portal](https://portal.azure.com) with an account that has the necessary permissions.
49-
2. Select **More services**.
50-
3. In the **All services** screen, enter **Network Watcher** in the **Filter services** search box and select it from the search result.
51-
You can select all the subscriptions you want to enable Network Watcher for. This action creates a Network Watcher in every region that is available.
44+
1. Sign in to the [Azure portal](https://portal.azure.com) with an account that has the necessary permissions.
45+
46+
2. In the search box at the top of the portal, enter *Network Watcher*.
47+
48+
3. In the search results, select **Network Watcher**.
49+
50+
4. Select **+ Add**.
5251

53-
![create a network watcher](./media/network-watcher-create/figure1.png)
52+
5. In **Add network watcher**, select your Azure subscription, then select the region that you want to enable Azure Network Watcher for.
5453

55-
When you enable Network Watcher using the portal, the name of the Network Watcher instance is automatically set to *NetworkWatcher_region_name* where *region_name* corresponds to the Azure region where the instance is enabled. For example, a Network Watcher enabled in the West Central US region is named *NetworkWatcher_westcentralus*.
54+
6. Select **Add**.
55+
56+
:::image type="content" source="./media/network-watcher-create/create-network-watcher.png" alt-text="Screenshot showing how to create a Network Watcher in the Azure portal.":::
57+
58+
When you enable Network Watcher using the Azure portal, the name of the Network Watcher instance is automatically set to *NetworkWatcher_region_name*, where *region_name* corresponds to the Azure region of the Network Watcher instance. For example, a Network Watcher enabled in the East US region is named *NetworkWatcher_eastus*.
5659

5760
The Network Watcher instance is automatically created in a resource group named *NetworkWatcherRG*. The resource group is created if it doesn't already exist.
5861

59-
If you wish to customize the name of a Network Watcher instance and the resource group it's placed into, you can use PowerShell, the Azure CLI, the REST API, or ARMClient methods described in the sections that follow. In each option, the resource group must exist before you create a Network Watcher in it.
62+
If you wish to customize the name of a Network Watcher instance and the resource group it's placed into, you can use [PowerShell](#powershell) or [REST API](#restapi) methods. In each option, the resource group must exist before you create a Network Watcher in it.
6063

61-
## Create a Network Watcher with PowerShell
64+
## <a name="powershell"></a> Create a Network Watcher using PowerShell
6265

63-
To create an instance of Network Watcher, run the following example:
66+
Use [New-AzNetworkWatcher](/powershell/module/az.network/new-aznetworkwatcher) to create an instance of Network Watcher:
6467

65-
```powershell
66-
New-AzNetworkWatcher -Name "NetworkWatcher_westcentralus" -ResourceGroupName "NetworkWatcherRG" -Location "West Central US"
68+
```azurepowershell-interactive
69+
New-AzNetworkWatcher -Name NetworkWatcher_westus -ResourceGroupName NetworkWatcherRG -Location westus
6770
```
6871

69-
## Create a Network Watcher with the Azure CLI
72+
## Create a Network Watcher using the Azure CLI
7073

71-
To create an instance of Network Watcher, run the following example:
74+
Use [az network watcher configure](/cli/azure/network/watcher#az-network-watcher-configure) to create an instance of Network Watcher:
7275

73-
```azurecli
76+
```azurecli-interactive
7477
az network watcher configure --resource-group NetworkWatcherRG --locations westcentralus --enabled
7578
```
7679

77-
## Create a Network Watcher with the REST API
80+
## <a name="restapi"></a> Create a Network Watcher using the REST API
7881

79-
The ARMclient is used to call the REST API using PowerShell. The ARMClient is found on chocolatey at [ARMClient on Chocolatey](https://chocolatey.org/packages/ARMClient)
82+
The ARMclient is used to call the [REST API](/rest/api/network-watcher/network-watchers/create-or-update) using PowerShell. The ARMClient is found on chocolatey at [ARMClient on Chocolatey](https://chocolatey.org/packages/ARMClient)
8083

81-
### Log in with ARMClient
84+
### Sign in with ARMClient
8285

8386
```powerShell
8487
armclient login
@@ -90,7 +93,7 @@ armclient login
9093
$subscriptionId = '<subscription id>'
9194
$networkWatcherName = '<name of network watcher>'
9295
$resourceGroupName = '<resource group name>'
93-
$apiversion = "2016-09-01"
96+
$apiversion = "2022-07-01"
9497
$requestBody = @"
9598
{
9699
'location': 'West Central US'
@@ -102,35 +105,48 @@ armclient put "https://management.azure.com/subscriptions/${subscriptionId}/reso
102105

103106
## Create a Network Watcher using Azure Quickstart Template
104107

105-
To create an instance of Network Watcher, refer this [Quickstart Template](https://azure.microsoft.com/resources/templates/networkwatcher-create/)
108+
To create an instance of Network Watcher, refer to this [Quickstart Template](/samples/azure/azure-quickstart-templates/networkwatcher-create).
106109

107-
## Delete a Network Watcher in the portal
110+
## Delete a Network Watcher using the Azure portal
108111

109-
1. Navigate to **All Services** > **Networking** > **Network Watcher**.
110-
2. Select the overview tab, if you're not already there. Use the dropdown to select the subscription you want to disable network watcher in.
111-
3. Expand the list of locations for your chosen subscription by selecting on the arrow. For any given, use the 3 dots on the right to access the context menu.
112-
4. Select **Disable network watcher** to start disabling. You'll be asked to confirm this step. Select **Yes** to continue.
113-
On the portal, you'll have to do this individually for every region in every subscription.
112+
1. Sign in to the [Azure portal](https://portal.azure.com) with an account that has the necessary permissions.
114113

114+
2. In the search box at the top of the portal, enter *Network Watcher*.
115115

116-
## Delete a Network Watcher with PowerShell
116+
3. In the search results, select **Network Watcher**.
117117

118-
To delete an instance of Network Watcher, run the following example:
118+
4. In the **Overview** page, select the Network Watcher instances that you want to delete, then select **Disable**.
119119

120-
```powershell
121-
New-AzResourceGroup -Name NetworkWatcherRG -Location westcentralus
122-
New-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroupName NetworkWatcherRG -Location westcentralus
123-
Remove-AzNetworkWatcher -Name NetworkWatcher_westcentralus -ResourceGroupName NetworkWatcherRG
120+
:::image type="content" source="./media/network-watcher-create/delete-network-watcher.png" alt-text="Screenshot showing how to delete a Network Watcher in the Azure portal.":::
121+
122+
5. Enter *yes*, then select **Delete**.
123+
124+
:::image type="content" source="./media/network-watcher-create/confirm-delete-network-watcher.png" alt-text="Screenshot showing the confirmation page before deleting a Network Watcher in the Azure portal.":::
125+
126+
## Delete a Network Watcher using PowerShell
127+
128+
Use [Remove-AzNetworkWatcher](/powershell/module/az.network/remove-aznetworkwatcher) to delete an instance of Network Watcher:
129+
130+
```azurepowershell-interactive
131+
Remove-AzNetworkWatcher -Name NetworkWatcher_westus -ResourceGroupName NetworkWatcherRG
132+
```
133+
134+
## Delete a Network Watcher using the Azure CLI
135+
136+
Use [az network watcher configure](/cli/azure/network/watcher#az-network-watcher-configure) to delete an instance of Network Watcher:
137+
138+
```azurecli-interactive
139+
az network watcher configure --resource-group NetworkWatcherRG --locations westcentralus --enabled false
124140
```
125141

126142
## Next steps
127143

128-
Now that you have an instance of Network Watcher, learn about the features available:
144+
Now that you have an instance of Network Watcher, learn about the available features:
129145

130-
* [Topology](./view-network-topology.md)
146+
* [Topology](view-network-topology.md)
131147
* [Packet capture](network-watcher-packet-capture-overview.md)
132148
* [IP flow verify](network-watcher-ip-flow-verify-overview.md)
133149
* [Next hop](network-watcher-next-hop-overview.md)
134150
* [Security group view](network-watcher-security-group-view-overview.md)
135151
* [NSG flow logging](network-watcher-nsg-flow-logging-overview.md)
136-
* [Virtual Network Gateway troubleshooting](network-watcher-troubleshoot-overview.md)
152+
* [Virtual Network Gateway troubleshooting](network-watcher-troubleshoot-overview.md)

0 commit comments

Comments
 (0)