↑ ↓ to move, Enter to open, Esc to close

    AZ-305Designing Microsoft Azure Infrastructure Solutions

    Switch exam

    Microsoft Azure

    aws Amazon Web Services

    Google Cloud

    ServiceNow

    Databricks

    Cisco

    Salesforce

    All exams and search

    Exams / AZ-305 / D1 Design identity, governance, and monitoring solutions

    D1.1

    Design solutions for logging and monitoring

    • 6 min read
    • 6 sections
    • 43 questions
    • 25–30% of the exam
    • Free preview
    • Recommend a logging solution
    • Recommend a solution for routing logs
    • Recommend a monitoring solution
    You are reading a free preview. The rest of the AZ-305 course unlocks with an Exam pass or All access.See plans

    The Azure Monitor data flow

    Subscriptionactivity log (control plane)Log Analyticsworkspace(KQL, alerts, Sentinel)Azure resource(SQL, Key Vault, storage...)Storage account(archive)Event Hubs(stream to SIEM / customcode)VM guest OS(events, syslog, IIS, JSON)ApplicationApplication Insights(workspace-based)Action group(email, SMS, webhook...)diagnostic settingdiagnostic settingdiagnostic settingdiagnostic settingAzure Monitor Agent + DCRSDK / OpenTelemetrydata export rulelog search alert
    Source What it contains How you get it
    Activity log Control-plane (ARM) operations: create VM, change policy, deployments Automatic, kept 90 days; export to a workspace → AzureActivity table
    Resource logs Data-plane activity of a resource (Key Vault AuditEvent, SQL SQLInsights, storage transactions) Not collected until you create a diagnostic setting
    Platform metrics Numeric time series (CPU, SYN Count, Health Probe Status) Automatic
    Guest OS logs Windows events (Event), Linux syslog (Syslog), IIS (W3CIISLog), custom text/JSON Azure Monitor Agent (AMA) + data collection rule (DCR)
    Application telemetry Requests, dependencies, failures, users, availability Application Insights
    • Monthly report of new ARM deployments → Activity Log; if it is not an option → Log Analytics (query AzureActivity).
    • Key Vault "how and when was it accessed" → resource logs via a diagnostic setting in Azure Monitor, not the activity log (control plane only).

    Routing logs: diagnostic settings

    Destination Use it for
    Log Analytics workspace Query with KQL, alerts, workbooks, Sentinel
    Storage account Cheap archive, audit, long retention of raw JSON
    Event Hubs Stream to external / third-party SIEM, or to custom code (Azure Functions trigger)

    Rules to remember:

    • Up to five diagnostic settings per resource; one setting holds at most one destination of each type. Two workspaces → two settings.
    • For regional resources, the storage account and event hub must be in the same region as the resource. Any Standard storage account works; Premium storage does not.
    • Diagnostic-setting storage retention is deprecated (disabled 30 September 2025). Use an Azure Storage lifecycle management policy. Old exam keys still read the "Retention (days)" box.
    • Entra ID audit/sign-in logs also use diagnostic settings: to Log Analytics (alerting), Event Hubs (SIEM, custom pipeline) or storage.
    • Pattern "Entra events into Cosmos DB" = Event Hubs → Azure Functions (Event Hubs trigger) → Cosmos DB.
    • SQL auditing to storage: in the portal the storage account must be in the same region as the server; other tools allow any region.

    Log Analytics workspace design

    • Start with a single workspace. Split only for data residency, separate security/operations ownership, billing/charge-back, or different retention needs. One team → one workspace for App Insights, VM insights, Network Insights and Sentinel.
    • One Entra tenant → one workspace for that tenant. Several tenants: centralize with Azure Lighthouse (delegated management across tenants).

    Cost and retention

    Option Effect Trap
    Commitment tier (from 100 GB/day) Lower price per GB for Analytics Logs, no functional change 31-day commitment; doesn't apply to Basic/Auxiliary
    Basic / Auxiliary table plan Cheaper ingestion Limited queries and alerts (simple log alerts only on Basic)
    Daily cap Stops billable collection for the rest of the day Data loss; not a cost-optimization tool
    Analytics retention Up to 730 days (interactive) —
    Total retention (long-term) Up to 12 years Older exam keys say 730 days is the maximum

    Collecting from VMs: AMA, DCR, DCE

    VMsEast US VMsCentral US VMsWest US VMsDCR: Windows eventsDCR: IIS logsLog Analytics workspaceassociatedassociatedassociatedassociatedAMAAMAAMA
    • AMA collects according to the DCRs associated with it. The legacy Log Analytics agent (no DCRs) is retired; the Connected Machine agent is the Azure Arc agent.
    • Group DCRs by data source and associate each one with only the machines that need it → minimal data volume.
    • Windows events: filter with XPath in the DCR; data goes only to a workspace (Event table). Linux: Syslog data source → Syslog table.
    • Transformations in a DCR are KQL statements applied to incoming records before they reach the table.
    • Data collection endpoint (DCE): not always required. Needed with Private Link and for some sources (Windows Firewall logs, Prometheus metrics). Older exam keys require a DCE for custom text/JSON logs.
    • Logs Ingestion API: uses the DCR's ingestion endpoint or a DCE; a DCE is required with Private Link.
    • Archive workspace data to storage → Log Analytics data export rules (continuous, per table).

    Choosing a monitoring tool

    Need Tool
    App performance, failures, dependencies (APM) Application Insights
    Synthetic transactions / availability / end-user response time Application Insights availability (standard) tests
    User behaviour (users, sessions, funnels, user flows) Application Insights usage analytics
    Azure Functions executions Application Insights (built-in integration)
    Notify a team / distribution group when an alert fires Action group
    Alert on Entra sign-ins Entra logs → Log Analytics → log search alert (signal: Log)
    Is this packet allowed or denied, by which rule? Network Watcher IP flow verify
    Allowed/blocked flows, apps attempting Internet access Traffic analytics on flow logs
    Process and dependency map Service Map (retired Sept 2025) → VM insights Map (deprecated, retiring June 2028)
    In-guest changes (registry, files, software, services) Change Tracking and Inventory
    ARM property changes (NIC DNS settings, SKU...) Azure Resource Graph change analysis
    Load Balancer: backend VM down Health Probe Status metric
    Load Balancer: connection attempts SYN Count metric
    LB frontend data path health Data Path Availability
    • NSG flow logs retire on 30 September 2027 → migrate to virtual network flow logs (traffic analytics supports both).
    • App Service Health check only removes unhealthy instances from rotation; it isn't end-user monitoring.

    Exam traps

    • "Monthly report of ARM deployments": Activity Log if listed, otherwise Log Analytics. Never metrics, Advisor, Arc, action groups or Analysis Services.
    • "Third-party SIEM": Event Hubs. "Keep N years cheaply in JSON" → storage account.
    • Daily cap = data stops being collected. A "keep all logs" requirement rules it out.
    • Basic table plan cuts cost but degrades alerting. At ≥ 100 GB/day choose a commitment tier (set on the workspace).
    • Diagnostic settings: same region for storage and event hubs; several settings for several destinations of the same type.
    • DCRs need AMA, not the Log Analytics agent. Cross-tenant collection: Lighthouse.
    • DCE count questions: with a public workspace and standard sources, 0 DCEs. Older keys may count a DCE for IIS or custom logs.
    • AMPLS: one per DNS; private endpoints per isolated network.
    • Advisor and VM insights never tell you whether packets are allowed or denied.
    • Key Vault access audit: resource logs (diagnostic setting), not the activity log.

    Docs

    The rest of this chapter is part of the AZ-305 premium course

    Unlock every chapter, all 370 questions and spaced review with All access or a 90-day exam pass. Every Fundamentals exam stays free, and the first chapter of every exam is open.

    Chapters