Network Monitoring
Network Watcher · diagnostic tools · connection monitor · flow logs · traffic analytics · Network Insights · DDoS Protection · Defender for Cloud
By the tools4free.dev team · Last reviewed November 13, 2026
Practice questions for this topic →
Network Watcher basics
Network Watcher monitors and repairs the network health of IaaS resources (VMs, VNets, application gateways, load balancers). It isn't intended for PaaS monitoring or web analytics. Its tools fall in three groups: monitoring (topology, connection monitor), network diagnostic tools and traffic (flow logs, traffic analytics).
- Regional service. It's enabled in a region by creating a Network Watcher instance there. There is one instance per region per subscription.
- It's enabled automatically when you create or update a VNet in a region, at no charge and with no effect on your resources. If you opted out of automatic enablement, enable it manually in each region you use.
- Tools like IP flow verify need a Network Watcher instance in the subscription and region of the VM.
| Network Watcher limit | Value |
|---|---|
| Instances per region per subscription | 1 |
| Connection monitors per region per subscription | 100 |
| Test groups per connection monitor | 20 |
| Sources and destinations per connection monitor | 100 |
| Test configurations per connection monitor | 20 |
| Packet capture sessions per region per subscription | 10,000 (sessions only, not saved captures) |
| VPN troubleshoot operations per subscription | 1 at a time |
Network diagnostic tools
| Tool | Use it to | Key points |
|---|---|---|
| IP flow verify | Check whether a packet to or from a VM is allowed or denied | Tests NSG and AVNM admin rules on the VM's NIC. Returns Access allowed/denied and the rule name. TCP and UDP only; for ICMP or scale sets use NSG diagnostics. The VM must be running. |
| NSG diagnostics | Same question for a VM, scale set or application gateway | Accepts an IP, IP prefix or service tag. Can add a higher-priority rule to allow or deny the traffic. |
| Next hop | Find routing problems | Returns next hop type, IP address and route table ID for a destination IP. A UDR returns its route table; otherwise System Route. |
| Effective security rules | See all rules applied to a NIC | Shows rules from the NIC, the subnet, and the aggregate. |
| Connection troubleshoot | Test a connection at a point in time | From a VM, scale set, Bastion or application gateway v2, over TCP or ICMP, to a VM, FQDN, URI or IP. Finds NSG, route, guest-firewall, DNS and port problems. Agentless mode is in preview. |
| Packet capture | Capture traffic to and from a VM or scale set | Needs the AzureNetworkWatcherExtension VM extension. Save to local disk or a storage blob. Filters use the 5-tuple. |
| VPN troubleshoot | Troubleshoot virtual network gateways and their connections | One operation at a time per subscription. |
- Packet capture: default time limit per session is 18,000 seconds (5 hours). Set bytes per packet to 34 to capture only the IPv4 header. Continuous capture (preview) uses a ring buffer of rotating files and runs for the time you set or up to seven days, whichever is earlier. VM alerts can trigger a capture.
- Connection troubleshoot vs connection monitor: same kind of result, but connection troubleshoot tests once, connection monitor monitors over time.
- Next hop types returned: Internet, VirtualAppliance, VirtualNetworkGateway, VirtualNetwork, VirtualNetworkPeering, VirtualNetworkServiceEndpoint, MicrosoftEdge, None.
Connection monitor, topology, flow logs and traffic analytics
Connection monitor
- Continuous connectivity monitoring for Azure and hybrid endpoints. It measures packet loss and latency over TCP, ICMP and HTTP, and shows a topology of the path with per-hop metrics. Connection monitor (classic) is deprecated and no longer available.
- Sources need the Network Watcher extension: Azure VMs, scale sets, or Azure Arc-enabled on-premises hosts. The Log Analytics agent is no longer supported for on-premises sources. Destinations (VMs, URLs, FQDNs, IPs) need no extension. The portal installs the extensions for you.
- Entities: the connection monitor resource (regional), endpoints, test configurations (protocol, port, thresholds, frequency), test groups, and tests (one source, one destination, one test configuration). Three sources, two destinations and two test configurations make 12 tests.
- Data goes to a Log Analytics workspace and to Azure Monitor metrics. Metrics are kept 30 days by default; Log Analytics keeps data as long as you choose. You can set metric-based alerts.
- Test states: Pass, Fail (thresholds exceeded; with no threshold, 100% failed checks), Warning (over 80% of a threshold; default thresholds 750 ms RTT and 10% failed checks), Indeterminate (no data), Not Running (test group disabled).
- Endpoint status is re-evaluated every 24 hours, so a deallocated VM can show Indeterminate until the cycle ends.
Topology
An interactive view of resources and relationships across subscriptions, regions and resource groups. It's drawn from Azure Resource Graph, so a configuration change can take up to 30 hours to appear.
Flow logs
| NSG flow logs | Virtual network flow logs | |
|---|---|---|
| Status | Retire September 30, 2027. No new NSG flow logs can be created. | Replacement. Migrate to these. |
| Scope | Per network security group (subnet and NIC levels need separate logging) | Enabled at the virtual network; all supported workloads in it |
| AVNM security admin rules | Not supported | Supported |
| VNet encryption status | Not supported | Supported |
| VPN gateway, ExpressRoute gateway, Application Gateway | Not supported | Supported |
| Virtual machine scale sets | Supported | Supported |
- Flow logs work at Layer 4, are collected at one-minute intervals, and are written as JSON to a storage account. They don't affect your resources or traffic.
- The storage account must be in the same region as the VNet, in the same subscription or one in the same Microsoft Entra tenant, and standard (not premium). Rotating a customer-managed key breaks VNet flow logs until you disable and re-enable them.
- Disable NSG flow logs before enabling VNet flow logs on the same workloads to avoid duplicate records and cost.
- Billed per GB of flow logs collected (5 GB per month free per subscription); storage and traffic analytics are charged separately.
- After retirement, Azure deletes existing NSG flow log resources and stops supporting traffic analytics for them. It doesn't delete the records already in storage.
- Not supported for several services, including Azure Container Instances, Container Apps, Logic Apps, Functions, DNS Private Resolver and App Service. Outbound flows to an ExpressRoute circuit aren't recorded on the ExpressRoute gateway subnet; log them at the VM subnet or NIC.
Traffic analytics
Analyzes Network Watcher flow logs and adds security, topology and geography intelligence. It needs flow logs enabled and a Log Analytics workspace. It shows top talkers, allowed and blocked traffic, open internet ports and the most-blocking rules, and helps find misconfigurations.
Azure Monitor Network Insights
Azure Monitor for Networks (Network Insights) gives a visual view of topology, health and metrics for all deployed network resources without any configuration. It also gives access to connection monitor, flow logs, traffic analytics and the Network Watcher diagnostic tools.
| Component | What it shows |
|---|---|
| Topology | VNets and connected resources; drill down to a VM for traffic and connectivity insights |
| Network health and metrics | Inventory of network resources with resource health and alerts, filtered by subscription, resource group and type |
| Connectivity | Tests from connection monitor, with reachability based on checks failed (%) and RTT (ms) |
| Traffic | NSGs in scope and whether they have NSG flow logs and traffic analytics configured |
| Diagnostic Toolkit | Packet capture, VPN troubleshoot, connection troubleshoot, next hop, IP flow verify |
- All networking resources are visible by default. A subset is onboarded, which adds a resource-specific topology view and a built-in metrics workbook: Application Gateway, Azure Bastion, Azure Firewall, Azure Front Door, Azure NAT Gateway, ExpressRoute, Load Balancer and others.
DDoS Protection
Protects at layer 3 and layer 4. For layer 7 web protection, add a WAF. It is designed for services deployed in a virtual network; other services get default infrastructure-level protection. Infrastructure protection for every Azure service with public IPs comes at no extra cost.
| DDoS IP Protection | DDoS Network Protection | |
|---|---|---|
| Model | Enable on a public IP; no plan needed | DDoS protection plan linked to VNets; one plan across subscriptions in a tenant |
| Price | Per protected IP | Per 100 protected IP addresses |
| Basic SKU public IP | Not protected | Protected |
| DDoS Rapid Response, cost protection, WAF discount | Not available | Available |
| Same core features (always-on monitoring, L3/L4 mitigation, metrics, alerts, flow logs, Sentinel connector) | Yes | Yes |
- Enable: create a plan, then enable it on a VNet (new or existing), or add VNets from the plan. The plan and the VNet can be in different subscriptions of the same Microsoft Entra tenant. A built-in Azure Policy finds VNets without protection and can remediate.
- A VNet with DDoS protection enabled can't be moved to another resource group or subscription. Disable it, move, then enable again.
- Disabling protection doesn't delete the plan, and you still pay for the plan. To delete a plan, first dissociate all VNets.
- Limitations: a public IP attached to a NAT gateway isn't supported, nor are classic/RDFE VMs. Single-VM-behind-a-public-IP is supported but not recommended.
- Three auto-tuned mitigation policies (TCP SYN, TCP, UDP) per protected public IP, tuned by machine learning. Mitigation starts for an IP only when its threshold is exceeded. A custom policy (preview) sets fixed thresholds for Standard Load Balancer frontend IPs and turns off auto-tuning for that protocol.
Monitor DDoS Protection
- Telemetry is in Azure Monitor, viewable from the DDoS plan, the VNet or the public IP. Mitigation triggers (SYN, TCP, UDP) are visible in peace time; other telemetry only while under mitigation. Use aggregation Max.
- Alert: use the metric Under DDoS attack or not. 0 means no attack, 1 means under attack, so alert at threshold 1 with static, maximum, greater than or equal. Defaults: check every 1 minute, look back 5 minutes. Send it to an action group.
- Diagnostic logs (create a diagnostic setting) can go to Log Analytics, Storage, Event Hubs or Microsoft Sentinel. Attack analytics gives reports in five-minute increments during an attack.
- Test with a DDoS simulation partner (for example Red Button). You can only simulate against Azure-hosted public IPs in your own subscription, and they must be protected by Azure DDoS Protection.
Defender for Cloud: secure score, attack paths, cloud security explorer
| Network-related secure score control | Max points |
|---|---|
| Secure management ports (JIT VM access, NSGs) | 8 |
| Restrict unauthorized network access (adaptive network hardening, Private Link, Azure Firewall) | 4 |
| Protect applications against DDoS attacks (DDoS Protection, WAF) | 2 |
- Secure score aggregates findings into one score; higher means lower risk. The Microsoft cloud security benchmark (MCSB) is applied by default, and only built-in MCSB recommendations count. Preview recommendations don't count.
- Controls are calculated every eight hours. A control's score improves only when you remediate all of its recommendations. Use Fix, Enforce or Deny.
- Foundational CSPM is free. Defender CSPM (paid) adds attack path analysis, risk prioritization and the cloud security explorer. Attack path analysis and the cloud security explorer need agentless scanning (or vulnerability assessment on Defender for Servers).
- Attack path analysis (Defender for Cloud > Attack path analysis) finds externally driven, exploitable paths from an entry point (such as an internet-exposed vulnerable resource), along lateral movement, to a critical target (such as a database with sensitive data). Paths are sorted by risk level and come with recommendations that break the path. Roles: Security Reader, Security Admin, Reader, Contributor or Owner.
- Cloud security explorer (Defender for Cloud > Cloud security explorer) runs graph-based queries on the cloud security graph to find risks proactively: asset inventory, internet exposure, permissions, lateral movement. Use the query builder or prebuilt templates, share a query link, and download results as CSV. Data refreshes daily.
Attack path analysis answers "which attack paths are most urgent?". Cloud security explorer answers "which of my resources match this condition?".
CLI and PowerShell
| Task | Azure CLI | PowerShell |
|---|---|---|
| Enable Network Watcher in a region | az network watcher configure --resource-group 'NetworkWatcherRG' --locations 'eastus' --enabled | New-AzNetworkWatcher -Name 'NetworkWatcher_eastus' -ResourceGroupName 'NetworkWatcherRG' -Location 'eastus' |
| Start a packet capture | az network watcher packet-capture create --name 'myVM_1' --resource-group 'myResourceGroup' --vm 'myVM' --storage-account 'mystorageaccount' | New-AzNetworkWatcherPacketCapture -Location 'eastus' -PacketCaptureName 'myVM_1' -TargetVirtualMachineId $vm.Id -StorageAccountId $storageAccount.Id |
| Check the status of a packet capture | az network watcher packet-capture show-status --location 'eastus' --name 'myVM_1' | - |
| Stop a packet capture | az network watcher packet-capture stop --location 'eastus' --name 'myVM_1' | - |
| Create a VNet flow log with traffic analytics | az network watcher flow-log create --location 'eastus' --name 'myVNetFlowLog' --resource-group 'myResourceGroup' --vnet 'myVNet' --storage-account 'myStorageAccount' --traffic-analytics true --workspace 'myWorkspace' --interval 10 | New-AzNetworkWatcherFlowLog -Enabled $true -Name 'myVNetFlowLog' -NetworkWatcherName 'NetworkWatcher_eastus' -ResourceGroupName 'NetworkWatcherRG' -StorageId $storageAccount.Id -TargetResourceId $vnet.Id -FormatVersion 2 -EnableTrafficAnalytics -TrafficAnalyticsWorkspaceId $workspace.ResourceId |
| Create a VNet flow log (no traffic analytics) | az network watcher flow-log create --location 'eastus' --resource-group 'myResourceGroup' --name 'myVNetFlowLog' --vnet 'myVNet' --storage-account 'myStorageAccount' | New-AzNetworkWatcherFlowLog -Enabled $true -Name 'myVNetFlowLog' -NetworkWatcherName 'NetworkWatcher_eastus' -ResourceGroupName 'NetworkWatcherRG' -StorageId $storageAccount.Id -TargetResourceId $vnet.Id -FormatVersion 2 |
Exam Tips
Tick each tip once you can answer it without looking.
“Which NSG rule blocks traffic to or from a VM?” → IP flow verify: returns allowed or denied and the rule name. Trap: It tests only TCP and UDP rules on the VM's NIC. For ICMP, scale sets or application gateways use NSG diagnostics.
“Where is traffic to a destination IP routed?” → Next hop: type, IP address and route table ID. Trap: IP flow verify checks security rules, not routes. Next hop returns System Route when no UDR applies.
“Test a connection once vs watch it over time” → Connection troubleshoot tests at a point in time. Connection monitor monitors continuously (packet loss, latency).. Trap: Connection monitor (classic) is deprecated and no longer available.
“Capture packets from a VM remotely” → Packet capture. The VM needs the AzureNetworkWatcherExtension. Save to disk or a storage blob.. Trap: Default time limit is 18,000 seconds (5 hours). Filters are 5-tuple based.
“Network Watcher isn't available in a region after you opted out” → Create a Network Watcher instance in that region (one per region per subscription). Trap: By default it's enabled automatically when you create or update a VNet there, with no charge.
“Log IP traffic for a whole VNet, including gateways and AVNM rules” → Virtual network flow logs (storage account: standard, same region). Trap: NSG flow logs retire on September 30, 2027 and no new ones can be created. Disable them first to avoid duplicates.
“Visualize and analyze flow log data with top talkers and open ports” → Traffic analytics: needs flow logs and a Log Analytics workspace. Trap: It analyzes flow logs; it doesn't collect traffic itself.
“Monitor connectivity from an on-premises server to Azure” → Connection monitor with an Azure Arc-enabled host as the source. Trap: The Log Analytics agent is no longer supported. Destinations need no extension.
“A connection monitor test shows Indeterminate” → No data in the Log Analytics workspace. Check metrics; endpoint status is re-evaluated every 24 hours.. Trap: Fail means thresholds were exceeded (or 100% failed checks with no threshold).
“Get a built-in view of network health and metrics with no setup” → Azure Monitor Network Insights (topology, health, metrics, connectivity, traffic). Trap: It uses connection monitor and flow logs for the Connectivity and Traffic tabs; those must be configured.
“Needs DDoS Rapid Response, cost protection, WAF discount or Basic SKU public IP protection” → DDoS Network Protection. Trap: DDoS IP Protection has the same core features but is per public IP and lacks those.
“Protect a web app from layer 7 attacks too” → DDoS Protection (L3/L4) plus a WAF. Trap: DDoS Protection alone covers network layers 3 and 4.
“One DDoS plan for many subscriptions” → A single DDoS protection plan can link VNets across subscriptions in one Microsoft Entra tenant. Trap: A protected VNet can't be moved between resource groups or subscriptions without disabling DDoS protection first.
“Alert when an IP is under attack” → Azure Monitor alert on Under DDoS attack or not, static, max, greater than or equal to 1. Trap: 0 means not under attack, 1 means under attack.
“Public IP of a NAT gateway needs DDoS protection” → Not supported: DDoS protection doesn't support a public IP attached to a NAT gateway. Trap: NAT gateway also doesn't support public IPs with DDoS protection enabled.
“Improve secure score for network controls” → Remediate all recommendations in the control (Secure management ports 8, Restrict unauthorized network access 4, Protect against DDoS 2). Trap: Preview recommendations don't count. Controls are recalculated every eight hours.
“Find the externally exploitable paths to critical assets, ranked by risk” → Attack path analysis (needs Defender CSPM and agentless scanning). Trap: Cloud security explorer runs your own graph queries. It doesn't rank attack paths.
“Query the environment for internet-exposed resources with lateral movement” → Cloud security explorer: graph-based queries or prebuilt templates (needs Defender CSPM). Trap: Foundational CSPM is free but doesn't include the explorer or attack path analysis.
Sources
- Azure Network Watcher overview
- Enable or disable Azure Network Watcher
- IP flow verify overview
- Quickstart: Diagnose a VM traffic filter problem
- Next hop overview
- Connection troubleshoot overview
- Packet capture overview
- Manage packet captures
- Connection monitor overview
- View topology
- Virtual network flow logs
- Manage virtual network flow logs
- NSG flow logs overview
- Traffic analytics overview
- Azure Monitor Network Insights
- Azure DDoS Protection overview
- DDoS Protection tier comparison
- Quickstart: Create and configure DDoS Network Protection
- Monitor Azure DDoS Protection
- Configure DDoS Protection metric alerts
- Azure DDoS Protection features
- DDoS Protection fundamental best practices
- Azure DDoS Protection simulation testing
- Cloud secure score in Defender for Cloud
- Cloud Security Posture Management (CSPM)
- Security explorer and attack paths
- Identify and remediate attack paths
- Build queries with cloud security explorer
Checked against Microsoft Learn on November 13, 2026.