L2.1 β Monitoring Fundamentals π΅
π Level 2 Β· Monitor Β· Chapter 1 of 4 Β Β·Β Previous: L1.1 β Core Deployment Β Β·Β Next: L3.1 β Security Foundation Β· Go deeper: L2.2 β Operational Visibility
Goal: point everything youβve built so far at one Log Analytics workspace. Nothing here has an hourly rate β from this chapter on you pay per GB collected.
The IaC lesson: one template wires up whatever is standing β agent installs and diagnostic settings that would otherwise be dozens of portal clicks, done identically every time.
| Who this is for | Time | You need first | Cost while it runs |
|---|---|---|---|
| Chapter 1 of Level 2 Β· everyone | ~15 min | L1.1 only | π΅ ~$0.06/hr added Β· ~$1.90/hr running total |
[!IMPORTANT] Only L1.1 needs to be deployed. On the main path this template creates its own small workspace,
log-<prefix>-mon, and monitors the core estate β the test VM gets the agent and a data collection rule, Bastion gets a diagnostic setting. If you went south in Level 1 first, flip the workflowβsinclude_web_tier/include_app_tierswitches to monitor those tiers too; the app-tier switch also moves everything ontolog-<prefix>-l3, the workspace L1.3 made, so the estate keeps one workspace for L5βs Sentinel later.
What youβre building
Two collection paths, one destination. VMs get an agent that gathers what a data collection rule tells it to. Platform resources (Bastion always; firewall and load balancer with the web tier; Key Vault, SQL and container app with the app tier) get diagnostic settings β no agent, nothing to install. Both paths land in one workspace: log-<prefix>-mon, which this template creates, or L1.3βs log-<prefix>-l3 when the app tier is standing.
flowchart LR
VMS["VMs standing now<br/>L1.1 test VM Β·<br/>+3 web VMs if L1.2 is up"]
RES["platform resources<br/>Bastion always Β·<br/>firewall + LB with L1.2 Β·<br/>Key Vault + SQL + app with L1.3"]
AMA["Azure Monitor Agent<br/>+ data collection rule"]
DIAG["diagnostic settings<br/>named categories only"]
WS["log-iacdemo-mon<br/>created here β or L1.3's<br/>log-iacdemo-l3 when the<br/>app tier is deployed"]
VMS --> AMA --> WS
RES --> DIAG --> WS
classDef compute fill:#eefaf0,stroke:#3a9d5d,color:#1a1a1a
classDef plat fill:#eef4ff,stroke:#4472c4,color:#1a1a1a
classDef mon fill:#fff9e6,stroke:#c9a227,color:#1a1a1a
class VMS compute
class RES plat
class AMA,DIAG,WS mon
Text description of this diagram</summary>
Two collection paths converge on one workspace.
Every VM standing gets the Azure Monitor Agent extension, associated with the data collection rule dcr-iacdemo-vm. On the main path that is one VM β the L1.1 test VM; with L1.2 deployed and include_web_tier ticked, the three web VMs join it. The rule decides what the agent gathers β six performance counters every 60 seconds and syslog at warning level and above.
The platform resources each get a diagnostic setting that forwards named log categories. No agent involved. Bastion is always included; the firewall and internal load balancer join with the web tier, and Key Vault, SQL database and the container app join with the app tier.
Where it all lands depends on which mode you are in. On the main path (L1.1 β L2.1) the template creates a small workspace of its own, log-iacdemo-mon, so the chapter stands on the core alone. With include_app_tier on, it instead reuses log-iacdemo-l3 β the workspace L1.3 already created β promoting it from an app-scoped workspace to the platform workspace for the whole estate rather than creating a second one. That reuse is the architectural teaching point once the app tier exists.
</details>
Source: curriculum/L2.1-monitoring-fundamentals/main.bicep Β· main.bicepparam
π Going deeper β why named categories, not allLogs</summary>
allLogs on the firewall alone would out-ingest everything else in this chapter combined, for data no later chapter reads. The template collects AZFWNetworkRule and AZFWApplicationRule β βwhat did it allowβ and βwhat did it blockβ β which is exactly what the L2.2 queries need.
Choosing categories is the cost control. That single decision is what lets Level 5 put Microsoft Sentinel on a workspace that already has the whole estate in it, instead of starting again.
</details>
π Going deeper β the permissions this needs</summary>

Azure RBAC
Contributor on the lab resource group β held by the workshop deploy identity your fork's workflow signs in as. Classroom accounts themselves hold Reader, which is why deploys go through GitHub Actions.
Why: the template installs a VM extension, creates a data collection rule and writes diagnostic settings onto resources another template owns. All three are ordinary resource writes. Monitoring Contributor plus Virtual Machine Contributor is the least-privilege equivalent for production. 
Microsoft Entra ID roles
None.
Nothing here touches directory objects. The agent authenticates with the VM's own managed identity, which already exists.
For more info β Azure built-in roles for monitoring
</details>
[!NOTE] π« Classroom: use the GitHub Actions option. Your Azure account holds Reader, so local az deployment commands will be refused β deploys go through your forkβs workflow, which uses the workshop deploy identity automatically. Compiling locally (az bicep build) works for everyone.
π Deploy it β pick any one of three ways
All three deploy the same template and give the same result.

1 Β· Bicep CLI
Copy-paste in the terminal 
2 Β· GitHub Actions
One button in the browser 
3 Β· GitHub Copilot
Ask AI in plain English
Β Option 1 Β· Bicep from the terminal
Your values are already loaded from lab-settings.csv (set up in L1.1) β nothing to re-type.
az deployment group what-if --resource-group $env:AZURE_RESOURCE_GROUP --parameters curriculum/L2.1-monitoring-fundamentals/main.bicepparam
az deployment group create --resource-group $env:AZURE_RESOURCE_GROUP --parameters curriculum/L2.1-monitoring-fundamentals/main.bicepparam
You should see: a monitoredVmNames output listing every VM standing, and a diagnosticSettingsApplied count to match β on the main path that is one VM and 1 setting (Bastion); with every tier up, four VMs and 6 settings.
Match the switches to what is actually deployed β skipped or tore down L1.2? Deployed L1.3 and want its resources monitored (and its workspace reused)?
$env:CURRICULUM_INCLUDE_WEB_TIER = "false"
$env:CURRICULUM_INCLUDE_APP_TIER = "true"
Β Option 2 Β· GitHub Actions (push-button)
On GitHub: Actions β βCurriculum L2 - Operations & Monitoringβ β Run workflow, then pick L2.1 - Monitoring Fundamentals from the dropdown.
Three inputs matter, and the tier switches default to off β the main-path run needs no ticking at all:
include_web_tier β tick only while L1.2βs firewall and web VMs stand. include_app_tier β tick only when L1.3 is deployed; it also switches everything onto L1.3βs workspace instead of creating log-<prefix>-mon. - Stop after what-if β shows every change and deploys nothing. Worth one run on its own: this is the first template in the curriculum that changes resources somebody elseβs template owns.
You should see: Lint β What-if β Deploy, then a run summary with the template outputs.
Β Option 3 Β· GitHub Copilot (plain English)
Copilot runs the deploy locally, so load your values once first (same file as Option 1): ./scripts/Load-LabSettings.ps1.
Open Copilot Chat β Agent mode:
Deploy curriculum/L2.1-monitoring-fundamentals/main.bicep to my lab resource group ($env:AZURE_RESOURCE_GROUP) with az deployment group create.
Want to see the cost dial move? Ask:
In curriculum/L2.1-monitoring-fundamentals/main.bicep, add the AZFWDnsQuery category to the firewall diagnostic setting, run az bicep build, then show me a what-if.
Then decide whether you want it. That is the whole skill this chapter teaches.
β
Verify it
Portal-only verify (no terminal)
Mode
Portal only Time
~5 minutes Goal
Data is flowing into Log Analytics
[!IMPORTANT] Start in the correct workspace: Main path uses log-<prefix>-mon. App-tier path uses log-<prefix>-l3.
Step 1 Β· Agent installed on the test VM</summary>
Open vm-<prefix>-test -> Extensions + applications and find AzureMonitorLinuxAgent.
PASS: Provisioning state is Succeeded.
</details>
Step 2 Β· Data collection rule attached</summary>
On vm-<prefix>-test, open Monitoring -> Data collection rules.
PASS: dcr-<prefix>-vm is listed.
</details>
Step 3 Β· VM signal is arriving</summary>
Open your workspace -> Logs. In the table list, check Heartbeat and Perf.
PASS: both tables have recent records from vm-<prefix>-test.
</details>
Step 4 Β· Platform diagnostics are arriving</summary>
In the same workspace table list, check AzureDiagnostics. If web tier is enabled, also check AZFWNetworkRule and AZFWApplicationRule.
PASS (main path): AzureDiagnostics has recent rows. PASS (with web tier): firewall tables also have rows after traffic has passed.
</details>
Step 5 Β· Cost visibility check</summary>
Open workspace -> Usage and estimated costs.
PASS: you can identify the top data type by ingestion volume.
</details>
[!TIP] If a step fails, wait 10 minutes and refresh once. If still failing, re-run L2.1 once and repeat this checklist.
GitHub feature spotlight Β· One workflow, many chapters
You just used it: the Actions run asked you which chapter instead of making you find one of eighteen near-identical workflows. That is a workflow_dispatch choice input, and the chapter-to-path mapping lives in a single case statement in the workflow. Find it: .github/workflows/curriculum-l2-operations.yml β adding a chapter is two lines, one option and one case. Beyond the lab: typed inputs (choice, boolean) turn a workflow into a small internal tool, and the include_web_tier / include_app_tier booleans are the same mechanism a real pipeline uses for environment flags. Docs β
β‘οΈ What carries forward
On the main path, L3.1 checks the security of the estate you have now instrumented. If you go deeper instead, L2.2 writes queries against exactly this data β the perf counters, the syslog, and whatever categories you chose here. Anything you did not collect in this chapter is a query you cannot write there.
π§ Where next?
Your situation Go to Continue the main path β check the security of what you built L3.1 β Security Foundation Go deeper β turn this data into answers L2.2 β Operational Visibility (needs L1.3) See every chapter, cost and prerequisite πΊοΈ Curriculum Map Want the big picture of this level first Level 2 Β· Monitor overview Done for the day β the estate bills while idle Cleanup & Reset Something didnβt work Troubleshooting
dcr-iacdemo-vm. On the main path that is one VM β the L1.1 test VM; with L1.2 deployed and include_web_tier ticked, the three web VMs join it. The rule decides what the agent gathers β six performance counters every 60 seconds and syslog at warning level and above.log-iacdemo-mon, so the chapter stands on the core alone. With include_app_tier on, it instead reuses log-iacdemo-l3 β the workspace L1.3 already created β promoting it from an app-scoped workspace to the platform workspace for the whole estate rather than creating a second one. That reuse is the architectural teaching point once the app tier exists.curriculum/L2.1-monitoring-fundamentals/main.bicep Β· main.bicepparam π Going deeper β why named categories, not allLogs</summary>
allLogs on the firewall alone would out-ingest everything else in this chapter combined, for data no later chapter reads. The template collects AZFWNetworkRule and AZFWApplicationRule β βwhat did it allowβ and βwhat did it blockβ β which is exactly what the L2.2 queries need.
Choosing categories is the cost control. That single decision is what lets Level 5 put Microsoft Sentinel on a workspace that already has the whole estate in it, instead of starting again.
</details>
π Going deeper β the permissions this needs</summary>

Azure RBAC
Contributor on the lab resource group β held by the workshop deploy identity your fork's workflow signs in as. Classroom accounts themselves hold Reader, which is why deploys go through GitHub Actions.
Why: the template installs a VM extension, creates a data collection rule and writes diagnostic settings onto resources another template owns. All three are ordinary resource writes. Monitoring Contributor plus Virtual Machine Contributor is the least-privilege equivalent for production. 
Microsoft Entra ID roles
None.
Nothing here touches directory objects. The agent authenticates with the VM's own managed identity, which already exists.
For more info β Azure built-in roles for monitoring
</details>
[!NOTE] π« Classroom: use the GitHub Actions option. Your Azure account holds Reader, so local az deployment commands will be refused β deploys go through your forkβs workflow, which uses the workshop deploy identity automatically. Compiling locally (az bicep build) works for everyone.
π Deploy it β pick any one of three ways
All three deploy the same template and give the same result.

1 Β· Bicep CLI
Copy-paste in the terminal 
2 Β· GitHub Actions
One button in the browser 
3 Β· GitHub Copilot
Ask AI in plain English
Β Option 1 Β· Bicep from the terminal
Your values are already loaded from lab-settings.csv (set up in L1.1) β nothing to re-type.
az deployment group what-if --resource-group $env:AZURE_RESOURCE_GROUP --parameters curriculum/L2.1-monitoring-fundamentals/main.bicepparam
az deployment group create --resource-group $env:AZURE_RESOURCE_GROUP --parameters curriculum/L2.1-monitoring-fundamentals/main.bicepparam
You should see: a monitoredVmNames output listing every VM standing, and a diagnosticSettingsApplied count to match β on the main path that is one VM and 1 setting (Bastion); with every tier up, four VMs and 6 settings.
Match the switches to what is actually deployed β skipped or tore down L1.2? Deployed L1.3 and want its resources monitored (and its workspace reused)?
$env:CURRICULUM_INCLUDE_WEB_TIER = "false"
$env:CURRICULUM_INCLUDE_APP_TIER = "true"
Β Option 2 Β· GitHub Actions (push-button)
On GitHub: Actions β βCurriculum L2 - Operations & Monitoringβ β Run workflow, then pick L2.1 - Monitoring Fundamentals from the dropdown.
Three inputs matter, and the tier switches default to off β the main-path run needs no ticking at all:
include_web_tier β tick only while L1.2βs firewall and web VMs stand. include_app_tier β tick only when L1.3 is deployed; it also switches everything onto L1.3βs workspace instead of creating log-<prefix>-mon. - Stop after what-if β shows every change and deploys nothing. Worth one run on its own: this is the first template in the curriculum that changes resources somebody elseβs template owns.
You should see: Lint β What-if β Deploy, then a run summary with the template outputs.
Β Option 3 Β· GitHub Copilot (plain English)
Copilot runs the deploy locally, so load your values once first (same file as Option 1): ./scripts/Load-LabSettings.ps1.
Open Copilot Chat β Agent mode:
Deploy curriculum/L2.1-monitoring-fundamentals/main.bicep to my lab resource group ($env:AZURE_RESOURCE_GROUP) with az deployment group create.
Want to see the cost dial move? Ask:
In curriculum/L2.1-monitoring-fundamentals/main.bicep, add the AZFWDnsQuery category to the firewall diagnostic setting, run az bicep build, then show me a what-if.
Then decide whether you want it. That is the whole skill this chapter teaches.
β
Verify it
Portal-only verify (no terminal)
Mode
Portal only Time
~5 minutes Goal
Data is flowing into Log Analytics
[!IMPORTANT] Start in the correct workspace: Main path uses log-<prefix>-mon. App-tier path uses log-<prefix>-l3.
Step 1 Β· Agent installed on the test VM</summary>
Open vm-<prefix>-test -> Extensions + applications and find AzureMonitorLinuxAgent.
PASS: Provisioning state is Succeeded.
</details>
Step 2 Β· Data collection rule attached</summary>
On vm-<prefix>-test, open Monitoring -> Data collection rules.
PASS: dcr-<prefix>-vm is listed.
</details>
Step 3 Β· VM signal is arriving</summary>
Open your workspace -> Logs. In the table list, check Heartbeat and Perf.
PASS: both tables have recent records from vm-<prefix>-test.
</details>
Step 4 Β· Platform diagnostics are arriving</summary>
In the same workspace table list, check AzureDiagnostics. If web tier is enabled, also check AZFWNetworkRule and AZFWApplicationRule.
PASS (main path): AzureDiagnostics has recent rows. PASS (with web tier): firewall tables also have rows after traffic has passed.
</details>
Step 5 Β· Cost visibility check</summary>
Open workspace -> Usage and estimated costs.
PASS: you can identify the top data type by ingestion volume.
</details>
[!TIP] If a step fails, wait 10 minutes and refresh once. If still failing, re-run L2.1 once and repeat this checklist.
GitHub feature spotlight Β· One workflow, many chapters
You just used it: the Actions run asked you which chapter instead of making you find one of eighteen near-identical workflows. That is a workflow_dispatch choice input, and the chapter-to-path mapping lives in a single case statement in the workflow. Find it: .github/workflows/curriculum-l2-operations.yml β adding a chapter is two lines, one option and one case. Beyond the lab: typed inputs (choice, boolean) turn a workflow into a small internal tool, and the include_web_tier / include_app_tier booleans are the same mechanism a real pipeline uses for environment flags. Docs β
β‘οΈ What carries forward
On the main path, L3.1 checks the security of the estate you have now instrumented. If you go deeper instead, L2.2 writes queries against exactly this data β the perf counters, the syslog, and whatever categories you chose here. Anything you did not collect in this chapter is a query you cannot write there.
π§ Where next?
Your situation Go to Continue the main path β check the security of what you built L3.1 β Security Foundation Go deeper β turn this data into answers L2.2 β Operational Visibility (needs L1.3) See every chapter, cost and prerequisite πΊοΈ Curriculum Map Want the big picture of this level first Level 2 Β· Monitor overview Done for the day β the estate bills while idle Cleanup & Reset Something didnβt work Troubleshooting
allLogs</summary>allLogs on the firewall alone would out-ingest everything else in this chapter combined, for data no later chapter reads. The template collects AZFWNetworkRule and AZFWApplicationRule β βwhat did it allowβ and βwhat did it blockβ β which is exactly what the L2.2 queries need. π Going deeper β the permissions this needs</summary>

Azure RBAC
Contributor on the lab resource group β held by the workshop deploy identity your fork's workflow signs in as. Classroom accounts themselves hold Reader, which is why deploys go through GitHub Actions.
Why: the template installs a VM extension, creates a data collection rule and writes diagnostic settings onto resources another template owns. All three are ordinary resource writes. Monitoring Contributor plus Virtual Machine Contributor is the least-privilege equivalent for production. 
Microsoft Entra ID roles
None.
Nothing here touches directory objects. The agent authenticates with the VM's own managed identity, which already exists.
For more info β Azure built-in roles for monitoring
</details>
[!NOTE] π« Classroom: use the GitHub Actions option. Your Azure account holds Reader, so local az deployment commands will be refused β deploys go through your forkβs workflow, which uses the workshop deploy identity automatically. Compiling locally (az bicep build) works for everyone.
π Deploy it β pick any one of three ways
All three deploy the same template and give the same result.

1 Β· Bicep CLI
Copy-paste in the terminal 
2 Β· GitHub Actions
One button in the browser 
3 Β· GitHub Copilot
Ask AI in plain English
Β Option 1 Β· Bicep from the terminal
Your values are already loaded from lab-settings.csv (set up in L1.1) β nothing to re-type.
az deployment group what-if --resource-group $env:AZURE_RESOURCE_GROUP --parameters curriculum/L2.1-monitoring-fundamentals/main.bicepparam
az deployment group create --resource-group $env:AZURE_RESOURCE_GROUP --parameters curriculum/L2.1-monitoring-fundamentals/main.bicepparam
You should see: a monitoredVmNames output listing every VM standing, and a diagnosticSettingsApplied count to match β on the main path that is one VM and 1 setting (Bastion); with every tier up, four VMs and 6 settings.
Match the switches to what is actually deployed β skipped or tore down L1.2? Deployed L1.3 and want its resources monitored (and its workspace reused)?
$env:CURRICULUM_INCLUDE_WEB_TIER = "false"
$env:CURRICULUM_INCLUDE_APP_TIER = "true"
Β Option 2 Β· GitHub Actions (push-button)
On GitHub: Actions β βCurriculum L2 - Operations & Monitoringβ β Run workflow, then pick L2.1 - Monitoring Fundamentals from the dropdown.
Three inputs matter, and the tier switches default to off β the main-path run needs no ticking at all:
include_web_tier β tick only while L1.2βs firewall and web VMs stand. include_app_tier β tick only when L1.3 is deployed; it also switches everything onto L1.3βs workspace instead of creating log-<prefix>-mon. - Stop after what-if β shows every change and deploys nothing. Worth one run on its own: this is the first template in the curriculum that changes resources somebody elseβs template owns.
You should see: Lint β What-if β Deploy, then a run summary with the template outputs.
Β Option 3 Β· GitHub Copilot (plain English)
Copilot runs the deploy locally, so load your values once first (same file as Option 1): ./scripts/Load-LabSettings.ps1.
Open Copilot Chat β Agent mode:
Deploy curriculum/L2.1-monitoring-fundamentals/main.bicep to my lab resource group ($env:AZURE_RESOURCE_GROUP) with az deployment group create.
Want to see the cost dial move? Ask:
In curriculum/L2.1-monitoring-fundamentals/main.bicep, add the AZFWDnsQuery category to the firewall diagnostic setting, run az bicep build, then show me a what-if.
Then decide whether you want it. That is the whole skill this chapter teaches.
β
Verify it
Portal-only verify (no terminal)
Mode
Portal only Time
~5 minutes Goal
Data is flowing into Log Analytics
[!IMPORTANT] Start in the correct workspace: Main path uses log-<prefix>-mon. App-tier path uses log-<prefix>-l3.
Step 1 Β· Agent installed on the test VM</summary>
Open vm-<prefix>-test -> Extensions + applications and find AzureMonitorLinuxAgent.
PASS: Provisioning state is Succeeded.
</details>
Step 2 Β· Data collection rule attached</summary>
On vm-<prefix>-test, open Monitoring -> Data collection rules.
PASS: dcr-<prefix>-vm is listed.
</details>
Step 3 Β· VM signal is arriving</summary>
Open your workspace -> Logs. In the table list, check Heartbeat and Perf.
PASS: both tables have recent records from vm-<prefix>-test.
</details>
Step 4 Β· Platform diagnostics are arriving</summary>
In the same workspace table list, check AzureDiagnostics. If web tier is enabled, also check AZFWNetworkRule and AZFWApplicationRule.
PASS (main path): AzureDiagnostics has recent rows. PASS (with web tier): firewall tables also have rows after traffic has passed.
</details>
Step 5 Β· Cost visibility check</summary>
Open workspace -> Usage and estimated costs.
PASS: you can identify the top data type by ingestion volume.
</details>
[!TIP] If a step fails, wait 10 minutes and refresh once. If still failing, re-run L2.1 once and repeat this checklist.
GitHub feature spotlight Β· One workflow, many chapters
You just used it: the Actions run asked you which chapter instead of making you find one of eighteen near-identical workflows. That is a workflow_dispatch choice input, and the chapter-to-path mapping lives in a single case statement in the workflow. Find it: .github/workflows/curriculum-l2-operations.yml β adding a chapter is two lines, one option and one case. Beyond the lab: typed inputs (choice, boolean) turn a workflow into a small internal tool, and the include_web_tier / include_app_tier booleans are the same mechanism a real pipeline uses for environment flags. Docs β
β‘οΈ What carries forward
On the main path, L3.1 checks the security of the estate you have now instrumented. If you go deeper instead, L2.2 writes queries against exactly this data β the perf counters, the syslog, and whatever categories you chose here. Anything you did not collect in this chapter is a query you cannot write there.
π§ Where next?
Your situation Go to Continue the main path β check the security of what you built L3.1 β Security Foundation Go deeper β turn this data into answers L2.2 β Operational Visibility (needs L1.3) See every chapter, cost and prerequisite πΊοΈ Curriculum Map Want the big picture of this level first Level 2 Β· Monitor overview Done for the day β the estate bills while idle Cleanup & Reset Something didnβt work Troubleshooting
| Azure RBAC Contributor on the lab resource group β held by the workshop deploy identity your fork's workflow signs in as. Classroom accounts themselves hold Reader, which is why deploys go through GitHub Actions. Why: the template installs a VM extension, creates a data collection rule and writes diagnostic settings onto resources another template owns. All three are ordinary resource writes. Monitoring Contributor plus Virtual Machine Contributor is the least-privilege equivalent for production. | |
| Microsoft Entra ID roles None. Nothing here touches directory objects. The agent authenticates with the VM's own managed identity, which already exists. |
[!NOTE] π« Classroom: use the GitHub Actions option. Your Azure account holds Reader, so local az deployment commands will be refused β deploys go through your forkβs workflow, which uses the workshop deploy identity automatically. Compiling locally (az bicep build) works for everyone.
![]() 1 Β· Bicep CLI Copy-paste in the terminal | ![]() 2 Β· GitHub Actions One button in the browser | ![]() 3 Β· GitHub Copilot Ask AI in plain English |
lab-settings.csv (set up in L1.1) β nothing to re-type.az deployment group what-if --resource-group $env:AZURE_RESOURCE_GROUP --parameters curriculum/L2.1-monitoring-fundamentals/main.bicepparam
az deployment group create --resource-group $env:AZURE_RESOURCE_GROUP --parameters curriculum/L2.1-monitoring-fundamentals/main.bicepparam
monitoredVmNames output listing every VM standing, and a diagnosticSettingsApplied count to match β on the main path that is one VM and 1 setting (Bastion); with every tier up, four VMs and 6 settings.$env:CURRICULUM_INCLUDE_WEB_TIER = "false"
$env:CURRICULUM_INCLUDE_APP_TIER = "true"
include_web_tier β tick only while L1.2βs firewall and web VMs stand.include_app_tier β tick only when L1.3 is deployed; it also switches everything onto L1.3βs workspace instead of creating log-<prefix>-mon../scripts/Load-LabSettings.ps1.Deploy curriculum/L2.1-monitoring-fundamentals/main.bicep to my lab resource group ($env:AZURE_RESOURCE_GROUP) with az deployment group create.
In curriculum/L2.1-monitoring-fundamentals/main.bicep, add the AZFWDnsQuery category to the firewall diagnostic setting, run az bicep build, then show me a what-if.
| Mode Portal only | Time ~5 minutes | Goal Data is flowing into Log Analytics |
[!IMPORTANT] Start in the correct workspace: Main path uses log-<prefix>-mon. App-tier path uses log-<prefix>-l3.
Step 1 Β· Agent installed on the test VM</summary>
Open vm-<prefix>-test -> Extensions + applications and find AzureMonitorLinuxAgent.
PASS: Provisioning state is Succeeded.
</details>
Step 2 Β· Data collection rule attached</summary>
On vm-<prefix>-test, open Monitoring -> Data collection rules.
PASS: dcr-<prefix>-vm is listed.
</details>
Step 3 Β· VM signal is arriving</summary>
Open your workspace -> Logs. In the table list, check Heartbeat and Perf.
PASS: both tables have recent records from vm-<prefix>-test.
</details>
Step 4 Β· Platform diagnostics are arriving</summary>
In the same workspace table list, check AzureDiagnostics. If web tier is enabled, also check AZFWNetworkRule and AZFWApplicationRule.
PASS (main path): AzureDiagnostics has recent rows. PASS (with web tier): firewall tables also have rows after traffic has passed.
</details>
Step 5 Β· Cost visibility check</summary>
Open workspace -> Usage and estimated costs.
PASS: you can identify the top data type by ingestion volume.
</details>
[!TIP] If a step fails, wait 10 minutes and refresh once. If still failing, re-run L2.1 once and repeat this checklist.
GitHub feature spotlight Β· One workflow, many chapters
You just used it: the Actions run asked you which chapter instead of making you find one of eighteen near-identical workflows. That is a workflow_dispatch choice input, and the chapter-to-path mapping lives in a single case statement in the workflow. Find it: .github/workflows/curriculum-l2-operations.yml β adding a chapter is two lines, one option and one case. Beyond the lab: typed inputs (choice, boolean) turn a workflow into a small internal tool, and the include_web_tier / include_app_tier booleans are the same mechanism a real pipeline uses for environment flags. Docs β
β‘οΈ What carries forward
On the main path, L3.1 checks the security of the estate you have now instrumented. If you go deeper instead, L2.2 writes queries against exactly this data β the perf counters, the syslog, and whatever categories you chose here. Anything you did not collect in this chapter is a query you cannot write there.
π§ Where next?
Your situation Go to Continue the main path β check the security of what you built L3.1 β Security Foundation Go deeper β turn this data into answers L2.2 β Operational Visibility (needs L1.3) See every chapter, cost and prerequisite πΊοΈ Curriculum Map Want the big picture of this level first Level 2 Β· Monitor overview Done for the day β the estate bills while idle Cleanup & Reset Something didnβt work Troubleshooting
vm-<prefix>-test -> Extensions + applications and find AzureMonitorLinuxAgent.Succeeded. Step 2 Β· Data collection rule attached</summary>
On vm-<prefix>-test, open Monitoring -> Data collection rules.
PASS: dcr-<prefix>-vm is listed.
</details>
Step 3 Β· VM signal is arriving</summary>
Open your workspace -> Logs. In the table list, check Heartbeat and Perf.
PASS: both tables have recent records from vm-<prefix>-test.
</details>
Step 4 Β· Platform diagnostics are arriving</summary>
In the same workspace table list, check AzureDiagnostics. If web tier is enabled, also check AZFWNetworkRule and AZFWApplicationRule.
PASS (main path): AzureDiagnostics has recent rows. PASS (with web tier): firewall tables also have rows after traffic has passed.
</details>
Step 5 Β· Cost visibility check</summary>
Open workspace -> Usage and estimated costs.
PASS: you can identify the top data type by ingestion volume.
</details>
[!TIP] If a step fails, wait 10 minutes and refresh once. If still failing, re-run L2.1 once and repeat this checklist.
GitHub feature spotlight Β· One workflow, many chapters
You just used it: the Actions run asked you which chapter instead of making you find one of eighteen near-identical workflows. That is a workflow_dispatch choice input, and the chapter-to-path mapping lives in a single case statement in the workflow. Find it: .github/workflows/curriculum-l2-operations.yml β adding a chapter is two lines, one option and one case. Beyond the lab: typed inputs (choice, boolean) turn a workflow into a small internal tool, and the include_web_tier / include_app_tier booleans are the same mechanism a real pipeline uses for environment flags. Docs β
β‘οΈ What carries forward
On the main path, L3.1 checks the security of the estate you have now instrumented. If you go deeper instead, L2.2 writes queries against exactly this data β the perf counters, the syslog, and whatever categories you chose here. Anything you did not collect in this chapter is a query you cannot write there.
π§ Where next?
Your situation Go to Continue the main path β check the security of what you built L3.1 β Security Foundation Go deeper β turn this data into answers L2.2 β Operational Visibility (needs L1.3) See every chapter, cost and prerequisite πΊοΈ Curriculum Map Want the big picture of this level first Level 2 Β· Monitor overview Done for the day β the estate bills while idle Cleanup & Reset Something didnβt work Troubleshooting
vm-<prefix>-test, open Monitoring -> Data collection rules.dcr-<prefix>-vm is listed. Step 3 Β· VM signal is arriving</summary>
Open your workspace -> Logs. In the table list, check Heartbeat and Perf.
PASS: both tables have recent records from vm-<prefix>-test.
</details>
Step 4 Β· Platform diagnostics are arriving</summary>
In the same workspace table list, check AzureDiagnostics. If web tier is enabled, also check AZFWNetworkRule and AZFWApplicationRule.
PASS (main path): AzureDiagnostics has recent rows. PASS (with web tier): firewall tables also have rows after traffic has passed.
</details>
Step 5 Β· Cost visibility check</summary>
Open workspace -> Usage and estimated costs.
PASS: you can identify the top data type by ingestion volume.
</details>
[!TIP] If a step fails, wait 10 minutes and refresh once. If still failing, re-run L2.1 once and repeat this checklist.
GitHub feature spotlight Β· One workflow, many chapters
You just used it: the Actions run asked you which chapter instead of making you find one of eighteen near-identical workflows. That is a workflow_dispatch choice input, and the chapter-to-path mapping lives in a single case statement in the workflow. Find it: .github/workflows/curriculum-l2-operations.yml β adding a chapter is two lines, one option and one case. Beyond the lab: typed inputs (choice, boolean) turn a workflow into a small internal tool, and the include_web_tier / include_app_tier booleans are the same mechanism a real pipeline uses for environment flags. Docs β
β‘οΈ What carries forward
On the main path, L3.1 checks the security of the estate you have now instrumented. If you go deeper instead, L2.2 writes queries against exactly this data β the perf counters, the syslog, and whatever categories you chose here. Anything you did not collect in this chapter is a query you cannot write there.
π§ Where next?
Your situation Go to Continue the main path β check the security of what you built L3.1 β Security Foundation Go deeper β turn this data into answers L2.2 β Operational Visibility (needs L1.3) See every chapter, cost and prerequisite πΊοΈ Curriculum Map Want the big picture of this level first Level 2 Β· Monitor overview Done for the day β the estate bills while idle Cleanup & Reset Something didnβt work Troubleshooting
Heartbeat and Perf.vm-<prefix>-test. Step 4 Β· Platform diagnostics are arriving</summary>
In the same workspace table list, check AzureDiagnostics. If web tier is enabled, also check AZFWNetworkRule and AZFWApplicationRule.
PASS (main path): AzureDiagnostics has recent rows. PASS (with web tier): firewall tables also have rows after traffic has passed.
</details>
Step 5 Β· Cost visibility check</summary>
Open workspace -> Usage and estimated costs.
PASS: you can identify the top data type by ingestion volume.
</details>
[!TIP] If a step fails, wait 10 minutes and refresh once. If still failing, re-run L2.1 once and repeat this checklist.
GitHub feature spotlight Β· One workflow, many chapters
You just used it: the Actions run asked you which chapter instead of making you find one of eighteen near-identical workflows. That is a workflow_dispatch choice input, and the chapter-to-path mapping lives in a single case statement in the workflow. Find it: .github/workflows/curriculum-l2-operations.yml β adding a chapter is two lines, one option and one case. Beyond the lab: typed inputs (choice, boolean) turn a workflow into a small internal tool, and the include_web_tier / include_app_tier booleans are the same mechanism a real pipeline uses for environment flags. Docs β
β‘οΈ What carries forward
On the main path, L3.1 checks the security of the estate you have now instrumented. If you go deeper instead, L2.2 writes queries against exactly this data β the perf counters, the syslog, and whatever categories you chose here. Anything you did not collect in this chapter is a query you cannot write there.
π§ Where next?
Your situation Go to Continue the main path β check the security of what you built L3.1 β Security Foundation Go deeper β turn this data into answers L2.2 β Operational Visibility (needs L1.3) See every chapter, cost and prerequisite πΊοΈ Curriculum Map Want the big picture of this level first Level 2 Β· Monitor overview Done for the day β the estate bills while idle Cleanup & Reset Something didnβt work Troubleshooting
AzureDiagnostics. If web tier is enabled, also check AZFWNetworkRule and AZFWApplicationRule.AzureDiagnostics has recent rows. PASS (with web tier): firewall tables also have rows after traffic has passed. Step 5 Β· Cost visibility check</summary>
Open workspace -> Usage and estimated costs.
PASS: you can identify the top data type by ingestion volume.
</details>
[!TIP] If a step fails, wait 10 minutes and refresh once. If still failing, re-run L2.1 once and repeat this checklist.
GitHub feature spotlight Β· One workflow, many chapters
You just used it: the Actions run asked you which chapter instead of making you find one of eighteen near-identical workflows. That is a workflow_dispatch choice input, and the chapter-to-path mapping lives in a single case statement in the workflow. Find it: .github/workflows/curriculum-l2-operations.yml β adding a chapter is two lines, one option and one case. Beyond the lab: typed inputs (choice, boolean) turn a workflow into a small internal tool, and the include_web_tier / include_app_tier booleans are the same mechanism a real pipeline uses for environment flags. Docs β
β‘οΈ What carries forward
On the main path, L3.1 checks the security of the estate you have now instrumented. If you go deeper instead, L2.2 writes queries against exactly this data β the perf counters, the syslog, and whatever categories you chose here. Anything you did not collect in this chapter is a query you cannot write there.
π§ Where next?
Your situation Go to Continue the main path β check the security of what you built L3.1 β Security Foundation Go deeper β turn this data into answers L2.2 β Operational Visibility (needs L1.3) See every chapter, cost and prerequisite πΊοΈ Curriculum Map Want the big picture of this level first Level 2 Β· Monitor overview Done for the day β the estate bills while idle Cleanup & Reset Something didnβt work Troubleshooting
[!TIP] If a step fails, wait 10 minutes and refresh once. If still failing, re-run L2.1 once and repeat this checklist.
GitHub feature spotlight Β· One workflow, many chapters
You just used it: the Actions run asked you which chapter instead of making you find one of eighteen near-identical workflows. That is a workflow_dispatch choice input, and the chapter-to-path mapping lives in a single case statement in the workflow. Find it: .github/workflows/curriculum-l2-operations.yml β adding a chapter is two lines, one option and one case. Beyond the lab: typed inputs (choice, boolean) turn a workflow into a small internal tool, and the include_web_tier / include_app_tier booleans are the same mechanism a real pipeline uses for environment flags. Docs β
| Your situation | Go to |
|---|---|
| Continue the main path β check the security of what you built | L3.1 β Security Foundation |
| Go deeper β turn this data into answers | L2.2 β Operational Visibility (needs L1.3) |
| See every chapter, cost and prerequisite | πΊοΈ Curriculum Map |
| Want the big picture of this level first | Level 2 Β· Monitor overview |
| Done for the day β the estate bills while idle | Cleanup & Reset |
| Something didnβt work | Troubleshooting |