Study guide

9.1 Azure Monitor Metrics, Logs, and Diagnostic Settings

AZ-104 Microsoft Azure Administrator Study Guide Exam

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Orientation and Microsoft Learn Source Control

1.1 Current AZ-104 Exam Facts 1.2 Administrator Role and Candidate Profile 1.3 Skills Outline and Weighted Study Map 1.4 Exam Duration, Question Types, Labs, and Learn Access 1.5 Scoring, Retakes, Renewal, and Account Choice 1.6 Using the Practice Bank, Labs, and Error Log

2 Chapter 2: Identity, RBAC, and Governance Foundations

2.1 Microsoft Entra Users, Groups, and Properties 2.2 Licenses, External Users, and SSPR 2.3 Azure RBAC Built-In Roles and Scopes 2.4 Role Assignment Interpretation and Deny Effects 2.5 Management Groups, Subscriptions, and Resource Groups 2.6 Azure Policy, Locks, Tags, and Governance Controls 2.7 Identity and Governance Case Lab

3 Chapter 3: Subscriptions, Policy, Costs, and Resource Organization

3.1 Subscription Design and Management Groups 3.2 Resource Groups, Lifecycle, and Move Operations 3.3 Tagging Strategy and Cost Allocation 3.4 Budgets, Alerts, and Azure Advisor Cost Recommendations 3.5 Policy, Initiative, Assignment, and Remediation 3.6 Resource Locks, RBAC, Policy, and Tags Combined 3.7 Governance and Cost Case Lab

4 Chapter 4: Storage Accounts, Access, and Data Protection

4.1 Storage Account Design, Redundancy, and Encryption 4.2 Storage Firewalls, Private Access, and Network Rules 4.3 SAS Tokens, Stored Access Policies, and Access Keys 4.4 Identity-Based Access for Azure Files 4.5 Blob Tiers, Lifecycle, Soft Delete, and Versioning 4.6 Azure Files, Snapshots, File Sync, and AzCopy 4.7 Storage Case Lab

5 Chapter 5: Compute, Virtual Machines, Scale Sets, and Bicep

5.1 ARM Templates, Bicep, and Deployment Workflow 5.2 Create, Configure, and Manage Virtual Machines 5.3 VM Disks, Sizes, Encryption, and Host Settings 5.4 Availability Zones, Sets, and VM Scale Sets 5.5 Move VMs Across Resource Groups, Subscriptions, and Regions 5.6 Backup, Restore, and Operational Maintenance for VMs 5.7 VM Compute Case Lab

6 Chapter 6: Containers, App Service, and Platform Compute

6.1 Azure Container Registry and Image Workflow 6.2 Azure Container Instances and Container Apps 6.3 Container Sizing, Scaling, and Environment Choices 6.4 App Service Plan, Apps, and Runtime Configuration 6.5 App Service Certificates, TLS, Custom Domains, and Networking 6.6 App Service Backups, Deployment Slots, and Scaling 6.7 Platform Compute Case Lab

7 Chapter 7: Virtual Networking, Routing, and Secure Access

7.1 VNet, Subnet, and Address Space Design 7.2 VNet Peering and Cross-Network Connectivity 7.3 Public IP Addresses and NAT Patterns 7.4 User-Defined Routes and Effective Routes 7.5 NSGs, ASGs, and Effective Security Rules 7.6 Azure Bastion, Service Endpoints, and Private Endpoints 7.7 Secure Networking Case Lab

8 Chapter 8: Name Resolution, Load Balancing, and Connectivity Troubleshooting

8.1 Azure DNS, Private DNS, and Name Resolution 8.2 Public and Internal Load Balancer Design 8.3 Backend Pools, Health Probes, and Load Balancing Rules 8.4 Load Balancing Troubleshooting Workflow 8.5 Network Watcher: IP Flow, Next Hop, and Connection Troubleshoot 8.6 Hybrid Connectivity, VPN, ExpressRoute, and DNS Considerations 8.7 Connectivity Troubleshooting Case Lab

9 Chapter 9: Monitoring, Alerting, Backup, and Site Recovery

9.1 Azure Monitor Metrics, Logs, and Diagnostic Settings 9.2 Log Analytics, KQL, and Operational Queries 9.3 Alert Rules, Action Groups, and Alert Processing Rules 9.4 VM, Storage, and Network Insights 9.5 Recovery Services Vault, Backup Vault, and Backup Policies 9.6 Azure Site Recovery, Failover, and Replication 9.7 Monitoring and Recovery Case Lab

10 Chapter 10: AZ-104 Integration and Troubleshooting Case Labs

10.1 Domain Weight Triage and Study Prioritization 10.2 Identity, Storage, and Compute Integrated Cases 10.3 Networking, Monitoring, and Security Integrated Cases 10.4 Migration, Move, Backup, and Recovery Cases 10.5 Permissions, Network, and Storage Troubleshooting Chain 10.6 Microsoft Learn Lookup Strategy Under Time Pressure 10.7 Full-Domain Case Lab

11 Chapter 11: Final Review, Exam Experience, Renewal, and Career Path

11.1 Final Two-Week Study Plan 11.2 Hands-On Lab Checklist and Command Review 11.3 Exam Day, Pearson VUE, Breaks, and Learn Access 11.4 Retake Plan, Score Report, and Weak-Domain Repair 11.5 Renewal Assessment and Annual Certification Maintenance 11.6 After AZ-104: AZ-305, AZ-400, SC-500, and Job Paths

9.1 Azure Monitor Metrics, Logs, and Diagnostic Settings

Key Takeaways Explain This Topic AI

Azure Monitor metrics are numeric time-series data suited to near-real-time charting, alerting, and autoscale decisions.

Azure Monitor logs store records in Log Analytics workspaces and are queried with KQL for investigation and reporting.

Diagnostic settings route resource logs and metrics to Log Analytics, Storage accounts, Event Hubs, and partner destinations.

Activity log records subscription-level control plane events, while resource logs capture service-specific data plane or platform behavior.

AZ-104 scenarios often test where to enable collection, where data lands, and which signal type supports the required query or alert.

Last updated: May 2026

Signal types and collection boundaries

Azure Monitor is the central monitoring platform for Azure resources, but the exam expects more than knowing the product name. You need to decide whether a problem should be solved with platform metrics, activity log events, resource logs, guest logs, diagnostic settings, or a Log Analytics query. The right answer usually depends on the source of the event and the operation the administrator must perform.

Metrics are numeric measurements collected at regular intervals. CPU percentage on a VM, storage account availability, disk read operations, HTTP server errors, and gateway throughput are metric-style signals. Metrics are useful when the requirement says near-real-time chart, threshold alert, autoscale, or quick capacity view. They are not the best fit when the requirement asks to search individual records, parse message text, join tables, or find the caller who changed a setting.

Logs are structured records stored in tables. Azure Monitor Logs, usually queried through a Log Analytics workspace, supports Kusto Query Language, or KQL. Logs are stronger for investigation because each record contains columns, timestamps, resource identifiers, status values, caller details, and message fields. Logs are also better for cross-resource questions, such as finding which VMs failed updates, which storage operations were denied, or which resources generated errors during a deployment window.

The activity log is a subscription-level control plane log. It records create, update, delete, policy, service health, security, recommendation, and administrative events. If a question asks who deleted a network security group rule, which policy denied a deployment, or when a VM size was changed, start with the activity log. If a question asks what an application wrote to stdout, what a firewall allowed, or which storage request returned 403, start with resource or guest logs.

Diagnostic settings

Diagnostic settings are the common routing mechanism for many Azure resource logs and selected metrics. They do not magically enable every data source in Azure. They are configured on resources, subscriptions, and some tenant-level services, and they choose categories plus destinations.

Portal path: Azure portal > Resource > Monitoring > Diagnostic settings > Add diagnostic setting . Select log categories, optionally metrics, then choose one or more destinations.

Destination Use when the requirement says AZ-104 decision clue

Log Analytics workspace Query, correlate, alert from logs, build workbooks, use KQL Best default for operational analysis.

Storage account Long retention, archive, compliance export, low-cost raw storage Querying is not the primary goal.

Event Hubs Stream to SIEM, custom platform, or third-party collector Integration or near-real-time forwarding is named.

Partner solution Send to integrated partner monitoring platform The scenario names a supported partner destination.

A common mistake is creating a Log Analytics workspace and assuming all resources automatically send diagnostic logs to it. Many platform metrics are available automatically, but resource logs usually require diagnostic settings. For VMs, guest OS performance counters and event logs require an agent and data collection configuration, not just a diagnostic setting on the VM resource.

Metrics and dimensions

Metrics live in a metrics database optimized for time-series operations. In Metrics Explorer, choose the scope, metric namespace, metric, aggregation, time range, and dimensions. Dimensions split a metric by properties such as status code, API name, disk, or instance. If a storage account has high total transactions, dimensioning by response type can quickly show whether the problem is throttling, authentication failures, or normal load.

  • CLI example: az monitor metrics list \
  • -resource <resource-id> \
  • -metric "Percentage CPU" \
  • -interval PT5M \
  • -aggregation Average \
  • -output table

Metric alerts evaluate metric values against thresholds. They are often faster and cheaper than log alerts for simple numeric conditions. Use a log query alert when the condition depends on filtering records, joining tables, or counting events that only exist in Log Analytics.

Workspace design and retention

A Log Analytics workspace is a regional data store and administrative boundary. Workspaces have retention settings and access controls. A centralized workspace can simplify cross-resource queries and alert management. Separate workspaces can support data residency, billing separation, environment isolation, or team boundaries. For AZ-104, do not assume one workspace is always correct. Match the design to region, operations ownership, and query needs.

Workspace access can be workspace-context or resource-context. With resource-context access, a user who can read a resource can view that resource's logs without gaining broad access to every table in the workspace. This matters when a central operations team owns the workspace but application teams should only see their own resources.

Implementation workflow

A practical monitoring setup for a production resource group follows a repeatable order:

Identify required signals: platform metrics, activity log, resource logs, guest logs, or application logs.

Create or select the Log Analytics workspace in the correct region and subscription.

Enable diagnostic settings on resources and subscription activity logs.

Configure VM data collection with Azure Monitor Agent when guest data is needed.

Verify ingestion by querying expected tables and checking timestamps.

Create workbooks, alerts, and action groups only after confirming data exists.

  • Example diagnostic setting command: az monitor diagnostic-settings create \
  • -name send-to-law \
  • -resource <resource-id> \
  • -workspace <workspace-resource-id> \
  • -logs '[{"category":"AuditEvent","enabled":true}]' \
  • -metrics '[{"category":"AllMetrics","enabled":true}]'

Categories differ by resource provider. On the exam, a command with a plausible category for one service might be wrong for another. In real administration, inspect supported categories first: az monitor diagnostic-settings categories list --resource <resource-id> --output table

Troubleshooting collection gaps

If a workbook or alert shows no data, start with scope and ingestion. Confirm the resource has a diagnostic setting and that the selected category is enabled. Confirm the destination workspace is the workspace you are querying. Check the time range. Many investigations fail because the query is correct but the time picker excludes the event.

If activity log events appear but resource details do not, remember that activity log and resource logs are different sources. If VM CPU appears but Windows event logs do not, platform metrics are present but guest collection is missing. If data exists in a storage account but not Log Analytics, the diagnostic setting destination is archival rather than queryable.

Exam traps are usually wording traps. "Monitor administrative changes" points to activity log. "Query failed sign-ins" points outside ordinary resource metrics and into identity logs if configured. "Alert when CPU is above 90 percent" points to metric alerts. "Alert when more than five 403 storage requests occur in ten minutes" points to diagnostic logs plus a KQL query. "Keep raw logs for seven years" points to storage export or archive strategy, not a short interactive query.