Monitor connection to a Virtual Machine using Connection Monitor

Network Watcher Connection Monitor is a pretty cool service in Azure, ever need to monitor a Virtual machine but third-party extensions cannot be configured?

Connection Monitor allows you to monitor Virtual Machines ports to ensure they’re still listening and reachable.

How does it work?

The connection is created from a Source Virtual Machine to your destination Virtual Machine, can be on same network or not, providing the destination IP has a valid route

How to configure a Connection Monitor connection

Have two available Virtual Machines available that can route to each other.

In this, I will be monitoring the RDP Connection (TCP/3389) between source and destination Virtual Machines

Note:- Network Security Group rule and any other additional firewall rules to be added for source -> destination:Port before a successful connection monitor connection is successful

Select Source Virtual Machine and Connection Monitor

This is the Connection monitor dashboard, any connections you create here are viewable.

Add a Connection to be monitored as below:-

Name: RDP
Subscription: Select Subscription
Source Virtual Machine: Virtual Machine for source of the connection
Destination: Can be an IP or Virtual Machine
Port: Destination Port to be monitored
Advanced Settings: None selected in this example but can increase probing interval rather than the default 60 seconds and include source port if required

rdp connection now able to be viewed in Connection Monitor

Selecting connection you can see it is currently reachable and accessible

Topology view is a nice feature as well, can assist in diagnosis if the connection monitor fails

Creating alerts

Alerts can be created for % probes failed & Avg. Round-Trip time in Azure Monitor and new preview alerts Checks Failed Percent & Round Trip Time

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s