It’s really important that our customers’ websites are always up and running. We as developers, make sure that there are no issues left that cause the websites to go down. However, there might be some unexpected cases and reasons which might not be in our control and lead the websites to crash.
Given below are some such reasons.
- Web Server might have gone down
- Database server might also have gone down.
- Network issues
- DNS issues
It would be really useful if the application owner gets to know about these problems even before the customer notices; so that the application owner can consult the respective department to fix the issue.
Azure provides us the functionality of continuously pinging the website from different locations. This feature is called Endpoint Monitoring and this feature seems to be available only in classic portal. You can specify the 2 URLs of the Website and also configure to ping the URL from three different locations.
Navigate to “Configure” tab of the App Service in the Classic Portal, as shown below.
Somewhere in the middle of the “Configure” page, you can view the monitoring section, as shown below.
As shown below, you can create two end points. And, each endpoint could be monitored from three test locations.
Once you are done with configuring the End points, click on “Save” button, as shown below.
After a few seconds, the following message is displayed.
The App will now be pinged once every 5 minutes from each of the locations that you have configured.
In order to review if the End point monitoring is working or not, let’s navigate to the “All Settings” blade of the App Service and click on “Live HTTP Traffic”, as shown below.
As soon as you click on the “Live HTTP Traffic”, you will start seeing the following live graph which displays the number of requests and failed requests (if any), as shown below.
If you hover your mouse on any of the data points, you will see the number of requests on that particular time, as shown below.
Please note that I just created this App Service and didn’t even open the App Service in my browser. These requests are from the End point monitoring service that we just configured from our Azure Classic portal (It looks like this is not available in the new Azure portal).
To see if the requests are really originating from the US (that’s what we have done), enable the “Web Server Logs”.
And, also enable the “Azure Website – Logs Browser” extension.
Navigate to the Logs Browser extension and click on “Browse” button. You will be taken to the extension page where you will see the following.
After searching a bit, I found the following IP Address from where the request was originated.
And, did a lookup in http://whatismyipaddress.com site to find where the IP is hosted. As shown below, the IP Address is registered by Microsoft Corporation in the city of San Antonio of Texas State.
If you remember, one of the test locations we selected was San Antonio (City) of Texas (State).
That’s it. We have configured the End Point Monitoring for the App Service Web App.
Hope you enjoyed your article. Your feedback is really appreciated.