Network Watcher
Diagnostic tools · Connection Monitor · flow logs · packet capture · permissions
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Network Watcher monitors and diagnoses Azure IaaS resources: VMs, virtual networks, application gateways and load balancers. It isn't for PaaS monitoring or web analytics.
- It is enabled automatically in a VNet's region when you create or update a virtual network. Enable it manually only if you opted out earlier.
- There is one Network Watcher instance per region per subscription.
- Three groups: Monitoring (Topology, Connection monitor), Network diagnostic tools (seven) and Traffic (flow logs, Traffic analytics).
Diagnostic tools
| Tool | Answers | Notes |
|---|---|---|
| IP flow verify | Is a packet to or from an IP allowed or denied at VM level, and which security rule decides it? | Check a specific direction, protocol, local and remote address and port |
| NSG diagnostics | The same allow or deny check, for a VM, scale set or application gateway | Also works for an IP prefix or service tag. Can add a higher-priority rule |
| Next hop | Is there a routing problem? | Returns the next hop type, IP address and route table ID for a destination IP |
| Effective security rules | Which rules apply to a NIC? | NIC NSG, subnet NSG and the aggregate |
| Connection troubleshoot | Can this source reach this destination right now? | Point-in-time test from a VM, scale set, application gateway or Bastion to a VM, FQDN, URI or IPv4 address. Connection monitor does it continuously |
| Packet capture | What is on the wire? | Remote capture sessions on a VM or scale set |
| VPN troubleshoot | Why is this gateway or connection failing? | Diagnoses virtual network gateways and connections. One operation per subscription at a time |
Flow logs record traffic metadata. Packet capture captures the packets themselves.
Connection Monitor
- Unified, continuous connectivity monitoring across Azure and hybrid. Checks use TCP, ICMP or HTTP. It measures failed checks (packet loss) and round-trip time (RTT) and shows the topology with hops.
- Sources need the Network Watcher extension (Azure VMs and scale sets), or Azure Arc plus Azure Monitor Agent (on-premises). The overview's benefits list also mentions the Network Watcher extension for Arc-enabled hosts, so its wording is not fully consistent. Destinations need no extension: VMs, URLs, FQDNs or IPs. The portal enables the extensions for you.
- The Log Analytics agent is no longer supported for Connection Monitor. For on-premises monitoring logs, enable the Network Performance Monitor solution in the workspace.
- Structure: a connection monitor (regional) has test groups. A test group has sources, destinations and test configurations. Tests = sources × destinations × test configurations. For example, 3 sources × 2 destinations × 2 configurations = 12 tests.
- Create: open Network Watcher › Monitoring › Connection monitor. You can create a connection monitor with the portal, ARMClient or Azure PowerShell. A test configuration is protocol-specific (port, thresholds, test frequency). Monitoring data is stored in the Log Analytics workspace you set up at creation.
- Data goes to a Log Analytics workspace and to Azure Monitor metrics:
ChecksFailedPercent,RoundTripTimeMsandTestResult. Connection monitor updates every minute. - Alert: Monitor › Alerts › metric signal
ChecksFailedPercentorRoundTripTimeMs, resource typeMicrosoft.Network/networkWatchers/connectionMonitors. - Connection monitor (classic) is deprecated and unavailable. Migrate to the current version; the migration is one-click with zero downtime.
| Test state | Meaning |
|---|---|
| Pass | Within thresholds |
| Fail | Without a threshold, 100% of checks failed |
| Warning | Automatic warning thresholds: RTT 750 ms (TCP and ICMP), checks failed 10% |
| Indeterminate | No data |
| Not Running | The test group is disabled |
Flow logs
- Flow logs record IP traffic (Layer 4) to Azure Storage, collected at 1-minute intervals. Traffic analytics visualizes them.
- NSG flow logs retire on Sep 30, 2027. New NSG flow logs can no longer be created. After that date, existing NSG flow log resources are deleted and Traffic analytics for NSG flow logs ends. Stored log records are kept per retention. Migrate to virtual network flow logs.
- NSG flow logs aren't supported on D, E and F v6 VM series. Use virtual network flow logs.
- Virtual network flow logs are enabled at VNet scope. They record all supported workloads in the VNet, include Azure Virtual Network Manager security admin rules, encryption status, and bytes and packets in stateless flows.
- Disable NSG flow logs before enabling VNet flow logs on the same workloads. Otherwise traffic is recorded twice and costs more.
- To migrate in the portal: Network Watcher › Logs › Migrate flow logs › pick subscriptions and regions › download the script and JSON file › run the script.
- Free tier: 5 GB per month per subscription for flow logs. Traffic analytics has none.
| Storage requirement | NSG flow logs | VNet flow logs |
|---|---|---|
| Region | Same region as the NSG | Same region as the VNet |
| Account type | Standard (not Premium). Retention rules need general-purpose v2 | Standard |
| Retention | Auto-delete up to 1 year (general-purpose v2 only) | 100 retention rules per account, 10 blob prefixes each |
| Other | Same subscription (or same Microsoft Entra tenant). Needs the Microsoft.Insights resource provider registered, otherwise AuthorizationFailed. Rotating the storage keys stops the flow log until you disable and re-enable it |
Packet capture
- Runs through the Network Watcher agent VM extension (
AzureNetworkWatcherExtension). Start it from the portal, PowerShell, Azure CLI or REST, or from VM alerts. - Data is saved to the local disk or an Azure storage blob. Key access must be enabled on the storage account; otherwise captures can only go to the VM's local disk.
- Continuous packet capture (preview) uses a ring buffer: a rotating set of files where the oldest file is deleted when the file limit is reached. It runs for the set duration or a maximum of seven days, whichever is earlier (default 1 day).
- Standard session (not continuous): bytes per packet blank means the whole packet (enter 34 for the IPv4 header only). The time limit defaults to 18000 seconds (5 hours). Optional 5-tuple filters: protocol, local and remote IP, local and remote port.
Permissions and limits
- Sign in with Owner, Contributor or Network contributor, or a custom role with the actions for the capability you use.
- Network contributor does not include
Microsoft.Storage/*actions (needed for flow logs:listKeys,listServiceSas,listAccountSas),Microsoft.Compute/*actions, or theMicrosoft.OperationalInsights/workspaces/*andMicrosoft.Insights/dataCollectionRules/*actions that Traffic analytics needs.
| Item | Value |
|---|---|
| Network Watcher instances per region per subscription | 1 |
| Connection monitors per region per subscription | 100 |
| Test groups per connection monitor | 20 |
| Sources plus destinations per connection monitor | 100 |
| Test configurations per connection monitor | 20 |
| Packet capture sessions per region per subscription | 10,000 |
| VPN troubleshoot operations per subscription at once | 1 |
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| IP flow verify | az network watcher test-ip-flow -g MyResourceGroup --direction Outbound --protocol TCP --local 10.0.0.4:* --remote 10.1.0.4:80 --vm MyVm | Test-AzNetworkWatcherIPFlow |
| Next hop | az network watcher show-next-hop --dest-ip <ip> --source-ip <ip> --vm <vm> | Get-AzNetworkWatcherNextHop -NetworkWatcher $nw -TargetVirtualMachineId $VM.Id -SourceIPAddress <ip> -DestinationIPAddress <ip> |
| Create a connection monitor | Not named on the Connection Monitor overview page | PowerShell is supported, as are the portal and ARMClient |
| Stateful inbound TCP flow timeout | Not covered on the page | $vnet.FlowTimeoutInMinutes = 4; $vnet | Set-AzVirtualNetwork |
Exam Tips
Tick each tip once you can answer it without looking.
“Which security rule blocks inbound TCP 3389 to a VM?” → IP flow verify. Trap: Next hop checks routing, not security rules.
“Check allow or deny for an application gateway, or for a service tag” → NSG diagnostics. Trap: IP flow verify works at VM level.
“Traffic from a VM doesn't reach on-premises and you suspect a user-defined route” → Next hop. Trap: IP flow verify checks security rules, not routing.
“See every NSG rule (subnet and NIC) that affects a NIC” → Effective security rules.
“Test connectivity to an FQDN from a VM right now, once” → Connection troubleshoot. Trap: Connection monitor is the continuous version.
“Continuously monitor latency and packet loss between two VMs and alert on it” → Connection monitor, with a metric alert on ChecksFailedPercent or RoundTripTimeMs. Trap: Packet capture is not continuous monitoring.
“Capture packets on a VM for analysis” → Packet capture. Trap: Flow logs record traffic metadata, not packets.
“Diagnose a site-to-site VPN gateway problem” → VPN troubleshoot. Trap: Connection troubleshoot is a point-in-time test from a VM, application gateway or Bastion.
“Packet capture needs an agent on the VM” → AzureNetworkWatcherExtension. Trap: Azure Monitor Agent is not the extension packet capture uses.
“How long can a continuous packet capture (preview) run?” → At most seven days (604,800 seconds). Trap: A standard capture session defaults to a 5-hour (18,000 second) limit.
“Create a new NSG flow log in 2026” → Not possible: NSG flow logs retire Sep 30, 2027 and no longer allow new ones. Use virtual network flow logs.
“Flow log storage account in a different region than the VNet” → Not supported: same region as the VNet. Trap: The paired region isn't an exception.
“An NSG flow log stopped after the storage account access keys were rotated” → Disable and re-enable the flow log. Trap: You don't need to recreate the storage account.
“Compliance wants flow logs kept for one year” → Standard general-purpose v2 storage with retention. Trap: Premium storage isn't supported, and retention rules need general-purpose v2.
“Connection monitor source is an on-premises machine” → Azure Arc agent plus Azure Monitor Agent. Trap: The Log Analytics agent is no longer supported for Connection Monitor.
“Connection monitor source is an Azure VM” → Network Watcher extension. Trap: Azure Monitor Agent is the on-premises path, together with Azure Arc.
“Connection monitor test shows Indeterminate” → No data (check the workspace and metrics). Trap: A breached threshold shows Fail or Warning, not Indeterminate.
“4 sources, 3 destinations and 2 test configurations” → 24 tests. Trap: The count multiplies; it doesn't add.
“Network contributor can't configure flow logs to storage” → The role has no Microsoft.Storage actions: add storage permissions or use Contributor.
Sources
- Azure Network Watcher overview
- Connection Monitor overview
- NSG flow logs overview
- Virtual network flow logs
- Migrate NSG flow logs to virtual network flow logs
- Packet capture overview
- Network Watcher role-based access control permissions
- az network watcher
Checked against Microsoft Learn on November 13, 2026.