Azure Monitor is a suite of services and features within Azure, which provides various monitoring capabilities. It is possible to monitor Azure resources, subscriptions, and an Azure AD tenant.
In this hands-on lab, you will gain experience configuring monitoring for a Virtual Machine, using Azure Monitor Logs (also known as Log Analytics).
By the end of this lab, you’ll be able to configure a Virtual Machine to send metrics and log data to a Log Analytics Workspace.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create a Log Analytics Workspace
Use the Azure Portal to create a new Log Analytics workspace.
- Click on + Create a resource option in the sidebar menu.
- Search for "log analytics workspace" and select the option that appears.
- Click on Create to create a new Log Analytics Workspace.
Create the workspace with the following details:
- Fill out the Basics page:
- Subscription:* select the Hands-On Labs subscription
- Resource Group:* select the existing resource group
- Name:* Create a unique name like, ‘lablog123’
- Region:* Use the same region as the existing resources
- Click on Next.
- Fill out the Pricing tier
- Pricing tier:* Pay-as-you-go
- Click on Review + Create.
- Click on Create.
- Connect VM1 to Log Analytics
Use the Azure Portal to create a new Log Analytics workspace.
- Navigate to the Log Analytics workspace, you just created.
- Click on ‘Virtual machines‘ within the ‘Workspace Data Sources’ section of the resource menu.
- Click on ‘vm1‘.
- Click ‘Connect‘.
- (OPTIONAL) Verify Virtual Machine Monitoring
NOTE: You may choose to perform the following tasks, to help understand and verify that virtual machine monitoring is working.
This is an optional activity and is not required to enable virtual machine monitoring.
The following information shows key areas of virtual machine monitoring, and what you can expect to see in each section.
- VM Extensions:
- Navigate to VM1 on then click Extensions.
- You should expect to see the MicrosoftMonitoringAgent installed.
- Log Queries:
- Navigate to the Log Analytics workspace created earlier, and then click Logs.
- You should expect to see several sample queries, such as computer availability.
- Workbooks
- Navigate to the Log Analytics workspace created earlier, and then click Workbooks.
- You should expect to see workbooks such as Agent Health which will show information for
vm1
.
- VM Extensions: