D3 · Management, Security, and Compliance

Monitoring and alerts in Azure

, Log Analytics, Application Insights, and Service Health. Monitoring isn't just metrics: it's the ability to detect problems before they impact users and to demonstrate compliance.

Icon-manage-317

Azure Monitor — the central observability platform

Azure Monitor is the umbrella service that collects, analyzes, and acts on telemetry data from all Azure resources. It's not a single product but a platform that unifies multiple capabilities.

Azure Monitor architecture

Data sources

Azure Resources (VMs, SQL, Storage, etc.)
Applications (via App Insights SDK)
On-premises systems (via agents)
Other clouds (via connectors)
Activity Log (operations in Azure)

Storage

Metrics → Azure Monitor Metrics Store (93 days)
Logs → Log Analytics Workspace (30-730 days)
Activity Log → 90 days (extendable to Storage)
Traces → Application Insights (90 days)

Consumption

Dashboards (Azure Portal / Grafana)
Alerts → email, SMS, webhook, Logic App
Autoscale (scale based on metrics)
Workbooks (interactive reports)
Power BI (advanced analysis)

Metrics — real-time numeric data

Metrics are numeric values collected at regular intervals (typically 1 minute). They describe some aspect of the system at a given moment.

Metrics by resource type

Virtual Machine

CPU percentageAvailable Memory BytesDisk Read/Write BytesNetwork In/Out

Azure SQL Database

CPU percentageDTU consumptionSessions countStorage used

App Service

RequestsResponse time (ms)Http 5xx (errors)Memory working set

Storage Account

TransactionsIngress/Egress bytesAvailabilitySuccessE2ELatency

SLA metrics — the "nines"

SLADowntime/yearDowntime/month
99%3.65 days7.3 hours
99.9%8.7 hours43.8 min
99.95%4.4 hours21.9 min
99.99%52.6 min4.4 min
99.999%5.3 min26.3 sec

Quick rule for the exam

99.9% (3 nines) = ~43 min downtime/month. 99.99% (4 nines) = ~4 min downtime/month. Each extra nine = 10x less downtime.

Logs and Log Analytics — analysis with KQL

Logs are detailed records of events. Unlike metrics (numbers), logs contain context: what happened, who did it, when, and with what result.

Types of logs in Azure

Activity Log

Record of operations on the Azure control plane: who created/modified/deleted which resource. 90-day retention.

María deleted the VM "web-01" on 2024-01-15 at 14:32

Resource Logs (Diagnostics)

Operational logs for specific resources: SQL queries, HTTP requests, storage operations. Must be enabled.

SQL Query: SELECT * FROM orders took 4,523ms (slow)

Entra ID Sign-in Logs

All authentication attempts: successes, failures, MFA, Conditional Access. 30-day retention (P1/P2) or 7 days (free).

Failed login from 185.134.21.1 (Russia) for admin@contoso.com

Alert Logs

History of triggered alerts. When, which metric/condition, what action was taken.

Alert "CPU > 90%" triggered for VM "prod-web-01" at 09:45

KQL — Kusto Query Language

Log Analytics uses KQL to query logs. The AZ-900 doesn't test writing KQL, but it does expect you to know it exists and what it's for.

Errors from the last hour

AzureActivity
| where TimeGenerated > ago(1h)
| where ActivityStatus == "Failed"
| project TimeGenerated, Caller, OperationName

Top 10 IPs with the most login failures

SigninLogs
| where ResultType != "0"
| summarize Failures=count() by IPAddress
| top 10 by Failures

Average VM CPU over the last 24h

Perf
| where TimeGenerated > ago(24h)
| where ObjectName == "Processor"
| summarize avg(CounterValue) by Computer

Metrics vs Logs — key difference for the exam

Metrics

  • Numeric values (CPU %, bytes, ms)
  • Automatically collected every 1 minute
  • Stored for 93 days by default
  • Ideal for real-time alerts and dashboards
  • No additional context — just the number

Logs

  • Event records with context (who, what, when)
  • Must be explicitly enabled (diagnostics)
  • Stored in a Log Analytics Workspace
  • Ideal for auditing, forensics, and deep analysis
  • Richer in information but more expensive to store

Alerts and Action Groups

Alerts monitor conditions and notify (or act) when they're met. An Action Group defines who gets notified and what action is taken.

Anatomy of an alert

Scope

Which resource is it about? (VM, SQL, Subscription, RG)

Condition

What condition? Metric > threshold, log query result, activity log event

Action Group

What to do when triggered? Email, SMS, Azure Function, Logic App, ITSM

Alert Details

Name, severity (0-4), description

Action Groups — action types

Notifications

Email, SMS, Push (Azure app), Voice call

Actions - ITSM

Create a ticket in ServiceNow, Jira, PagerDuty

Actions - Automation

Trigger Azure Function, Logic App, Webhook

Actions - Runbook

Run an Azure Automation Runbook (e.g., restart a VM)

Severities: 0=Critical, 1=Error, 2=Warning, 3=Informational, 4=Verbose. Used for filtering and prioritizing.

Icon-manage-310

Application Insights — APM for applications

Application Insights is Azure's Application Performance Management (APM) service. It monitors applications in real time: performance, errors, users, dependencies.

Live Metrics

Real-time metrics with < 1 second. See requests, dependencies, and errors as they happen.

Request Tracking

Every HTTP request logged: URL, duration, response code, success/failure. p50, p95, p99 percentiles.

Dependency Tracking

Calls to SQL, external APIs, queues. Detects which dependency is the bottleneck.

Exception Tracking

Unhandled errors and exceptions with full stack trace. Grouped by type.

User Analytics

How many active users, navigation flows, conversion funnels, retention.

Availability Tests

Synthetic tests from multiple regions. Alerts if your URL doesn't respond within < X ms or returns an error.

Application Insights vs Azure Monitor

Application Insights is a feature of Azure Monitor. Azure Monitor is the general platform for infrastructure. Application Insights specializes in applications. Both store data in a Log Analytics Workspace. App Insights data is queryable with KQL from Azure Monitor.

Icon-general-4

Azure Service Health — platform status

Azure Service Health reports on the status of the Azure services you use, in the regions you use. It distinguishes between platform issues and issues with your own configuration.

Azure Status

Global Azure status: incidents affecting multiple customers or entire regions. Public information at status.azure.com.

When to use

Check when there's a major incident affecting many customers.

Service Health

Personalized status for the services and regions YOU USE. Includes service issues, planned maintenance, and health advisories.

When to use

Daily monitoring of the services relevant to your organization.

Resource Health

Status of your individual specific resources. Is this particular VM healthy? Did it have an unplanned restart?

When to use

Diagnosis when a specific resource has problems.

Related labD3 · Management, security, and compliance

Configure an Azure Service Health alert

Create an alert that notifies you by email if Microsoft reports an incident in the services and regions you use.

Tell apart Azure Status, Service Health, and Resource Health
Configure a personalized service status alert

+1 more...

5 min6 steps
Related labD3 · Management, security, and compliance

Apply an Azure Advisor recommendation

Review Advisor's personalized recommendations and apply one to resize underused VMs and reduce costs.

Understand Advisor's 5 evaluation categories: cost, security, reliability, performance, operational excellence
Interpret a cost recommendation with its estimated savings

+1 more...

5 min4 steps

Composite SLA calculation

When a solution depends on multiple services in series, the composite SLA is the product of the individual SLAs. Each component reduces the overall SLA.

Example: typical web app

Azure App Service99.95%
Azure SQL Database99.99%
Azure Storage99.9%

Composite SLA

0.9995 × 0.9999 × 0.999 = 0.9983

Composite SLA ≈ 99.83% → ~12.6 hours of potential downtime per year

Important rule

The composite SLA is ALWAYS less than or equal to the lowest SLA among the components. Adding more services in series always reduces the overall SLA. To improve it: use (, multi-region), which multiplies uptime in parallel.

Related labD3 · Management, security, and compliance

Configure a metric alert in Azure Monitor

Create an alert rule in Azure Monitor to get notified when a VM's CPU goes above 80%. Observability and alerts are part of the AZ-900 management and governance domain.

Understand what Azure Monitor is and what it's for
Identify the components of an alert: scope, condition, and action

+1 more...

10 min9 steps

Did you get this topic?

Test what you just learned

Which Azure service lets you create automatic alerts when a VM's CPU usage exceeds 90% for 5 minutes?

Ready to test "Monitoring and alerts"?

Put what you learned to the test with original AZ-900 exam questions.

Start AZ-900 mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.