Application Insights can assist you in determining the availability and performance of your web applications. In this lab, you deploy Application Insights into the Azure lab environment and use it to run a URL ping test against the sample web app.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Verify the Existence of Azure Resources
Log in to the Azure portal with the provided credentials. You should land in the resource group deployed as a part of the lab environment. Familiarize yourself with the resources already provisioned for you:
- An Azure web application service plan
- An Azure web app
- A Log Analytics workspace
If you do not land in the resource group, click on All Resources in the navigation hub menu to view the provisioned resources.
- Configure Application Insights for the Azure Web App
- In the Azure web app, enable Application Insights with a basic collection level under the .NET tab of Instrument your application.
Note: When enabling Application Insights, use the Log Analytics workspace that was provisioned as a part of the lab environment; do not create a new one.
- Verify that Application Insights is enabled.
- In the Azure web app, enable Application Insights with a basic collection level under the .NET tab of Instrument your application.
- Create and Configure the URL Ping Test
- Inside of Application Insights, choose Availability under Investigate to create a new URL ping test using the URL of the Azure web app.
- Modify the default alert rule for the ping test, creating a new action group with a notification to your email when the ping test fails (A failure is triggered when at least two errors are detected).
- Check your email to verify that the notification has been set up.
- Cause an App Service Failure
- Stop the Azure web app to create a failure in the URL ping test.
- You can monitor for the failure by selecting the ping test; it may take several minutes, so you should refresh until at least two regions show as failed.
- Verify that you have received an email message detailing the failure.