Introduction
The Azure connection monitor is a perfect monitoring tool that generates synthetic traffic to test the connectivity and measure response time; in this article, we will learn how to monitor Network connectivity from Azure Virtual Machine to On-premises Servers.
Prerequisites
- Azure Virtual Machine
- Active VPN Connection
- On-premises Server IP Address
Step 1: Open the Azure Virtual machine, click Extension + applications under Settings, and click + Add to install the Microsoft Monitoring Agent.
Step 2: Select the Network Watcher Agent for Windows, Click Next, and then click Create.
Step 3: Open the Network watcher, click the Connection monitor under Monitoring, and then click + Create.
Step 4: Enter the name for the Connection Monitor and click Next: Test groups.
Step 5: In the Add test groups details page, enter the name for the test group, and click Add source.
Step 6: Select the source type as Virtual Machines, select the Virtual Network you need to monitor the connectivity from source to destination, select the Virtual Machine, and click Add endpoint.
Step 7: Enter the name for the Test configuration Name, select the ICMP-Packets under the Protocol, and then click Add Test Configuration.
Step 8: On the Add Destination part, select the External Addresses and click Add Endpoint.
Step 9: In the Endpoint (URL/IP), enter the IP address for your On-premises server IP address and click Save.
Step 10: We have successfully added the Sources, Test configurations, and Destinations, so click Add Test Group and Next: Create Alert to create the alert.
Step 11: Select Create action group, enter the email address, click Create action group, and click Done.
Step 12: Click Review + Create button to create the connection monitor.
Step 13: Now the connection monitor status is enabled, and there are no Fail or Warning alerts in the monitor.
Step 14: To test the alert, I’m going to delete the VPN Connection, so go to the Local Network Gateway, select the connection, right-click the connection, and click Delete.
Step 15: We got an alert email from Azure Monitor.
Step 16: When we open the connection monitor, it shows a Fail notification.
Summary
In this article, we learned how to configure a connection monitor from Azure to an On-Premise network; if you have any questions, feel free to comment under this article.