How to Deploy and Configure Azure Monitor
Source: Dev.to
Prepare Your Azure Environment
-
Create a resource group
- Search Resource Groups → Create
- Name:
rg-alpha - Region: East US
- Click Review + create → Create
This group will hold all the resources Azure Monitor will observe.
Create a Security Group (Optional – used in the lab)
- Search Azure Active Directory / Entra ID → Groups → New group
- Group type: Security
- Name:
App Log Examiners - Click Create
Deploy Virtual Machines to Monitor
Deploy Windows VM (WS‑VM1)
-
Search Virtual Machines → Create
-
Basics
- Name:
WS-VM1 - Region: East US
- Image: Windows Server 2022 Datacenter
- Size: Standard_D4s_v3
- Admin username:
prime - Password: your secure password
- Inbound port: RDP (3389)
- Name:
-
Click Create and wait for deployment.
-
After deployment, select Go to resource → Networking.
- Edit the default RDP rule: set Source to My IP address and Save.
- Add an inbound rule:
- Source: Any
- Destination port ranges:
310 - Protocol: TCP
- Action: Allow
- Name:
AllowAnyHTTPInbound
-
Connect via RDP:
- Choose Connect → Native RDP → Download RDP file.
- In the Windows Security dialog, select More choices → Use a different account.
- Username:
.\prime - Password: your secure password → OK.
-
Inside the VM, open Windows PowerShell (Admin) and run:
Install-WindowsFeature Web-Server -IncludeAllSubFeature -IncludeManagementTools cd C:\inetpub\wwwroot Invoke-WebRequest https://raw.githubusercontent.com/Azure-Samples/html-docs-hello-world/master/index.html -OutFile index.html
Deploy Linux VM (Linux‑VM2)
- Search Virtual Machines → Create
- Basics
- Name:
Linux-VM2 - Resource group:
rg-alpha - Availability options: No infrastructure redundancy required
- Image: Ubuntu Server 20.04 LTS
- Size: Standard_D2s_v3
- Architecture: x64
- Username:
prime - Password: your secure password
- Name:
- Click Review + create → Create.
- After deployment, open the VM’s Extensions + Applications under Settings.
- Add the Network Watcher Agent for Linux extension: Add → Next → Review + create → Create.
Deploy a Web App with an SQL Database
- Open the template repository.
- Click Deploy to Azure.
- Sign in with an account that has Global Administrator privileges if prompted.
- On the Basics page, select Edit template.
- In the editor, delete lines 158‑174 (inclusive) and remove the trailing comma on line 157. Click Save.
- Provide the required parameters on the Basics page and click Next.
- Review the configuration and click Create.
- After deployment completes, select Go to resource group to view the newly created web app and SQL database.