Advertisement
Поиск  
Always will be ready notify the world about expectations as easy as possible: job change page
Feb 19

Send alerts when website is down — Azure Application Insights availability test

Send alerts when website is down — Azure Application Insights availability test
Автор:
Источник:
Просмотров:
1276

Introduction

Website downtime can be a critical issue for companies in industries such as Insurance, Healthcare, Finance, and Banking, especially for applications that are mission critical. It can lead to inconvenience for users and potentially result in significant financial losses. To proactively address this challenge, Azure Application Insights offers a powerful feature called availability tests. These tests enable you to monitor your website’s availability and receive timely alerts if the site goes down.

In this article, I will guide you through the steps to set up email, SMS, or voice notifications for your team members using Azure Application Insights.

Table of contents

Prerequisites

Before we look into the steps, make sure you have the following prerequisites are in place:

  • An Azure account with an active subscription.
  • A web application hosted on Azure
  • A Application Insights associated to the web application.

Now, let’s get started!

Step 1: Create Action Groups

Action Group allows you to define a set of notification and automated actions that can be triggered by alerts from various Azure services.

Action Group » Overview

Action Group Overview

Step 2: Add Standard test in Application Insights

Here are the steps to “Add Standard Test in Application Insights” under the “Availability” left navigation:

1. Access Azure Portal

2. Select your application insights

3. Navigate to availability from left nav

4. Click on Add Standard Test

5. Configure Application URL

Enter the complete URL of your website, including the protocol (e.g., https://www.example.com).

6. Select test locations

  • In the “Locations” section, you can choose the geographic locations from where you want to run the availability test. Azure offers a variety of locations worldwide to ensure comprehensive coverage.
  • Click on “Add location” to select additional testing locations if needed.

7. Configure HTTP response codes:

  • Under the “Availability” tab, you can specify the expected HTTP response codes that indicate your website is running correctly. These codes are used to determine whether the test passes or fails. — in this scenario select 200 status code
  • You can also set up more advanced scenarios by configuring content checks in the “Content” tab.

8. Save and create test:

  • After configuring the test settings, click the “Create” or “Save” button to create the availability test. Azure Application Insights will now regularly run this test to check the availability of your website from the selected locations.

9. Verification:

  • To verify that the test is working as expected, you can check the test results in the “Availability” section. It will display the status of the test and any detected availability issues.

Application Insights » Availability

Application Insights » Availability

Availability » Add Standard test

Availability » Add Standard Test

Add Standard Test » Results

Add Standard Test » Results

Step 3: Create Alert rule

Now that your availability test is set up, it’s time to create an alert rule to trigger notifications when issues arise. by default it already creates a Rule for this.

Click on “Open Rules Alerts page”

Update Alert Rule details like description, severity, automatically resolve alerts checkbox etc..

Configure Actions group

  1. Click on “Select Action group” section of the alert rule and choose “Action groups.
  2. Associate the alert rule with the Action Group you created in Step 1.

Alert Rule

Alert Rule

Alert Rule » Details

Alert Rule » Details

Alert Rule » Scope, Action, Condition

Alert Rule » Scope, Action, Condition

Conclusion

By following these steps, you can set up proactive monitoring and alerting for your website using Azure Application Insights availability tests. This ensures that your team members added in action groups are immediately notified when your website is downtime, allowing for quicker response times and minimizing user disruption.

References

Here are some helpful references for further information:

Похожее
Apr 3, 2013
IntroductionThis is just a simple article visually explaining SQL JOINs.BackgroundI'm a pretty visual person. Things seem to make more sense as a picture. I looked all over the Internet for a good graphical representation of SQL JOINs, but I couldn't...
Apr 16
Author: Dev Leader
In software engineering, composition plays an important role in object-oriented programming. If you’ve come across other articles or videos I’ve put out about object-oriented programming, you’ll know that I try to push composition over inheritance as much as I can....
Jun 8, 2023
Author: Juan Alberto España Garcia
At the end of this article you will understand what “^(?=.*[a-z])(?=.*[A-Z])(?=.*).*” meansIntroduction to C# Regex: why it’s a powerful tool for text manipulationBefore diving into the magical world of regular expressions, let’s get an idea of why using C# Regex...
Jan 9
Author: Juan España
Content index Understanding HttpClientHandler and its importance in C# What is HttpClientHandler in C# Significance of HttpClientHandler in .NET applications Delve deeper into HttpClient C# ...
Написать сообщение
Почта
Имя
*Сообщение


© 1999–2024 WebDynamics
1980–... Sergey Drozdov
Area of interests: .NET Framework | .NET Core | C# | ASP.NET | Windows Forms | WPF | HTML5 | CSS3 | jQuery | AJAX | Angular | React | MS SQL Server | Transact-SQL | ADO.NET | Entity Framework | IIS | OOP | OOA | OOD | WCF | WPF | MSMQ | MVC | MVP | MVVM | Design Patterns | Enterprise Architecture | Scrum | Kanban