Your profile

One profile for every MSDEVBUILD site. Only you can see it, and the site owner if you write in.

Lesson 44 of 47
❮Prev Next❯

Azure Monitor Insights, Network Watcher and Connection Monitor

Module 5: Monitor & Backup ⏱ 11 min read Updated

Your note

My notes for this lesson

Select any text in the lesson to highlight it or add a note. Saved in this browser.

    No highlights yet. Select a sentence in the lesson, then pick a colour or add a note.

    All my bookmarks and notes

    Reading settings

    For every lesson, saved in this browser.

    Text size
    Line spacing
    Font

    With IaaS you rent the virtual machine. Microsoft looks after the building, power and hardware; you patch the operating system.

    30-second answer

    Azure Monitor Insights are ready-made monitoring views per service. VM insights uses the Azure Monitor Agent and a data collection rule to show performance trends and a dependency Map. Storage insights and Network insights are built on platform metrics and need no setup. Network Watcher is the regional network toolbox: Topology, Connection monitor, IP flow verify, NSG diagnostics, Next hop, Effective security rules, Connection troubleshoot, Packet capture, VPN troubleshoot and flow logs. Connection monitor runs TCP, HTTP or ICMP tests from an agent on a source VM to a destination, records checks failed (%) and round-trip time, and can raise an alert.

    Simulate it » No Azure account needed

    Exam objective: 5.1.5 Configure and interpret monitoring of virtual machines, storage accounts, and networks by using Azure Monitor Insights. 5.1.6 Use Azure Network Watcher and Connection monitor. (Skills measured as of April 17, 2026)

    Simulations

    Feel it before you read it. No account needed, nothing leaves this page.

    Azure portal: VM insights and a Connection monitor test Enable VM insights and create a Connection monitor.
    </> Embed

    Embed this simulation

    Free for trainers, teachers and bloggers. Paste this into your page:

    Loading the portal…

    Open <strong>Monitor → Insights → Virtual Machines</strong>. Both VMs show <strong>Not monitored</strong>. Select vm-app01 and <strong>Enable</strong>.

    👆 Click the glowing item in the portal to continue

    Read the steps as text
    1. Open Monitor → Insights → Virtual Machines. Both VMs show Not monitored. Select vm-app01 and Enable.
    2. VM insights uses the Azure Monitor Agent and a data collection rule that sends performance data (and, if you want, the connection map) to a workspace.
    3. Performance shows trends across VMs and Map shows which processes talk to which servers. Storage accounts insights needs no setup: it’s built on platform metrics.
    4. Next, watch the path from the app to SQL. Search for Network Watcher.
    5. Type network watcher in the search bar and pick Network Watcher under Services.
    6. Network Watcher is turned on automatically in each region where you have a virtual network. Open Connection monitor and select + Create.
    7. A test group has sources, destinations and a test configuration. Here: TCP 1433 every 30 seconds, failing if more than 5% of checks fail or the round trip passes 100 ms.
    8. Tick Create alert so ag-ops hears about a failing path. Results go to the Log Analytics workspace.
    9. After someone adds a deny rule, the monitor turns red and its topology points at the hop. The diagnostic tools under it confirm which rule.

    🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.

    😟 THE PROBLEM

    The app can’t reach SQL and three teams blame each other.

    😊 THE SOLUTION

    Let Connection monitor test the path and point at the hop that drops it.

    • Is it the VM or the network?✓ VM insights performance and map
    • Problems found by users✓ Tests every 30 seconds with alerts
    • Which rule blocks 1433?✓ Topology plus IP flow verify
    🛠️ Solved with: Insights and Connection monitor

    Start with a question

    Your water pressure is low. Is it your tap, your pipes or the street?

    A plumber doesn’t guess. First they look at the meter by the door (that’s the overview). Then they test water at the tap every few minutes for a day to catch the drop when it happens. When it drops, they walk the pipe and find the valve someone half closed.

    Azure Monitor Insights are the meters: ready-made views of your VMs, storage accounts and networks. Network Watcher is the plumber’s kit. Its Connection monitor keeps testing the path from your app to its database, and its diagnostic tools find the exact valve, usually an NSG rule or a route, that closed.

    Explain it like I’m 10

    The technical explanation

    Azure Monitor Insights

    Insights are curated monitoring experiences under Monitor > Insights (and on each resource’s Monitoring > Insights blade).

    InsightWhat you seeWhat it needs
    VM insightsPerformance: CPU, available memory, logical disk space, network, compared across VMs. Map (optional): processes and their connections to other serversAzure Monitor Agent + a VM insights data collection rule sending to a Log Analytics workspace (data in InsightsMetrics, and VMProcess/VMConnection for Map)
    Storage insightsCapacity, transactions, latency, availability and failures across all storage accountsNothing: built on platform metrics
    Network insightsHealth and metrics of virtual networks, load balancers, gateways, Application Gateways, a topology view, and links to Network Watcher toolsNothing: built on platform metrics and resource health
    Container insights, Application InsightsAKS clusters, appsAgents or SDKs (covered elsewhere)

    Enable VM insights: VM > Monitoring > Insights > Enable, or Monitor > Insights > Virtual Machines > Not monitored > Enable. Choose the data collection rule (or create one), whether to collect processes and dependencies (Map), and the workspace. The portal installs the Azure Monitor Agent for you.

    # The CLI path: a VMInsights data collection rule plus an association per VM
    az monitor data-collection rule create -g rg-ops -n MSVMI-law-contoso-ops \
      --location eastus --rule-file vminsights-dcr.json
    az monitor data-collection rule association create --name vmi-vm-app01 \
      --rule-id <dcr id> --resource <vm id>
    az vm extension set -g rg-ops --vm-name vm-app01 \
      --name AzureMonitorLinuxAgent --publisher Microsoft.Azure.Monitor --enable-auto-upgrade true

    Interpreting VM insights: look at the P95 line, not just the average, to see the busy moments; sort the Top N lists to find the VM that’s short of memory; and use Map to see which servers a VM talks to before you change a firewall rule.

    Network Watcher

    Network Watcher is a regional service. Azure turns it on automatically in a region when you create or update a virtual network there, and puts it in the NetworkWatcherRG resource group. Its tools:

    GroupToolAnswers
    MonitoringTopologyWhat’s connected to what in this VNet?
    Connection monitorIs the path from A to B healthy right now, and when did it last fail?
    DiagnosticsIP flow verifyIs this 5-tuple allowed or denied on this VM, and by which NSG rule?
    NSG diagnosticsSame idea, for any source and destination, across NIC and subnet NSGs
    Next hopWhere does a packet from this VM go next (Internet, VirtualAppliance, VNet peering, None) and which route table decided?
    Effective security rulesThe merged NSG rules that apply to a NIC
    Connection troubleshootA one-off connectivity test between a VM and an endpoint, with hops
    Packet captureA capture file of traffic on a VM
    VPN troubleshootWhy a VPN gateway or connection is unhealthy
    LogsFlow logs (VNet flow logs) and Traffic analyticsWho talked to whom, how much, allowed or denied

    New NSG flow logs can no longer be created and NSG flow logs retire in September 2027, so use VNet flow logs.

    Connection monitor

    A connection monitor contains one or more test groups. Each test group has:

    • Sources: Azure VMs or scale sets with the Network Watcher Agent extension (the portal installs it), or on-premises and other-cloud machines through Azure Arc with the Azure Monitor Agent.
    • Destinations: Azure VMs, or external addresses (FQDN, URL or IP), including Microsoft 365 endpoints.
    • Test configurations: protocol TCP, HTTP or ICMP, port, test frequency (for example every 30 seconds), and success thresholds: checks failed (%) and round-trip time (ms).

    Results go to a Log Analytics workspace (tables NWConnectionMonitorTestResult and NWConnectionMonitorPathResult). You can create an alert in the wizard, which uses a metric alert on Checks failed percent or Round-trip time and calls an action group. The topology view in the results shows each hop and flags the one with issues.

    Portal path: Network Watcher > Monitoring > Connection monitor > + Create. Tabs: Basics, Test groups, Create alert, Review + create.

    az network watcher connection-monitor create --name cm-app-to-sql --location eastus \
      --endpoint-source-name vm-app01 --endpoint-source-resource-id <vm-app01 id> \
      --endpoint-dest-name vm-sql01 --endpoint-dest-resource-id <vm-sql01 id> \
      --test-config-name tcp-1433 --protocol Tcp --tcp-port 1433 --frequency 30 \
      --workspace-ids <workspace id>
    Architect level Connection monitor versus the one-off tools

    Connection troubleshoot and IP flow verify answer a question once, from the state at that moment. Connection monitor runs the same kind of check every few seconds and keeps history, which is what you need for problems that come and go. A common workflow: Connection monitor alerts you, its topology points at a hop, and IP flow verify or Next hop names the rule or route.

    Cost is per test: the first 10 tests a month are free, then roughly $0.30 per test a month (illustrative), plus Log Analytics ingestion for the results. A “test” is one source, destination and configuration combination, so a mesh of 10 sources and 10 destinations is 100 tests.

    Real-world business scenario

    E-commerce

    Tailwind Traders (fictional)

    The problem
    Checkout failed for a few minutes at random times. The app team blamed the network, the network team blamed SQL, and by the time anyone looked, it worked again.
    What they used
    VM insights on the web and SQL VMs showed memory was fine and the Map confirmed the app only talked to vm-sql01 on 1433. A Connection monitor tested TCP 1433 from both web VMs every 30 seconds with an alert to the ops action group. The next failure showed 100% checks failed at the NSG hop for two minutes. IP flow verify named a deny rule pushed by a nightly automation script.
    Why that choice
    Continuous tests caught the short outage, the topology pointed at the hop, and a one-off diagnostic named the exact rule.
    The result
    The script was fixed the same day and checkout failures stopped. The monitor stayed in place and has alerted twice since, both within a minute.

    When to use it and when not to

    ✓ Use it when…

    • You need guest memory, disk and dependency data from VMs: VM insights.
    • You want a no-setup view across storage accounts or network resources: Storage or Network insights.
    • A connection fails now and then and you need history and an alert: Connection monitor.

    ✕ Think twice when…

    • Using Connection monitor to answer a one-time "is port 443 allowed" question. IP flow verify is quicker.
    • Expecting VM insights to work on a VM with no agent or data collection rule.
    • Creating new NSG flow logs. Use VNet flow logs.

    ↔ Alternatives to consider

    • IP flow verify, Next hop, NSG diagnostics for one-off troubleshooting.
    • Application Insights availability tests to test a public website from around the world.
    • Metric alerts on load balancer health probe status for back-end health.
    Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

    Test yourself with exercises

    5 original practice questions in the AZ-104 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.

    Question 1

    Question 1 of 5

    You need to view the available memory and logical disk free space of 30 Azure virtual machines, and a map of the processes that connect to other servers. What should you enable?

    Question 2

    Question 2 of 5

    You need a view of capacity, transactions, latency and availability across all storage accounts in a subscription. The solution must require no configuration. What should you use?

    Question 3

    Question 3 of 5

    An application on VM1 intermittently fails to connect to a SQL Server instance on VM2 on TCP port 1433. You must continuously test the connection, record the round-trip time and be alerted when checks fail. What should you configure?

    Question 4

    Question 4 of 5

    You need to determine whether inbound TCP traffic on port 3389 from 203.0.113.10 to a virtual machine is allowed, and which network security group rule applies. Which Network Watcher tool should you use?

    Question 5

    Question 5 of 5 · Select 3

    You plan to use an Azure virtual machine named VM1 as a source in Connection monitor. Which statements are true? Select all that apply.

    Interview preparation

    Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

    Beginner What does VM insights give you that the VM's Metrics blade doesn't?

    Model answer

    Guest-level data. Host metrics show CPU, disk and network from outside, but VM insights uses the Azure Monitor Agent inside the VM, so you get available memory, logical disk free space, and a map of which processes connect to which servers. It also compares many VMs at once.

    Intermediate The app server sometimes can't reach the database and nobody can catch it happening. What would you set up?

    Model answer

    A Connection monitor with the app VM as the source and the database VM as the destination, a TCP test on 1433 every 30 seconds, thresholds on checks failed and round-trip time, and an alert to the ops action group. The history goes to Log Analytics, so I can see exactly when it failed and which hop dropped it.

    Experienced developer Connection monitor says a path is failing at the NSG hop. How do you confirm the rule?

    Model answer

    IP flow verify with the VM, direction, protocol, local and remote IP and port tells me allowed or denied and names the rule. NSG diagnostics does the same for a wider set of inputs and also checks the subnet NSG. Effective security rules shows the merged rules on the NIC.

    Scenario Security wants a record of which IPs talk to the payment subnet. What do you turn on?

    Model answer

    VNet flow logs on the virtual network, stored in a storage account, with Traffic analytics into a Log Analytics workspace so we can query and chart flows. New NSG flow logs can't be created any more, so VNet flow logs are the current choice.

    Quick revision

    Key points

    • VM insights needs the Azure Monitor Agent and a data collection rule; it shows Performance and an optional dependency Map.
    • Storage insights and Network insights come from platform metrics, so there's nothing to install.
    • Network Watcher is regional and enabled automatically with your first virtual network in a region (resource group NetworkWatcherRG).
    • Connection monitor tests TCP, HTTP or ICMP from sources (Azure VMs with the Network Watcher Agent, or Arc machines with the Azure Monitor Agent) to VMs, FQDNs, URLs or IPs.
    • Diagnostic tools - IP flow verify (allowed or denied, which rule), Next hop (which route), Effective security rules, NSG diagnostics, Connection troubleshoot, Packet capture, VPN troubleshoot.

    Important terminology

    VM insights
    Azure Monitor's view of VM performance and dependencies, collected by the Azure Monitor Agent through a data collection rule.
    Storage insights
    A built-in workbook that shows capacity, transactions, latency and availability across storage accounts from platform metrics.
    Network insights
    A built-in view of network resource health, topology and metrics across subscriptions.
    Network Watcher
    A regional service, enabled automatically when you create a virtual network, that provides network monitoring and diagnostic tools.
    Connection monitor
    A Network Watcher feature that continuously tests connectivity from sources to destinations and records failures and latency.
    Test group
    The part of a connection monitor that ties sources, destinations and test configurations together.
    Network Watcher Agent
    The VM extension that lets Azure VMs act as Connection monitor sources and run connection troubleshoot and packet capture.
    VNet flow logs
    Network Watcher logs of IP traffic through a virtual network, replacing NSG flow logs, optionally analysed by Traffic analytics.

    Common mistakes

    • Expecting VM insights data without an agent or a data collection rule.
    • Using IP flow verify for continuous monitoring. It's a one-off check; Connection monitor is continuous.
    • Planning new NSG flow logs. Use VNet flow logs.

    Exam tips

    • "Continuously monitor latency and packet loss between a VM and an endpoint" = Connection monitor.
    • "Why is this packet blocked, and by which rule?" = IP flow verify or NSG diagnostics. "Where does this packet go?" = Next hop.
    • "Capture traffic on a VM for analysis" = Packet capture (needs the Network Watcher Agent).

    Five quick revision questions

    1. 1.Which agent does VM insights use?Show

      The Azure Monitor Agent, configured by a data collection rule.

    2. 2.Which VM extension does Connection monitor need on an Azure VM source?Show

      The Network Watcher Agent extension.

    3. 3.Name the three Connection monitor test protocols.Show

      TCP, HTTP and ICMP.

    4. 4.Which Network Watcher tool tells you the next hop type for a packet?Show

      Next hop.

    5. 5.Which insight needs no setup and shows capacity and transactions across storage accounts?Show

      Storage insights.

    Official references

    Finished this lesson? Tick it off. Your progress is saved in this browser.

    Next up: Recovery Services Vaults, Backup Vaults and Backup Policies

    Studying with a friend? Send them this lesson

    It's free and needs no sign-up. Their progress saves in their own browser.

    Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

    Install MSDEVBUILD Azure

    Free · no account · works offline

    Save the whole course for offline ›

    Hi, I’m your Nimbus

    Your study buddy. Pick what we do next.

    MSDEVBUILD · Multi-Stack Dev Build

    Sign in to MSDEVBUILD

    One account for Azure certifications and the blog: sign in here and you are signed in on both. Your XP, streak, practice deck and certificate stay in sync on every device. Optional: everything works without an account.