1️⃣ Create a Log Analytics workspace.
2️⃣ Collect Windows performance counters from the Log Analytics agents.
3️⃣ Create an alert rule.
The question states:
“You need to configure the alerts for VM1 and VM2 to meet the technical requirements.”
The technical requirement from the case study specifies:
“Trigger an alert if VM1 or VM2 has less than 20 GB of free space on volume C.”
This requirement involves monitoring performance metrics (disk space) and generating alerts based on those metrics. According to Microsoft Azure monitoring and management documentation, the process to configure such alerts involves using Azure Monitor and Log Analytics.
Step-by-Step Verified Solution:
Step 1: Create a Log Analytics workspace
A Log Analytics workspace is required to store and analyze logs and performance data collected from virtual machines.
Azure Monitor uses this workspace as the central repository for performance counters, events, and logs from connected agents.
From the Microsoft Documentation:
“Before you can collect and query data from virtual machines, you must create a Log Analytics workspace in your subscription.”
(Source: Azure Monitor and Log Analytics Guide)
Step 2: Collect Windows performance counters from the Log Analytics agents
After creating the workspace, you must connect VM1 and VM2 to the workspace and configure the Windows performance counters that you want to monitor.
In this case, you would collect the LogicalDisk(%) Free Space counter for C: drive.
Azure Monitor agent or Log Analytics agent collects these metrics and sends them to the workspace for analysis.
“To monitor system performance, configure the agent to collect performance counters such as available memory or free disk space.”
(Source: Azure Monitor Performance Counters Documentation)
Step 3: Create an alert rule
Once performance data is being collected, you can create an alert rule in Azure Monitor based on a Kusto query or metric threshold.
You would define a condition such as:
LogicalDisk | where FreeSpaceMB < 20480
and configure it to trigger an alert when free space on volume C drops below 20 GB.
This alert can notify via email, action group, or automation runbook.
“Alerts in Azure Monitor proactively notify you when important conditions are found in your monitoring data. Alerts can trigger automated actions or notifications.”
(Source: Azure Monitor Alerts Overview)
Incorrect Options (Eliminated):
Configure the Diagnostic settings:
Used for collecting activity logs or resource logs, not performance counters from VMs.
Create an Azure SQL database:
Not relevant to the scenario of monitoring disk space.