< Previous Challenge - Home - Next Challenge >
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 is a comprehensive monitoring solution for collecting, analyzing, and responding to telemetry from your cloud and on-premises environments.
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 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.
You can create different types of alerts in Azure Monitor:
In the eShopOnWeb Azure environment, there are three compute resources to be aware of:
vmss-wth-monitor-d-XX
- Virtual Machine Scale Set (VMSS) hosting the eShopOnWeb web sitevmwthdbdXX
- Virtual Machine running SQL Server 2019 hosting the eShopOnWeb databasevmwthvsdXX
- Virtual Machine running Windows Server 2022 + Visual Studio 2022 + SQL Management Studio to act as a “jumpbox” that you will login to for administrative tasks.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.
In this challenge you need to complete the following management tasks:
tpcc
on the SQL Server VM. Use SQL Auth with the username being sqladmin
and password being whatever you used during deployment in Challenge 0.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.
Note Previously, it was only possible to enable VM guest-level metrics collection to Azure Monitor Metrics with the help of the legacy Windows Azure Diagnostics (WAD) extension and Telegraf (for Linux). Currently, this can also be achieved with Azure Monitor Agent (AMA). You will be using only AMA in the following tasks not WAD. When you create a Data Collection Rule the Azure Monitor Agent will be automatically installed on the virtual machine.
law-wth-monitor-d-XX
as the destination. You don’t need to create Data Collection Endpoints. Configure the DCR to collect Custom Performance Counters - leave all the suggested standard counters and add the following custom SQL performance counter to the list:
SQLServer:Databases
Active Transactions
tpcc
Note It will take a few minutes for the data to start flowing, revisit this step later if you don’t see any data right away.
Note It will take a few minutes for the data to start flowing, revisit this step later if you don’t see any data right away.
tpcc
database.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:
tpcc
database on the SQL Server
tpcc
database.cpuGenLoadwithPS.ps1
script located in the /Challenge-01
folder of the student resource package.
To complete this challenge successfully, you should be able to: