Exams / AZ-305 / D1 Design identity, governance, and monitoring solutions
D1.1
Design solutions for logging and monitoring
- 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
| 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
- 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 (
Eventtable). Linux: Syslog data source →Syslogtable. - 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).
Private Link for Azure Monitor (AMPLS)
- Private endpoint in the VNet → Azure Monitor Private Link Scope (AMPLS) → workspaces, App Insights, DCEs. Traffic stays on the Azure backbone.
- Azure Monitor endpoints are global, so one AMPLS per DNS: several AMPLS objects sharing DNS override each other.
- A VNet connects to only one AMPLS; an AMPLS takes up to 10 private endpoints.
- Peered / hub-and-spoke networks: one private endpoint on the hub (or shared by peered VNets). An isolated network needs its own private endpoint.
- "Prevent internet access to the workspace" with the Logs Ingestion API → AMPLS (+ DCE added to it).
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
- Design a Log Analytics workspace architecture
- Activity log in Azure Monitor
- Diagnostic settings in Azure Monitor
- Migrate from diagnostic settings storage retention
- Configure data retention in a Log Analytics workspace
- Azure Monitor Logs cost calculations and options
- Set daily cap on Log Analytics workspace
- Azure Monitor Logs overview (table plans)
- Azure Monitor Agent overview
- Collect Windows events with Azure Monitor Agent
- Collect Syslog events
- Collect JSON files from VMs
- Data collection endpoints
- Transformations in Azure Monitor
- Logs Ingestion API
- Log Analytics data export
- Design Azure Monitor Private Link configuration
- Use Azure Private Link to connect networks to Azure Monitor
- Stream monitoring data to Event Hubs
- Stream Entra logs to an event hub
- Entra diagnostic settings
- Azure Event Hubs trigger for Azure Functions
- Onboard a customer to Azure Lighthouse
- Application Insights overview
- Application Insights availability tests
- Application Insights usage analysis
- Monitor executions in Azure Functions
- Action groups
- Log search alert rules
- IP flow verify overview
- Traffic analytics
- NSG flow logs overview
- Dependency Agent in VM insights
- Service Map
- Change Tracking and Inventory overview
- Get resource changes (Resource Graph)
- Load Balancer monitoring data reference
- Enable Key Vault logging
- Monitor Azure Key Vault
- Set up auditing for Azure SQL Database
- Configure streaming export of SQL Database diagnostics
- App Service Health check