Lesson 2 of 2 Azure Network Watcher

Monitoring Connectivity Continuously with Connection Monitor

This lesson explains Connection monitor test groups, results and alerts, and how it differs from connection troubleshoot.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the components of a connection monitor.
  • Explain how Connection monitor results and alerts are interpreted.
  • Distinguish between Connection monitor and connection troubleshoot.

Components

A connection monitor resource is created in Network Watcher in the region of its sources and contains one or more test groups. Each test group combines sources, destinations and test configurations.

  1. Sources

    Azure VMs or scale sets with the Network Watcher extension, or on-premises and Arc-enabled machines with the Azure Monitor Agent, selected individually or by subnet or VNet.

  2. Destinations

    Azure VMs, URLs, FQDNs or IP addresses, such as a web endpoint, an on-premises server or a Microsoft 365 URL.

  3. Test configuration

    Protocol (TCP with a port, HTTP or HTTPS with method and status codes, or ICMP), test frequency, and success thresholds for checks failed (%) and round-trip time (ms).

  4. Output

    A Log Analytics workspace where results are stored for queries and alerts.

Every source tests every destination in its group at the configured frequency, for example every 30 seconds. Results are stored in the NWConnectionMonitorTestResult and NWConnectionMonitorPathResult tables.

Match the pairs

Parts of a connection monitor

Exam skills 5.1.6

Match each part of a connection monitor test group with an example.

Log in to try this activity Interactive activities are free with an account.

Interpreting results

The Connection monitor dashboard shows each test's state: Pass, Warning or Fail when checks failed or round-trip time exceed thresholds, together with trends of latency and failure percentage. Selecting a test shows the topology of the path hop by hop, with issues such as a blocking NSG rule, a UDR, a DNS resolution failure or high latency on a specific hop. Metric alerts on ChecksFailedPercent and RoundTripTimeMs notify through action groups. Connection monitor (classic) and Network Performance Monitor have been retired and migrated to this version.

Connection troubleshoot
DurationOne-time test
History and trendsNo
AlertsNo
SourcesOne Azure source
Choose when Diagnose a problem happening now
Connection monitor
DurationContinuous, periodic tests
History and trendsYes, in Log Analytics
AlertsYes, metric alerts
SourcesMany Azure and on-premises sources
Choose when Monitor reachability and latency over time

The following diagram shows a connection monitor test that checks calls from Azure VMs to an on-premises API.

Monitoring calls from Azure VMs to an on-premises API over a VPN. A Connection monitor test group uses the application VMs, with the Network Watcher extension, as sources and api.corp.contoso.com as the destination, with a TCP 443 test whose thresholds are 5% failed checks and 100 ms round-trip time; results go to Log Analytics for alerts and history.
The scenario is illustrative.
Sort into groups

Troubleshoot now or monitor over time?

Exam skills 5.1.6

Choose the tool that fits each requirement.

Log in to try this activity Interactive activities are free with an account.
Worked example

Monitoring a hybrid path

An application on Azure VMs calls an on-premises API at api.corp.contoso.com on TCP 443 over a VPN. The operations team wants an alert when calls fail more than 5% of the time or latency exceeds 100 ms, with history to show the VPN provider. What should you configure?

Create a Connection monitor with a test group whose sources are the application VMs (with the Network Watcher extension), destination api.corp.contoso.com, and a TCP 443 test configuration with thresholds of 5% checks failed and 100 ms round-trip time, writing to a Log Analytics workspace. Create metric alerts on ChecksFailedPercent and RoundTripTimeMs. Connection troubleshoot would test only once and keep no history.

Check yourself

Which two metrics are typically used for Connection monitor alerts?

Show answer

ChecksFailedPercent and RoundTripTimeMs.

Exam Tips

Remember for the exam

  • Connection monitor tests continuously; connection troubleshoot tests once.
  • Test groups combine sources, destinations and test configurations with thresholds.
  • Alert on ChecksFailedPercent and RoundTripTimeMs.
  • Azure sources need the Network Watcher extension; on-premises sources need the Azure Monitor Agent.