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/network-watcher-packet-capture-manage-cli.md
+18-19Lines changed: 18 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ This article assumes you have the following resources:
47
47
48
48
### Step 1
49
49
50
-
Run the `az vm extension set`cmdlet to install the packet capture agent on the guest virtual machine.
50
+
Run the `az vm extension set`command to install the packet capture agent on the guest virtual machine.
51
51
52
52
For Windows virtual machines:
53
53
@@ -58,17 +58,23 @@ az vm extension set --resource-group resourceGroupName --vm-name virtualMachineN
58
58
For Linux virtual machines:
59
59
60
60
```azurecli
61
-
az vm extension set --resource-group resourceGroupName --vm-name virtualMachineName --publisher Microsoft.Azure.NetworkWatcher --name NetworkWatcherAgentLinux--version 1.4
61
+
az vm extension set --resource-group resourceGroupName --vm-name virtualMachineName --publisher Microsoft.Azure.NetworkWatcher --name NetworkWatcherAgentLinux--version 1.4
62
62
```
63
63
64
64
### Step 2
65
65
66
-
To ensure that the agent is installed, run the `vm extension show`cmdlet and pass it the resource group and virtual machine name. Check the resulting list to ensure the agent is installed.
66
+
To ensure that the agent is installed, run the `vm extension show`command and pass it the resource group and virtual machine name. Check the resulting list to ensure the agent is installed.
67
67
68
+
For Windows virtual machines:
68
69
```azurecli
69
70
az vm extension show --resource-group resourceGroupName --vm-name virtualMachineName --name NetworkWatcherAgentWindows
70
71
```
71
72
73
+
For Linux virtual machines:
74
+
```azurecli
75
+
az vm extension show --resource-group resourceGroupName --vm-name virtualMachineName --name AzureNetworkWatcherExtension
76
+
```
77
+
72
78
The following sample is an example of the response from running `az vm extension show`
73
79
74
80
```json
@@ -95,31 +101,24 @@ The following sample is an example of the response from running `az vm extension
95
101
96
102
Once the preceding steps are complete, the packet capture agent is installed on the virtual machine.
97
103
98
-
### Step 1
99
-
100
-
The next step is to retrieve the Network Watcher instance. TThe name of the Network Watcher is passed to the `az network watcher show` cmdlet in step 4.
101
104
102
-
```azurecli
103
-
az network watcher show --resource-group resourceGroup --name networkWatcherName
104
-
```
105
-
106
-
### Step 2
105
+
### Step 1
107
106
108
107
Retrieve a storage account. This storage account is used to store the packet capture file.
109
108
110
109
```azurecli
111
-
azure storage account list
110
+
az storage account list
112
111
```
113
112
114
-
### Step 3
113
+
### Step 2
115
114
116
-
Filters can be used to limit the data that is stored by the packet capture. The following example sets up a packet capture with several filters. The first three filters collect outgoing TCP traffic only from local IP 10.0.0.3 to destination ports 20, 80 and 443. The last filter collects only UDP traffic.
115
+
At this point, you are ready to create a packet capture. First, let's examine the parameters you may want to configure. Filters are one such parameter that can be used to limit the data that is stored by the packet capture. The following example sets up a packet capture with several filters. The first three filters collect outgoing TCP traffic only from local IP 10.0.0.3 to destination ports 20, 80 and 443. The last filter collects only UDP traffic.
Running the `az network watcher packet-capture show-status`cmdlet, retrieves the status of a currently running, or completed packet capture.
176
+
Running the `az network watcher packet-capture show-status`command, retrieves the status of a currently running, or completed packet capture.
178
177
179
178
```azurecli
180
179
az network watcher packet-capture show-status --name packetCaptureName --location {networkWatcherLocation}
181
180
```
182
181
183
-
The following example is the output from the `az network watcher packet-capture show-status`cmdlet. The following example is when the capture is Stopped, with a StopReason of TimeExceeded.
182
+
The following example is the output from the `az network watcher packet-capture show-status`command. The following example is when the capture is Stopped, with a StopReason of TimeExceeded.
0 commit comments