Challenge 01 - Monitoring Basics: Metrics, Logs, Alerts and Dashboards

< Previous Challenge - Home - Next Challenge >

Introduction

After deploying your initial solution for eShopOnWeb, you want to make sure that the telemetry is collected from the VMs deployed and display the results on a dashboard for visualization and alerting purposes. By default Azure Monitoring collects only host-level metrics - like CPU utilization, disk and network usage - for all virtual machines and virtual machine scale sets without any additional software. For more insight into your virtual machines, you can collect guest-level log and performance data using the Azure Monitor Agent.

To accomplish this task, you will need to understand the concept of metrics and logs, how to collect them into Azure Monitor, how to configure different types of alerts, and display results in an Azure Dashboard.

Once you have configured the dashboard, alerts, and diagnostics data to be collected, you will use two tools to simulate a load on the eShopOnWeb resources:

Azure Monitor Overview

Azure Monitor is a comprehensive monitoring solution for collecting, analyzing, and responding to telemetry from your cloud and on-premises environments.

Azure Monitor Metrics and Logs

Azure Monitor Logs is a feature of Azure Monitor that collects and organizes log and performance data from monitored resources into Log Analytics workspaces. Azure Monitor Logs is one half of the data platform that supports Azure Monitor. The other is Azure Monitor Metrics, which stores lightweight numeric data in a time-series database. Azure Monitor Metrics can support near real time scenarios, so it’s useful for alerting and fast detection of issues. Azure Monitor Metrics can only store numeric data in a particular structure, whereas Azure Monitor Logs can store a variety of data types that have their own structures. You can also perform complex analysis on Azure Monitor Logs data by using KQL queries, which can’t be used for analysis of Azure Monitor Metrics data.

Azure Monitor Agent

Azure Monitor Agent collects monitoring data from the guest operating system of Azure and hybrid virtual machines and delivers it to Azure Monitor for use by features, insights, and other services. Azure Monitor Agent uses Data collection rules, where you define which data you want each agent to collect and where to send.

Note Azure Monitor Agent (AMA) replaces several legacy monitoring agents, like the Log Analytics Agent (Microsoft Monitoring Agent, MMA, OMS), Diagnostics agent and Telegraf agent. The legacy Log Analytics agent will not be supported after August 2024. For this reason, we will be using only the Azure Monitor Agent (AMA) in this Hackathon, we won’t be using any of the legacy agents.

Azure Monitor Alerts

You can create different types of alerts in Azure Monitor:

Description

In the eShopOnWeb Azure environment, there are three compute resources to be aware of:

Note The “XX” in each resource name will vary based on the Azure region the eShopOnWeb Azure environment has been deployed to.

Azure Bastion has been configured to enable you to securely login to any of these VMs with a Remote Desktop session through a web browser. To login to a VM via Azure Bastion, navigate to the blade for any of these VMs in the Azure portal, click the “Connect” button, and select “Bastion”. Use the username and password provided in Challenge 0.

Set up Counters, Alerts, and a Dashboard

In this challenge you need to complete the following management tasks:

HINT: You can use SQL Management Studio on either the SQL Server VM or the Visual Studio VM, or SQL Server Object Explorer view in Visual Studio to create the database. If you are not familiar with any of these, feel free to ask your coach for assistance.

Simulate load on the eShopOnWeb Environment

Now that Azure Monitor is configured to monitor the eShopOnWeb resources, it is time to simulate load on the SQL Server database and the eShopOnWeb website:

Success Criteria

To complete this challenge successfully, you should be able to:

Learning Resources