Microsoft Azure

Monitor Your Website's Availability with Azure Application Insights

Do you know the uptime statistics for your website? If not, Azure App Insights makes the statistics easy to find. App Insights can execute both basic and multi-step availability tests against any http or https URL. It doesn’t matter if your site is hosted on a VM, in Azure App Services, or on a Raspberry Pi in your closet. If the web site is public, AppInsights can run these availability tests in addition to collecting telemetry, metrics, and errors.

The first step is to create an App Insights resource in Azure. If you’ve never setup App Insights before, then you can follow the directions in Microsoft’s App Insights overview.

Once the resource is ready, go to the Availability blade and click the “Add Test” button. If you created App Insights in concert with an App Service resource, Azure might have already configured a default test. You can click on the Details tab to see the list of all existing tests.

Sponsored Content

Passwords Haven’t Disappeared Yet

123456. Qwerty. Iloveyou. No, these are not exercises for people who are brand new to typing. Shockingly, they are among the most common passwords that end users choose in 2021. Research has found that the average business user must manually type out, or copy/paste, the credentials to 154 websites per month. We repeatedly got one question that surprised us: “Why would I ever trust a third party with control of my network?

There are two types of tests in App Insights. The first is the basic ping test. With the ping test you give AppInsights a single URL to examine. The other type of test is the multi-step web test where you give App Insights an XML .webtest file. If you’ve ever generated load or web tests using Visual Studio, then you’ll recognize the .webtest file extension. Just be aware that Microsoft has deprecated webtest features in Visual Studio, so I’d stick to using the ping test.

Test Configuration

With the ping test, App Insights will send a web request to the URL you specify and watch for a timely response. You can setup a ping test to parse dependent requests, meaning if your test URL responds with HTML, App Insights can go looking for resources embedded in the HTML, like script and image resources. App Insights will fire off requests for these embedded resources, too.

Configuring availability tests in App Insights


You can configure the test frequency to run tests every 5, 10, or 15 minutes. What’s even more interesting is that you can specify multiple locations to originate the test requests. I have an availability test for my personal web site, for example. I host my site,, in Azure’s East US region. I run availability tests from East US, West US, UK South, North Europe, and Australia East regions. It’s interesting to see the latency difference between tests that start from opposite sides of the earth. Most of the test requests from the East US respond in less than 110 ms. The high points you see in the chart below are the occasional requests from Australia that run more than 500 ms.

Availability results over the last 24 hours.


For each test you can specify the criteria for success. With my site, for example, I look for an HTTP status code 200 in the response, and I ask the response time to be less than 30 seconds. I also configured App Insights to fire an alert of at least 3 locations fail the basic test in a 5 minute window.

App Insights saves all the test results so you can explore the results later, either by charting the results with a custom time range right from the Azure portal or sending queries to the App Insights API. You can drill into failures and, if you hook your application telemetry into App Insights, look at telemetry around the time of a test. I had one test recently that stood out because the test waited over 90 seconds for a response. Taking a closer look, I saw the response never reached my web site, and I could sleep better knowing the problem was not in my code or configuration. I could blame the slow response on a DNS server.

Additional Resources

App Insights gives you everything you need to monitor the availability of your web sites, and more. Here are some additional resources to find out more.

Related Topics:


Don't have a login but want to join the conversation? Sign up for a Petri Account

Comments (1)

One response to “Monitor Your Website’s Availability with Azure Application Insights”

  1. <p>I just finished setting this up myself as a multistep <span style="color: rgb(34, 34, 34);">webtest </span>and am seeing that this feature is getting deprecated? Such a bummer.</p>

Leave a Reply

13 Email Threat Types to Know About Right Now

As email threats evolve and multiply, keeping track of them all—and staying protected against the many different types—becomes a complex challenge. Today, that requires more than just the traditional email gateway solution that used to be good enough.

In this eBook you will learn:

  • What are the most common and challenging email attacks for organizations?
  • How to defend against sophisticated email threats, such as spoofing, social engineering, and fraud
  • How to protect employees at the inbox level with the right technologies and security-awareness training
  • How to use a multilayered protection strategy to reduce susceptibility to email attacks and better defend your business and employees

Sponsored by: