The goal of this task is to configure and test an alert for an existing resource. This includes creating an action group and an alert rule; and triggering the alert.

Configure an alert rule for a web app

When you log in to Azure with the provided credentials, you will find all the required resources in the resource group.

Go to the app service created in your resource group.

Navigate to the Alerts of your web app and open the Action group as highlghted below.

Click on Create to create a new action group.

Name the action group as task-alert-ag and click on Next to configure the notifications.

Name the notification as email and select the type as Email/SMS message/PUSH/Voice.

A new wizard to configure the notification will open.

Select the email option and provide your email. Click on OK to save this notification setting.

Click on Review + Create after configuring the notification.

Click on Create after the validation to create the action group.

After the action group is created, go back to the alerts for your web app. Click on Create and select Alert rule to create a new alert rule.

As you are creating this rule from the web app, scope will be automatically assigned to web app. Click on Add condition to create a new condition for alert rule. By default the alert rule creation page open with the condition configuration wizard.

In the condition configuration, select the signal as Http Server Errors.

Configure the alert logic as below:

Set the frequencies to 1 Minute.

Click on Next to configure the actions.

Click on Select action groups to select action group for this alert rule.

Select the action group you created earlier and click on Select.

After the action group is selected, click on Next to enter the details for this alert rule.

Set the severity level to 3 and name the rule as task-alert-ar. Click on Review + Cretae.

After the validation is done, click on Create to create the alert rule.

Generate an alert

Go to the overview of the web app and click on Browse to open the web app in new tab.

A demo web app will open in new tab. Click on Network load to create some netwrok activities.

Configure the load as below:

Click on Execute to create some network load.

You will see that in some time there are some request made to the server of our web app. There will be some errors with 500 status. This means that there was a server error in that request.

Verify the alert

Wait for 5 to 10 minutes and you will get an email of your mail address from microsoft. You will see that the alert was triggered.

Go back to the alerts of web app and you can see that one alert is triggered. Open this triggered alert.

You can check the summart of alert, there were 12 server error at the time of trigger.

You can also scroll down to see which alert rule was triggered. What was the reason for which the alert was triggered.

Our lab is now complete.