Task: Use Alerts

Video: Managing Alerts

Estimated time: 30 minutes

Goal

In this task you will configure and trigger an alert for a web app. First you will provision a web app loaded with a test application. Then you will configure an alert for any server errors. Finally you will use the test application to trigger the alert.

Pre-requisites

  1. Azure subscription

Requirements

  1. Provision a web app
  2. Configure an alert
  3. Trigger the alert

Requirement 1: Provision a web app

You will provision a web app by deploying an ARM template and verify that it works as expected.

az group create -n task-alert -l eastus
az group deployment create -n webapp -g task-alert --template-uri https://inedemoassets.blob.core.windows.net/taskfiles/azure/deploy-webapp.json

Requirement 2: Configure an alert

You will configure an action group and an alert on the web app. The action group will send an e-mail to you, and the action will trigger on any server errors.

Setting Value
Name standard-email
Short name email
Resource group task-alert
Action
Name email-action
Action type Email/SMS/Push/Voice
Email Checked
Email <your email>
Setting Value
Resource <your web app>
Condition Total Http Server Errors greater than 5
Action group standard-email
Alert name Web Server Errors
Description Send an alert whenever there are multiple server errors thrown.
Severity 3
Enabled Yes

Requirement 3: Trigger the alert

Finally you will use the test web application to trigger the alert. Navigate to the web app home page, then trigger the alert using the following process:

Note: It may take several minutes for the e-mail to arrive.

Clean up

Solution

Having trouble completing this task? View the demonstration video to see how to do it.