Introduction
To pass the AZ-104 exam, you must complete several live online lab tests. This article focuses on monitoring your VM's CPU usage, demonstrating how to set up alerts in Azure Monitor. Alerts will help you proactively detect and address issues before they impact users.
Prerequisite
The Microsoft Insights is a prerequisite for this exercise.
Steps
Step 1: Navigate to Monitor
Open the Azure portal.
Click on "Monitor".
Select "Alerts".
Step 2: Create Action Groups
Click on "Action groups".
Click "Create".
Step 3: Configure Action Group
In the Basics tab:
Name it: "EmailToDavid".
In the Notifications tab:
Select Notification type: "Email/SMS message/Push/Voice".
Name the notification: "Send Email To David".
Step 4: Review and Create Action Group
Click Review + create.
Click Create.
Step 5: Set Up Alert Rules
Navigate back to "Monitor | Alerts".
Click on "Alert rules".
Click Create.
Step 6: Define Scope
In the Scope tab:
Select a resource: VM1.
Click Apply.
Step 7: Configure Condition
In the Condition tab:
Select "Percentage CPU".
Set the Threshold to 50 (suitable for testing).
Step 8: Link Action Group
In the Actions tab:
Select "Use action groups".
Choose "EmailToDavid" (the action group created earlier).
Step 9: Complete Alert Rule Details
In the Details tab:
Set the Alert rule name to MonitorCPUUsage.
Step 10
Click Review + create.
Click Create.
Testing
Install the tool CPU-Z from cupid.com on VM1.
Use the Stress CPU feature.
An alert email will be triggered and sent to David.
Conclusion
By following these steps, you have successfully set up an alert to monitor CPU usage on your virtual machine. This proactive monitoring will ensure that you can respond to potential issues before they affect end users. Remember, effective alerting is a key component of managing resources in Azure, aligning with best practices that will aid in your success on the AZ-104 exam.
Top comments (1)
More labs are coming!