Want an alert when your website or web application goes down? Here is how you can do it through Azure Availability.
Tags: azure, availability, website
Published: 2023-09-03 06:36:23

When your web application on the production goes down or the website that you have created crashes, you may want an alert. Otherwise, it may go unnoticed until someone complains or you may have to check it every day manually, right?

However, there is a solution. Azure provides a functionality where you can receive email, phone call, sms or even a push notification when your web application goes down.

The website you have need not to be hosted on azure. You can also configure web apps which are internal websites ie behind the firewall.

This service is a paid service but with nominal cost.

We will see how you can configure Availability Tests & Alerts step by step.

1) Go to Azure Portal. Open **Application Insights**. You can search for this service in the search bar.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e7qp06ogtprg9hjm6ocb.png)

2) Click on **+ Create** button.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7jb8sziggejmpjz2jfyj.png)

3) Fill in the required information and click on **Review + create** button.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wj1xnpz8ott622nkxwsn.png)

4) After the deployment is completed. Click on **Go to resource.**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k59j1b14koxy2lafyhqx.png)

5) Look for **Availability** option under Investigate section in the left side menu.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uvc7zov2x4rf841si37z.png)

6) You can now see the below screen. We will be creating a **Classic Test** here. However, you can also create **Standard Test**.

The difference between Classic and Standard is that in Standard Test you can also check SSL certificate validity. You can HTTP verb of your choice from the list and add custom header. You can check specific content from the response. In short, Standard is an advanced version of the Classic Test.

We will be going through Classic Test here. Click on **+ Add Classic test** button.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5w4sfmp8xfgl9ov92b4i.png)

7) Fill in the information such as Test name, URL, whether you want retries or not, Test locations from where the website will be pinged such as West Europe, Southeast Asia and many others from the list. Multiple locations are recommended. Click on **Create**.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xizya86ecy5z60cj0hv8.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ucsohvwdwfadv66g7t3v.png)

8) It is time now to configure the alert. Click on the 3 dots icon ie context menu. Select **Open Rules (Alerts) page**.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i3j8uq4mszjjirs1z46z.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0kslz84elsfi87mkqtrv.png)

9) Click on the link that belongs to name column.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tjlz49h6836uzcyx2obw.png)

10) Click on **Edit** button.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ynm40dkxoz371lmzzrag.png)

11) Scroll down to **Action** section. Click on **Select action groups**.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9mzs39lr78qqw5zvei8l.png)

12) Click on **+ Create action group**.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dq5djsz7qzrwyfc8s5le.png)

13) Fill in the required information and click on **Review + create**. Click on **Create** again on next page.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nur9ye5o8kr2tsbiz9eu.png)


14) After creating successfully, scroll down and click on the link which belongs to **Actions** section - **Action group name** column.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9e9wi75vlor86maplhcq.png)

15) You can choose **Notification type** for Email/SMS/Push/Voice call and you can also choose **Action type** for the event such as webhook.

We will be configuring only for the email. Select **Notification type** as Email in **Notifications** section and a **Name** for it.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ba7wb2owhkrollfhrdcx.png)


16) Check Email checkbox and put your email address. Click on **OK**.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/haay08mta8gxnx4mzm7q.png)

17) Click on **Save Changes** button and that's all!

18) If you go to **Availability** service, it should show you the results of the tests as below.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zsrsblbe8ca90jqekbie.png)

**You should receive an email in case if website/web app goes down.**

You can setup same for web apps or websites which are in the internal network with some extra steps.