Estimated time: 30 minutes
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.
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
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 | |
Resource group | task-alert |
Action | |
Name | email-action |
Action type | Email/SMS/Push/Voice |
Checked | |
<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 |
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.
Having trouble completing this task? View the demonstration video to see how to do it.