Level 2 β Operations, Monitoring & Observability π΅
π Curriculum overview Β· Level 2 of 6 Β Β·Β Previous: Level 1 Β· Deploy Β Β·Β Next: Level 3 Β· Secure
Theme: Monitor. Turn the environment Level 1 deployed into one you can actually operate β and learn that in Azure Monitor, what you collect is what you pay for.
L2.1 is this levelβs main-path stop β it stands on L1.1 alone and is all you need before moving on to Level 3. Chapters L2.2βL2.4 are the levelβs depth: go south into them when you want to turn the collected data into queries, alerts and a governed bill.
| Chapter | One line | Adds |
|---|---|---|
| L2.1 β Monitoring Fundamentals Β· main path | Point everything standing at one Log Analytics workspace β agents, a data collection rule and diagnostic settings | +$0.06/hr |
| L2.2 β Operational Visibility Β· depth | Turn the data into answers β saved KQL, a workbook, an optional availability test (needs L1.3) | +$0.02/hr |
| L2.3 β Proactive Operations Β· depth | Stop having to look β six alert rules, one action group, a maintenance-window suppression | +$0.01/hr |
| L2.4 β Enterprise Monitoring Strategy Β· depth | Govern the bill β table plans, retention, an audit policy and a budget | β$0.02/hr net |
| Β | Β |
|---|---|
| Builds on | L1.1 (L2.1 stands on the core alone); deeper chapters need L1.3 |
| Chapters | L2.1 Β· L2.2 Β· L2.3 Β· L2.4 |
| Existing assets reused | The Log Analytics workspace and Application Insights from L1.3 (when the app tier is deployed); the alert rule pattern already in curriculum/L1.3-multi-service-application/main.bicep |
| New Azure resources | Almost none β this level is mostly configuration on existing resources |
| Running cost at end of level | ~$1.93/hr (~$1.91/hr after L2.4βs tiering work) |
[!NOTE] Build status: Level 2 is fully built β four templates, one workflow, four walkthroughs.
Where this level sits
flowchart LR
L1["Level 1 environment<br/>4 VMs Β· firewall Β· LB Β· container app<br/>SQL Β· Key Vault Β· Front Door"]
C21["L2.1 Monitoring Fundamentals<br/>collect: DCRs, diagnostic settings"]
C22["L2.2 Operational Visibility<br/>see: KQL, workbooks, App Insights"]
C23["L2.3 Proactive Operations<br/>react: alerts, actions, autoscale"]
C24["L2.4 Enterprise Monitoring Strategy<br/>govern: tiers, retention, policy"]
L1 -->|"every resource emits<br/>logs and metrics"| C21
C21 --> C22 --> C23 --> C24
C24 -.->|"one workspace,<br/>ready for security data"| NEXT["Level 3 Β· Secure"]
classDef env fill:#eefaf0,stroke:#3a9d5d,color:#1a1a1a
classDef ch fill:#eef4ff,stroke:#4472c4,color:#1a1a1a
classDef nxt fill:#fff9e6,stroke:#c9a227,color:#1a1a1a
class L1 env
class C21,C22,C23,C24 ch
class NEXT nxt
Text description of this diagram</summary>
The Level 1 environment feeds into L2.1, which is the collection chapter: data collection rules and diagnostic settings point every standing resource at one Log Analytics workspace β a small one L2.1 creates itself on the main path, or the one L1.3 already created once the app tier is deployed. The remaining three chapters are the levelβs depth and run in order, each answering a different question β L2.2 what is happening, L2.3 what should wake someone up, L2.4 what should we be collecting at all, and what does it cost.
The dotted line to Level 3 records the design decision that matters most here: Level 2 produces one workspace, and Level 3 puts its security data in that same workspace rather than creating a second one. That is what makes Sentinel possible in Level 5 without a redesign.
</details>
L2.1 β Monitoring Fundamentals
Built: curriculum/L2.1-monitoring-fundamentals Β· walkthrough: L2.1 β Monitoring Fundamentals
Objective. Get every resource from Level 1 sending the right telemetry to one workspace, and be able to say what each stream costs.
Learning objectives
- Distinguish platform metrics (free, 93-day retention, numeric) from logs (billed per GB, queryable, arbitrary shape), and pick the right one for a given question.
- Configure diagnostic settings on the firewall, load balancer, Key Vault, SQL database and container app, and explain what each category actually contains.
- Deploy the Azure Monitor Agent to the Level 1 VMs through a data collection rule, and explain why DCRs replaced per-agent configuration.
- Enable VM insights and container insights, and identify which tables they write to.
- Read the workspaceβs own usage table to see what each source is costing.
Builds on. L1.1 only β the main-path stop right after Core Deployment; it creates its own workspace (log-<prefix>-mon). Flip include_web_tier / include_app_tier to monitor the southern tiers too; the app-tier switch reuses L1.3βs workspace instead.
Azure services. Log Analytics workspace (created on the main path, reused from L1.3 with the app tier) Β· Azure Monitor Agent Β· data collection rules Β· data collection endpoints Β· diagnostic settings Β· VM insights Β· container insights Β· Azure Activity log.
Estimated cost. +$0.06/hr Β· running total ~$1.90/hr. Assumes ~0.5 GB/day of Analytics-tier ingestion at $2.76/GB β $1.38/day. Agents, DCRs and the Activity log are free; the Activity log is free only into Log Analytics.
Cost optimization. Turn categories on one at a time and watch the usage table move. Azure Firewall and NSG flow logs are the two sources that can quietly dominate this level β collecting them is a deliberate choice, not a default. Metrics answer many βis it up?β questions for free.
L2.2 β Operational Visibility
Built: curriculum/L2.2-operational-visibility Β· walkthrough: L2.2 β Operational Visibility
Objective. Turn collected data into answers, for both the operator and the person who asks βis the app slow?β
Learning objectives
- Write KQL that spans several resource types to answer one operational question.
- Build a workbook that shows the health of the whole Level 1 estate on one page, parameterised by resource group.
- Use Application Insights on the container app to trace a request through the stack and find where latency is.
- Configure availability tests against the Front Door endpoint from L1.4 and interpret failures by region.
- Explain the difference between a dashboard someone looks at and a signal someone gets paged by β the bridge into L2.3.
Builds on. L2.1 (there is nothing to query until collection works).
Azure services. Log Analytics (KQL) Β· Azure Workbooks Β· Azure Monitor dashboards Β· Application Insights (reused from L1.3) Β· standard availability tests Β· Azure Resource Graph.
Estimated cost. +$0.02/hr Β· running total ~$1.92/hr. Workbooks, dashboards, saved searches and queries are free. The cost is ~0.15 GB/day of Application Insights telemetry (~$0.017/hr) plus the availability test at $0.0005 per execution β $0.004/hr at the two-location, 15-minute cadence the template ships with. Raise it to the portal default of five locations every five minutes and that single line becomes $0.03/hr, more than the rest of Level 2 combined.
Cost optimization. Application Insights sampling is the lever here β at default settings a chatty app can out-ingest every other source combined. Queries themselves are free in the Analytics tier, so exploration is safe; that stops being true for the Basic and Auxiliary tiers introduced in L2.4.
L2.3 β Proactive Operations
Built: curriculum/L2.3-proactive-operations Β· walkthrough: L2.3 β Proactive Operations
Objective. Move from watching to being told β with a signal-to-noise budget.
Learning objectives
- Create metric, log and activity-log alert rules and choose correctly between them for a given failure mode.
- Route alerts through action groups, and design a notification path that survives one person being on holiday.
- Apply dynamic thresholds where a static one would be wrong, and explain when they misbehave.
- Read the container appβs scale rules where they actually live β in L1.3βs template, which owns that resource β and explain why a monitoring chapter must not reach in and edit them.
- Suppress noise deliberately with alert processing rules during maintenance, and defend the decision.
Builds on. L2.2 (the queries become the log alerts) and L1.3βs existing HighReplicaCount alert, which is the worked example already in the repo.
Azure services. Azure Monitor alert rules (metric, log, activity log) Β· action groups Β· alert processing rules Β· dynamic thresholds Β· autoscale Β· Azure Service Health alerts.
Estimated cost. +$0.01/hr Β· running total ~$1.93/hr. Metric alerts are $0.10 per monitored metric/month; log alerts are $1.50/month at 5-minute frequency, $0.50 at 15-minute; the first 1,000 emails are free and Service Health alerts cost nothing. A realistic lab set (10 metric + 4 log rules) is about $7/month.
Cost optimization. Alert frequency is the price dial: the same log alert costs three times as much at 1-minute evaluation as at 5-minute. Most lab signals do not need a 1-minute rule. Metric alerts on platform metrics avoid ingestion charges entirely.
L2.4 β Enterprise Monitoring Strategy
Built: curriculum/L2.4-monitoring-strategy Β· walkthrough: L2.4 β Enterprise Monitoring Strategy
Objective. Decide what a hundred of these environments would collect, and prove the decision with numbers.
Learning objectives
- Choose a workspace topology (single vs. per-team vs. per-region) and justify it against access control, data sovereignty and cost.
- Place each table in the right plan β Analytics, Basic or Auxiliary β and quantify the saving and the capability lost.
- Separate interactive retention from long-term retention and archive, and compute the cost of a 12-month compliance requirement.
- Report on missing diagnostic settings estate-wide with an Azure Policy
AuditIfNotExists assignment, and explain why the auto-remediating DeployIfNotExists variant is unavailable to a Contributor β it needs a role assignment, which is the boundary between running a workload and governing a platform. - Build a monitoring cost report and set a budget with an action group on it.
Builds on. L2.1βL2.3 β this chapter governs everything the previous three turned on.
Azure services. Log Analytics table plans Β· retention and archive settings Β· Azure Policy (DeployIfNotExists) Β· Azure Monitor commitment tiers Β· Microsoft Cost Management budgets Β· Azure Monitor Baseline Alerts patterns.
Estimated cost. +$0.01/hr gross, β$0.03/hr net Β· running total ~$1.91/hr. Retaining 30 GB past the included 31 days costs $0.12/GB/month (~$3.60/month); archive is $0.02/GB/month. Against that, moving ~0.3 GB/day of verbose logs from Analytics ($2.76/GB) to Basic ($0.50/GB) saves about $0.68/day.
Cost optimization. This chapter is the optimization chapter: it should end with a lower bill than it started. Commitment tiers start at 100 GB/day and are far above lab volume β worth explaining, not enabling. The transferable lesson is that in Azure Monitor, architecture decisions and cost decisions are the same decision.
Cost summary for Level 2
Chapter Adds Running total Dominant meter L2.1 Monitoring Fundamentals +$0.06/hr ~$1.90/hr Analytics ingestion $2.76/GB L2.2 Operational Visibility +$0.02/hr ~$1.92/hr App Insights telemetry L2.3 Proactive Operations +$0.01/hr ~$1.93/hr Log alert rules ($1.50/rule/mo at 5 min) L2.4 Enterprise Monitoring Strategy β$0.02/hr net ~$1.91/hr Retention vs. Basic-tier saving
Level 2 adds roughly $0.07/hr β about 4% of the running bill. Said plainly: instrumenting this environment properly costs less than 6% of what its firewall costs. That comparison belongs in the levelβs closing slide.
[!TIP] Level 2βs cost is entirely a function of GB/day. Before the level starts, note the current usage; after L2.4, note it again. The delta is the lesson.
GitHub feature spotlight Β· Repository variables for lab settings
Why it matters here: every alert in this level needs a destination, and every workspace query needs a resource group. The workflow derives both from the fork owner β the resource group is your account name, and the prefix is its first segment lowercased β so no repository variables are needed and monitoring configuration never hardcodes an environment. Repository variables (AZURE_PREFIX, ALERT_EMAIL) exist only as overrides. Find it: the env: block in .github/workflows/curriculum-l2-operations.yml. Beyond the lab: the same split β non-secret configuration as variables, credentials as OIDC β is what lets one monitoring template serve dev, test and production. Docs β
What carries forward
Level 3 puts Microsoft Defender for Cloud on top of this estate and sends its findings to this workspace. The alert routing built in L2.3 becomes the delivery path for security alerts, and the table-plan discipline from L2.4 is what keeps Level 5βs Sentinel bill sane.
π§ Where next?
Your situation Go to Start the first chapter L2.1 β Monitoring Fundamentals See every chapter, cost and prerequisite πΊοΈ Curriculum Map Level 2 done β move to the next level Level 3 Β· Secure Back to the previous level Level 1 Β· Deploy What does the whole curriculum cost? Cost model
curriculum/L2.1-monitoring-fundamentals Β· walkthrough: L2.1 β Monitoring Fundamentalslog-<prefix>-mon). Flip include_web_tier / include_app_tier to monitor the southern tiers too; the app-tier switch reuses L1.3βs workspace instead.curriculum/L2.2-operational-visibility Β· walkthrough: L2.2 β Operational Visibilitycurriculum/L2.3-proactive-operations Β· walkthrough: L2.3 β Proactive OperationsHighReplicaCount alert, which is the worked example already in the repo.curriculum/L2.4-monitoring-strategy Β· walkthrough: L2.4 β Enterprise Monitoring StrategyAuditIfNotExists assignment, and explain why the auto-remediating DeployIfNotExists variant is unavailable to a Contributor β it needs a role assignment, which is the boundary between running a workload and governing a platform.DeployIfNotExists) Β· Azure Monitor commitment tiers Β· Microsoft Cost Management budgets Β· Azure Monitor Baseline Alerts patterns.| Chapter | Adds | Running total | Dominant meter |
|---|---|---|---|
| L2.1 Monitoring Fundamentals | +$0.06/hr | ~$1.90/hr | Analytics ingestion $2.76/GB |
| L2.2 Operational Visibility | +$0.02/hr | ~$1.92/hr | App Insights telemetry |
| L2.3 Proactive Operations | +$0.01/hr | ~$1.93/hr | Log alert rules ($1.50/rule/mo at 5 min) |
| L2.4 Enterprise Monitoring Strategy | β$0.02/hr net | ~$1.91/hr | Retention vs. Basic-tier saving |
[!TIP] Level 2βs cost is entirely a function of GB/day. Before the level starts, note the current usage; after L2.4, note it again. The delta is the lesson.
GitHub feature spotlight Β· Repository variables for lab settings
Why it matters here: every alert in this level needs a destination, and every workspace query needs a resource group. The workflow derives both from the fork owner β the resource group is your account name, and the prefix is its first segment lowercased β so no repository variables are needed and monitoring configuration never hardcodes an environment. Repository variables (AZURE_PREFIX, ALERT_EMAIL) exist only as overrides. Find it: the env: block in .github/workflows/curriculum-l2-operations.yml. Beyond the lab: the same split β non-secret configuration as variables, credentials as OIDC β is what lets one monitoring template serve dev, test and production. Docs β
| Your situation | Go to |
|---|---|
| Start the first chapter | L2.1 β Monitoring Fundamentals |
| See every chapter, cost and prerequisite | πΊοΈ Curriculum Map |
| Level 2 done β move to the next level | Level 3 Β· Secure |
| Back to the previous level | Level 1 Β· Deploy |
| What does the whole curriculum cost? | Cost model |