Set Up Web Site Availability Monitoring Using Azure Application Insights In 5 Minutes

Have you got a website where availability matters?  Do you know what the user experience is like for people browsing your site?  Is your online store open for business 24/7?  Why would you even care?

Well, as soon as we are talking "business" and revenue generating web sites I guess the answer becomes obvious.  Customers won't put up with slow performing sites, with errors or unavailability when they want to shop with you.  They will simply move on to the next online store, and most likely not come back.

Of course there are many different ways, tools and services that allow you to monitor your web sites for availability and performance. However, since I'm looking into Azure Application Insights at the moment I was wondering what that would look like and whether this Microsoft option is capable and fit for purpose.

So I guess here goes...  for the purposes of this post let's use this sample raffle ticket sales promo site, which is already hosted in Azure. That's not a pre-requisite, but it is handy. So is it possible to get some web availability monitoring set up in under 5 minutes?  We'll give it a go.

Log into the Azure Portal. If you haven't already, set up an Application Insights workspace for your web application by selecting your web application, select Application Insights, give this new resource a name, and click OK.

How to create a new Application Insights resource in Azure Portal

Within a few seconds, you will get a confirmation in the portal stating that the resource has been created.  With a few clicks you can also instrument your Azure Web App for deeper monitoring, but for the purposes of this post we'll focus on web availability tests.

Select the Application Insights workspace linked to your web app, in our case the QLDNSWFundraising one.  As this app has already got some availability monitoring running, we actually have an Availability percentage straight on the Overview screen.  This is driven by a web test for the home page of this sample web site.

Let's click on Availability on the left and set up another web test monitor. This could be for a shopping cart page, a catalogue item search or any such thing.  You could even set up a multi step web test to simulate an actual customer transaction through your site.  That is however a topic for another post, and in fact Microsoft charges for these multi step web tests separately.


 You will see this following screen


Click Add test, give your new test a easily identifiable name - in our case Fundraising About - enter the actual URL of the page.  Leave the test frequency at default 5 minutes or change as desired.

You could at this point simply click Create and you would be done.  Pretty quick, hey?  But wait, there are a couple of neat advanced settings worth considering.

First, you may be interested in how availability and performance of your site differs from various geographic locations.  Why is that important?  Well, depending on where your site is hosted, performance and response times can vary greatly.  Of course there are mitigating options available such as content distribution/caching networks etc but that's another story.  Or it could be that local carrier outages prevent customers in some geographies from accessing your site but not others.  Good info for your customer service team.

Second, you may want to check the server response a little more in depth rather than just for a 200 response code (page served up okay).  This could be useful for a catalogue item search or the like, where you want to make sure the page returned has a specific word present.  This allows you to test dynamic pages that might be making database calls, which indirectly tests the health and availability of your full application stack.  Pretty neat trick, right?

Click on the Test locations and Success criteria sections respectively and configure these two blades with the desired settings.  Should look something like the following:



Finally click on Create and you have a working smart web availability test.  Within a few minutes, your new test will start running, and you will get the results back in the portal.  You can drill down on each test, check which locations may have failures or slow performance etc.



As a nice added bonus, you will also get a weekly digest email which will clearly show this week's performance and availability as compared to last week.  This can give you piece of mind that the site's performance is not deteriorating over time, or can highlight service level target issues etc.

In Summary

I'm actually quite impressed with the ease of setup, and the ease of accessing and consuming the availability and performance data.  Combine these web availability test with the full Application Insights instrumentation of your apps, and they will add significant value to your full stack monitoring.


Watch a Quick Demo

No comments:

Post a Comment

Most Popular Posts