Monitor your website availability for free with Azure Application Insights

Page content

Azure Application Insights is an Application Performance Management (APM) service that you can use to identify runtime exceptions, performance issues and alert on application health.  You can integrate it with DevOps to provide a mechanism to rapidly identify issues that can be experienced with rapid and frequent deployment of code.

It has a ton of functionality, and I can’t do it justice in this blog post, so go read more about it here!

Monitoring website availability for free!

You probably ended up on this page because you’re looking for a way to monitor website availability and possibly you want to do that for free.  Well the good news is App Insights will do that for you and I’ll run you through what you need to do to set it up.  You don’t need to run your website in Azure to use Application Insights as an availability monitor and you can sign up to a free Azure account to use this functionality here.

Firstly i should call out the free availability monitoring is for a single step test, i.e. go to this webpage expect this response, report if it fails.  If you want a multi step test, i.e. browse to this page, add item x to your basket, go to the checkout, then you’ll need to pay for that.  At the time of writing multi step tests are charged per defined test per month, at a flat rate regardless of how many times you run that test or locations you run it from.

You can get pricing information here – i’d recommend you review the pricing before you set anything up, it could change and while I’ll update this post to reflect that I probably won’t do that immediately.

I use the free availability monitoring for my blog.  It alerts me if the site goes down, and it gives me some basic response time information which I can use to make sure the site is performing how I expect.

alt wording

You’ve the ability to drill down on the data points in the above chart, which will provide further details on the transaction as shown below:

alt wording

However I should call out that, details for every successful results are not stored, so while you’ll see all details on the failures, you might not get the exact success data point that you want details on.

Setting up an Availability Test

Setup is straightforward…

  • Go to the Marketplace and search for Application Insights.

alt wording

  • Select Application Insights and click Create.
  • Provide a Name and make sure the Application Type is set to ASP.NET web Application and create a new Resource Group or use an existing one and click Create.
  • After a few seconds you should see a notification to say setup is complete, click Go to resource.

alt wording

  • Your new App Insights service will open, within the blade under Investigate click Availability.
  • Click Add test.
  • Provide details for your test similar to those shown below and click Create.  Ensure you select URL ping test as the Test type.

alt wording

  • You should now see your test listed under Availability.

alt wording

  • Click on your new test on the screen that loads click Edit alert.

alt wording

  • Within the alert condition you might want to edit the default alert criteria, it defaults to 2 locations failing from the 5 you’ve chosen to test from¹.
  • Within the alert details you can provide a description for the alert and set a severity.
  • If you have an existing action group setup skip this step, otherwise, click New action group and provide details similar to those shown below.

alt wording

  • Click Select action group and select your existing or newly created action group.
  • Finally click Save to save all the change you’ve just made.

alt wording

  • At this point you should be able to click Availability in the blade and now see data points, if you don’t click Refresh.

You should be good to go!

¹Last call out, review your new test and make sure you’re happy with the frequency of the test, (5, 10 or 15 mins) and also make sure you chose locations to test from that are close to your site or your target audience.