All exams← All Azure Administrator (AZ-104) notes

Monitor & maintain Azure resources: Azure Administrator (AZ-104) revision notes

Revision notes

Monitor & maintain Azure resources

This topic covers Azure Monitor, Log Analytics, alerts, Network Watcher and backup/recovery basics for AZ-104.

Azure Monitor building blocks

  • Azure Monitor collects two core data types: metrics (numerical, time-series, lightweight) and logs (structured records queried with Kusto Query Language, KQL).
  • Metrics are stored for 93 days by default in the platform metrics database.
  • Logs are sent to a Log Analytics workspace; default retention is 30 days (interactive retention configurable 30-730 days on the workspace).
  • Diagnostic settings route resource logs and metrics to a Log Analytics workspace, Storage account, or Event Hub - a resource is not monitored in depth until a diagnostic setting is created.

Activity Log vs resource logs

  • The Activity Log records subscription-level control-plane events (who did what, when) and is retained 90 days automatically, with no configuration needed.
  • Resource logs (data-plane operations, e.g. inside a VM or storage account) require an explicit diagnostic setting and are NOT enabled by default.
  • A common exam trap: assuming resource logs exist automatically like the Activity Log - they don't.

Alerts

  • Alert rules have three parts: signal (metric, log, activity log), condition/threshold, and action group.
  • Action groups define the response: email, SMS, push, voice, webhook, Azure Function, Logic App, or runbook.
  • Metric alerts can use static or dynamic thresholds; dynamic thresholds learn normal patterns using machine learning.
  • Log alerts run a scheduled KQL query at a set frequency and fire when results meet the condition.

VM insights and diagnostics

  • Azure Monitor Agent (AMA) is the current unified agent, replacing the legacy Log Analytics agent (MMA/OMS), which retired 31 August 2024.
  • VM insights uses AMA plus data collection rules (DCRs) to gather performance counters and map dependencies.
  • Boot diagnostics captures console output and screenshots to troubleshoot VM startup issues - stored in a storage account.

Network Watcher

  • Network Watcher provides diagnostic tools: IP flow verify, Next hop, Connection troubleshoot, and Packet capture.
  • NSG flow logs (version 2 preferred) record allowed/denied traffic through a network security group and can feed Traffic Analytics for visualisation.

Backup and recovery basics

  • Azure Backup uses a Recovery Services vault; default backup policy for VMs is once daily, with instant restore points kept for 1-7 days.
  • Soft delete keeps deleted backup data recoverable for 14 days by default, protecting against accidental or malicious deletion.
  • Azure Site Recovery (ASR) handles disaster recovery/replication and is a separate service from Azure Backup, though both use a Recovery Services vault.

Common mistakes

  • Forgetting resource logs need a diagnostic setting configured explicitly.
  • Confusing metric alerts (fast, near real-time) with log alerts (slower, query-based, minimum 5 minute frequency).
  • Assuming the legacy Log Analytics agent still works - it's retired; use AMA.

Key facts

Flashcards

How long does Azure Monitor keep platform metrics by default?
93 days.
tap to reveal
What is the default retention period for a Log Analytics workspace?
30 days (configurable from 30 to 730 days).
tap to reveal
How long is the Activity Log retained, and does it need configuring?
90 days, retained automatically with no setup required.
tap to reveal
Do resource logs get collected automatically like the Activity Log?
No - they require an explicit diagnostic setting sending logs to a workspace, storage account, or event hub.
tap to reveal
What agent replaced the legacy Log Analytics (MMA) agent, and when did the old one retire?
Azure Monitor Agent (AMA); the legacy agent retired 31 August 2024.
tap to reveal
What is the minimum run frequency for a log alert rule?
5 minutes.
tap to reveal
What do dynamic thresholds use to set alert conditions?
Machine learning that adapts to the resource's normal metric pattern over time.
tap to reveal
What are the four main Network Watcher diagnostic tools?
IP flow verify, Next hop, Connection troubleshoot, and Packet capture.
tap to reveal
What does an action group define in an Azure Monitor alert?
The response actions - email, SMS, push, voice, webhook, Azure Function, Logic App, or Automation runbook.
tap to reveal
What is the default soft-delete retention for Azure Backup data in a Recovery Services vault?
14 days.
tap to reveal
What is the default Azure VM backup frequency and instant restore point retention?
Once daily backup, with instant restore points kept for 1-7 days.
tap to reveal
What service handles disaster recovery/replication separately from Azure Backup, though sharing a vault type?
Azure Site Recovery (ASR), using a Recovery Services vault.
tap to reveal
What query language is used to analyse logs in a Log Analytics workspace?
Kusto Query Language (KQL).
tap to reveal
What does NSG flow logging (v2) feed into for visualisation?
Traffic Analytics.
tap to reveal
What captures console output and screenshots to troubleshoot a VM that fails to start?
Boot diagnostics, stored in a storage account.
tap to reveal
Practice questions

Monitor & maintain Azure resources: 5 practice questions

Q1. You need to store performance counters and event logs from Azure VMs so they can be queried with Kusto Query Language (KQL). Which resource should the data be sent to?
  • A.  An Azure SQL Database
  • B.  A Log Analytics workspace
  • C.  A classic storage account table
  • D.  A Recovery Services vault
Show answer & explanation
✓ Answer: B. A Log Analytics workspace
Log Analytics workspaces store log-type data (including performance counters and event logs collected from agents) and are queried with KQL. Storage tables and Azure SQL are not native Azure Monitor query targets, and Recovery Services vaults hold backup/replication data, not monitoring logs.
Q2. In a Log Analytics KQL query, which operator is used to aggregate rows into summary statistics, such as counting events per computer?
  • A.  project
  • B.  order by
  • C.  summarize
  • D.  where
Show answer & explanation
✓ Answer: C. summarize
The summarize operator groups rows and applies aggregation functions like count() or avg(). project selects/renames columns, where filters rows, and order by sorts results - none of these aggregate data.
Q3. By default, how long is Activity Log data retained in Azure before you must export it for longer-term storage?
  • A.  90 days
  • B.  30 days
  • C.  365 days
  • D.  7 days
Show answer & explanation
✓ Answer: A. 90 days
Azure retains Activity Log events for 90 days automatically. To keep data longer, you configure a diagnostic setting to send it to a Log Analytics workspace, storage account, or Event Hub.
Q4. An administrator wants to be notified only when the CPU percentage metric on a VM exceeds a static value for a defined period. Which Azure Monitor feature should be configured?
  • A.  A resource health alert
  • B.  A metric alert rule
  • C.  An Azure Advisor recommendation
  • D.  A Service Health alert
Show answer & explanation
✓ Answer: B. A metric alert rule
Metric alert rules evaluate platform or custom metrics against a threshold over a time window and can fire near real-time. Service Health and resource health alerts relate to Azure platform incidents or resource availability, not custom metric thresholds; Advisor gives recommendations, not alerts.
Q5. Which component of an Azure Monitor alert defines the actions taken when an alert fires, such as sending an email, SMS, or triggering a webhook?
  • A.  Alert rule condition
  • B.  Action group
  • C.  Diagnostic setting
  • D.  Data collection rule
Show answer & explanation
✓ Answer: B. Action group
An action group is a reusable collection of notification and action preferences (email, SMS, webhook, Logic App, Automation runbook) attached to one or more alert rules. The condition defines when to fire, not what happens afterward.
Test yourself
See the Azure Administrator (AZ-104) page

More Azure Administrator (AZ-104) topics