Application Monitoring

If application insights is not already setup for the application you want to monitor, you can follow the steps in Create an Application Insights resource to create a app insights resource to use to monitor your application.

Availability Testing

Basic availability testing can be done via the Azure Application Insights. This document on how to Monitor Web App Availability shows the steps required to set this up via the Azure portal.

Use the following information when completing the Create Test form.

  • Test name: [app-name]-availability-test
  • Test type: URL ping test
  • URL: Health Check Endpoint URL for the app*
  • Enable retries for availability test features: enabled
  • Test frequency: 5 minutes
  • Success criteria:
    • Test Timeout: 120 minutes
    • HTTP response: enabled
    • Status code must equal: 200
    • Content match: enabled
    • Content must contain: Healthy*

* These values could change per application. See Health Check Endpoints section for more information

Setup an alert

If you have just created the test, click on the ... context menu for the row in the Select availability test section for your test and select Edit Alert.

Otherwise you will need to navigate to Monitor -> Alerts pane. Then click the Manage alert rules button at the top of the page. Now find the test you would like to create an alert for and click on it's name.

You should now be on the Rules Management page for your test. Here you can select the default email notifications action or create a new action rule with custom notification settings.

Use the default email notifications

  • Click the Select action group button under the Actions section
  • Check the box next to i2-contributors-email-alerts
  • Click the Select button at the bottom of this pane

Create custom notification rules

  • Click the Create action group button
  • Enter the Action group name . This should be in all lowercase with words separated but -. Try to be descriptive about what the group does. For example, i2-contributors-email-alerts
  • Enter a Short name that is a shortened version of the name. ie. i2-email
  • Select the appropriate subscription. If we will pay for monitoring use I2 - Sandbox
  • Select the resource group for Application Insight resource that contains the test. This will usually be general-wustl-i2 but will be different if we are billing for monitoring or the application has it's own resource group.
  • To configure the actions for your group, please refer to the following documentation: Create and manage action groups in the Azure portal

Additional Information

Below are a few sections with additional information about Azure Monitoring that may be helpful.

Health Check Endpoints

Our applications (when possible) should implement a health check to be used by the monitoring system. This topic is broad and a bit out of scope for this document. This article provides an description of the pattern and how to implement it: Health Endpoint Monitoring pattern.

We will not provide examples that can be used in all applications. However, here is a brief overview of how to implement a health check endpoint in a ASPNET Core application.

public class BasicStartup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddHealthChecks();
    }

    public void Configure(IApplicationBuilder app)
    {
        app.UseRouting();

        app.UseEndpoints(endpoints =>
        {
            endpoints.MapHealthChecks("/health");
        });
    }
}

For more information please see this article: Health checks in ASP.NET Core

3rd party or "Closed" application monitoring

We can also add monitoring in scenarios that we need to monitor applications that we do not control the code base, are built using technology other than aspnet and/or is hosted outside of Azure.

This works the same was as described above but will require a new Application Insights resource to be created for the application we need to monitor if we want to bill for the monitoring costs.

The primary difference in the two scenarios is that we cannot add a health check endpoint specifically to monitoring. So in these cases, we can decided on what page to use for the availability check and what content to look for.

Additional Monitoring Scenarios

Azure monitoring provides many different options to monitor applications. These options fall outside the scope of this document. However, it should be noted that more advanced scenarios are supported but this tool set. Information on advanced monitoring scenarios can be found in the Azure documentation. I have included a few links here for reference.


Updated on August 7, 2025