Deploy a connected Azure Monitor environment, explore its architecture, and experiment with monitoring, troubleshooting, and response—from core workloads to optional AI and Fabric integrations.
These paths create billable Azure resources. Check subscription/tenant permissions, regional availability, quotas and tool prerequisites in the linked guides. Keep credentials in your private local config, never in this page. Optional stages are opt-in and can add costs.
Use PowerShell in Cloud Shell. Run preparation only if Network Watcher is missing. After the wizard succeeds, run completion with the same tenant, subscription, resource group and prefix.
1. Prepare missing Network Watcher
git clone --branch main https://github.com/Azure-Samples/azure-monitor-lab.git
cd azure-monitor-lab
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
$tenantId = Read-Host 'Tenant ID'
$subscriptionId = Read-Host 'Subscription ID'
$resourceGroup = Read-Host 'Resource group name'
$location = Read-Host 'Azure region (for example northeurope)'
$namePrefix = Read-Host 'Name prefix (press Enter for amlab)'
if ([string]::IsNullOrWhiteSpace($namePrefix)) { $namePrefix = 'amlab' }
az login --tenant $tenantId --use-device-code --output none
az account set --subscription $subscriptionId
. ./scripts/network-watcher.ps1
Ensure-LabNetworkWatcher -SubscriptionId $subscriptionId -TenantId $tenantId -Location $location -Confirm
2. Complete the portal deployment
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
if (-not (Test-Path -LiteralPath ./scripts/post-cloud-shell-deploy.ps1)) {
if (-not (Test-Path -LiteralPath ./azure-monitor-lab)) {
git clone --branch main https://github.com/Azure-Samples/azure-monitor-lab.git
}
Set-Location ./azure-monitor-lab
}
git switch main
git pull --ff-only origin main
$tenantId = Read-Host 'Tenant ID'
$subscriptionId = Read-Host 'Subscription ID'
$resourceGroup = Read-Host 'Resource group name'
$namePrefix = Read-Host 'Name prefix (press Enter for amlab)'
if ([string]::IsNullOrWhiteSpace($namePrefix)) { $namePrefix = 'amlab' }
./scripts/post-cloud-shell-deploy.ps1 -TenantId $tenantId -SubscriptionId $subscriptionId -ResourceGroup $resourceGroup -NamePrefix $namePrefix
Completion is required to publish workloads and finish enabled stages. If AI is enabled, completion starts billable background traffic; keep Cloud Shell open until it finishes, or add -EnableStageAI:$false to skip that traffic. For partial completion, use the recovery guide instead of blindly rerunning setup.
One-shot deployment
Deploy the full core lab with the Bicep-based PowerShell wrapper. It syncs your config, runs pre-flight checks, and completes selected setup.
For a fresh checkout, copy the block below. Fill in basicConfiguration in your private lab.config.json, save it, and close Notepad before continuing. Do not overwrite an existing config. One-shot deploys the core lab regardless of Stage A–E toggles; optional stages remain separate.
Clone, configure and deploy
# 1. Clone the repo and enter it
git clone --branch main https://github.com/Azure-Samples/azure-monitor-lab.git
cd azure-monitor-lab
git switch main
# 2. Copy the template and fill in basicConfiguration for your subscription
Copy-Item lab.config.json.example lab.config.json
notepad lab.config.json
# Save your changes and close Notepad before continuing.
# One-shot ignores enableStageA-E; AI, SRE Agent, Observability Agent, and customer scenarios remain optional.
# 3. Deploy (deploy.ps1 calls sync-config.ps1 for you)
./scripts/deploy.ps1
Deploy stage by stage
Start with Stage A (foundation), then add workloads, alerts, security and advanced capabilities. Pause and verify each wave before continuing.
Bicep starter commands
In the same PowerShell 7 session: prepare a fresh checkout, edit and save your private config, then bootstrap inputs and deploy Stage A. Sign in to the configured tenant/subscription with Azure CLI first.
1. Prepare, then edit lab.config.json in your editor
git clone --branch main https://github.com/Azure-Samples/azure-monitor-lab.git
Set-Location azure-monitor-lab
if (-not (Test-Path ./lab.config.json)) { Copy-Item ./lab.config.json.example ./lab.config.json }
Stage A has no Web App or AKS. Continue with the full guide for Stage B onwards and each required completion step; raw Bicep alone is infrastructure-only.
Use a fresh checkout and select only Stage A in advancedConfiguration.stageToggles before syncing. Sign in with Azure CLI, then create the resource group and review the plan before approving apply.
1. Prepare, select only Stage A, save and sync config
git clone --branch main https://github.com/Azure-Samples/azure-monitor-lab.git
Set-Location azure-monitor-lab
if (-not (Test-Path ./lab.config.json)) { Copy-Item ./lab.config.json.example ./lab.config.json }
notepad lab.config.json # fill in subscriptionId, tenantId, alertEmail, vmAdminPassword, stageToggles, ...
./scripts/sync-config.ps1 # regenerates terraform/stages.tfvars + .azure-target.json + infra/main.parameters.json
2. Verify the Azure account and create the resource group
. ./scripts/lab-config.ps1
$config = Read-LabConfig -Path ./lab.config.json
$sub = $config.subscriptionId.ToString()
$tenant = $config.tenantId.ToString()
$rg = $config.resourceGroup
$location = $config.location
$prefix = $config.namePrefix
az account set --subscription $sub
$active = az account show --query '{id:id,tenantId:tenantId}' -o json | ConvertFrom-Json
if ($LASTEXITCODE -ne 0 -or $active.id -ne $sub -or $active.tenantId -ne $tenant) {
throw 'Subscription or tenant mismatch.'
}
az group create --subscription $sub -n $rg -l $location --tags purpose=azure-monitor-lab owner=demo-lab
Enable B, C, D and E one at a time, retaining prerequisite toggles and syncing config before each plan/apply. Completion hooks run automatically. Observability Agent provisioning is Bicep-only; do not mix state ownership. Terraform destroy alone does not remove the lab resources.
Your bill combines provisioned services, usage and retained data—not just running VMs.
Provisioned resources: compute, App Service plans, Grafana, Event Hubs, registry and networking.
Usage: telemetry ingestion, retention, queries, alerts, traffic, model tokens and optional agent investigations.
Actual cost analysis: in Azure portal, open Cost Management → Cost analysis, select your subscription, filter to the lab and associated resource groups, and group by service or resource. Include AKS-managed groups and optional tenant-service charges in the full total. Set a budget and alerts.
Price-reference date: September 27, 2026. These dated examples are not a current quote. Recalculate for your selected regions, SKUs and usage.
Stages A-E: EUR 6-10/day; optional capabilities with light AI and agent use: EUR 10-25/day, assuming an eligible SRE Agent trial and automatic Observability Agent investigations remain off. These September 2026 estimates are not quotes or spending caps; region, telemetry, traffic, and usage can increase costs. See the cost guide for assumptions and service-specific charges.
Stop is not delete. Use Control Center → Lab Operations → Stop Lab when idle. App Service plans, Grafana, Event Hubs, disks/IPs, retained data and optional fixed allocations can still bill. Log Analytics daily caps are not total-spend caps.
02 / CLEAN UP YOUR LAB
Delete the lab when finished.
Use PowerShell 7 and Azure CLI from the repository checkout for your deployed lab. The commands are copied only—this page never runs cleanup.
Destructive: deletes your lab. Teardown deletes the lab resource group and matching auxiliary groups, including their data. -Yes skips confirmation. Check the intended Azure subscription and resource group before running.
Teardown commands
$rg = "rg-azure-monitor-lab" # change this to the RG used for your deployment
./scripts/teardown.ps1 -ResourceGroup $rg -Yes # deletes the whole resource group
Deletion is asynchronous. Teardown prints verification commands; wait for false for every listed group. Errors are not proof of deletion.
Shared resources:NetworkWatcherRG is preserved by default. Do not delete it just to remove the lab.
Recovery: normal soft-delete recovery remains enabled; names may stay reserved until retention expires. Permanent purge is a separate destructive opt-in.
Terraform & Fabric:terraform destroy alone does not remove the deployed lab resources or Fabric workspace items. Review tenant cleanup and ownership-preservation warnings in the teardown output.
Follow signals from workloads to response. Select a service for its demos, or a setup card for its documentation. The components and connections follow the README architecture diagram (opens in a new tab).
Microsoft Fabric workspaceOptional · tenant-scoped · outside the Azure resource group · hosted on the F2 capacity above
Read-only OneLake shortcuts expose Azure Monitor Delta data to Fabric. Data stays in Azure Monitor storage; no data copy is created.
Telemetry & responseRead-only mirroring (preview)Approved lab operationHover or focus a card to highlight its connections on desktop.
How the signals connect
VMs, VMSS and AKS send signals through AMA and DCRs to central Log Analytics and Managed Prometheus; OpenTelemetry adds VM metrics and distributed traces.
Network flow logs reach platform storage. Policy onboards diagnostics; application and GenAI telemetry reaches Application Insights and its separate Log Analytics workspace.
Logs feed query packs, Workbooks, alerts, Sentinel, Health Models and Copilot investigations. Prometheus feeds Grafana; alerts connect to Observability Agent, SRE Agent and Logic App response.
The Control Center approves lab operations; a digest-pinned image in ACR runs through the independent Container Apps Job.
Event Hubs feeds Fabric Eventstream → Eventhouse → Real-Time Dashboard. A separate preview route exposes Azure Monitor Delta data through read-only shortcuts to Eventhouse, without copying it.
02 / THE FIELD GUIDE
Find your next demo.
Browse all numbered scenarios, or open a step-by-step guide for a featured journey.