AZ-104
Deep Dive
Log Analytics is Azure Monitor's log analysis engine. The AZ-104 exam evaluates workspace configuration, basic KQL queries, important tables and the agent configuration for collecting data from VMs.
Contents
A Log Analytics Workspace is the storage and query environment for logs in Azure Monitor. It's a regional resource where data from multiple Azure resources, VMs and solutions is centralized.
What is stored
Design — how many workspaces
Key configuration
KQL (Kusto Query Language) is Log Analytics' query language. It's a read-only, pipeline-oriented language — data flows from left to right through operators chained with the pipe |.
Fundamental KQL operators
Example KQL queries
// VMs with CPU above 90% in the last hour
Perf
| where TimeGenerated > ago(1h)
| where ObjectName == "Processor"
| where CounterName == "% Processor Time"
| where CounterValue > 90
| summarize avg(CounterValue) by Computer
// Errors in Azure Activity Log in the last 24h
AzureActivity
| where TimeGenerated > ago(24h)
| where Level == "Error"
| project TimeGenerated, Caller, OperationName, ResourceGroup
| order by TimeGenerated desc
// Top 10 IPs with the most denied connections
AzureNetworkAnalytics_CL
| where FlowStatus_s == "D"
| summarize count() by SrcIP_s
| top 10 by count_
| Table | Content | Source |
|---|---|---|
| AzureActivity | Control-plane operations (create/update/delete of resources, RBAC changes) | Activity Log (automatic) |
| Heartbeat | Agent heartbeat: confirms the agent on the VM is active | Azure Monitor Agent |
| Perf | OS performance metrics (CPU, memory, disk, network) | Azure Monitor Agent |
| Event | Windows Event Log events (System, Application, Security) | Azure Monitor Agent (Windows) |
| Syslog | Linux system logs (syslog, auth, daemon, etc.) | Azure Monitor Agent (Linux) |
| SecurityEvent | Windows security events (login, policy change, account mgmt) | Defender for Cloud / Sentinel |
| AzureDiagnostics | Diagnostic logs from multiple Azure resources (Legacy — catch-all table) | Diagnostic Settings |
| StorageBlobLogs | Operations on blobs (read, write, delete) | Diagnostic Settings on Storage |
| AzureNetworkAnalytics_CL | Analysis of NSG Flow Logs processed by Traffic Analytics | Traffic Analytics |
| SigninLogs | Sign-in logs from Entra ID | Entra ID Diagnostic Settings |
| AuditLogs | Changes in Entra ID (users, groups, apps, roles) | Entra ID Diagnostic Settings |
| requests / exceptions / traces | Application Insights telemetry | Application Insights SDK |
The Azure Monitor Agent (AMA) is the modern unified agent for collecting data from VMs (OS metrics, event logs, syslog). It replaces the legacy MMA (Microsoft Monitoring Agent / Log Analytics Agent) and Diagnostics Extension agents.
AMA characteristics
Legacy agents (being deprecated)
MMA / Log Analytics Agent
Deprecated — end of support August 2024. Migrate to AMA.
Diagnostics Extension (WAD/LAD)
Sends guest OS metrics to Azure Monitor Metrics (not directly to Log Analytics). Can be used together with AMA.
Data Collection Rules (DCR) are Azure resources that define what data to collect, how to transform it, and to which destinations to send it. They're the AMA's configuration mechanism — decoupling the agent's configuration.
Data Sources
What to collect
Data Flows
Optional transformations
Destinations
Where to send it
| Tier | Retention | Queryable | Cost | Use |
|---|---|---|---|---|
| Interactive (Analytics) | 30-730 days | Yes — full KQL | Per GB ingested + extra days 31-730 | Active operational data |
| Basic Logs | 8 days | Limited — simple queries only | Much cheaper per ingestion | High-volume, low-value logs (verbose logs) |
| Archive | Up to 12 years | Not direct — requires a Search Job | Very cheap per storage | Long retention for compliance/auditing |
Ingestion pricing model
Free data in Log Analytics
Did you get this topic?
Test what you just learned
Which Log Analytics table contains the heartbeats of the Azure Monitor Agents installed on VMs, letting you verify that they are active?
Put what you learned to the test with original AZ-104 exam questions.
Start AZ-104 mock examUnlimited mock exams with the Pro plan
Log in to track your progress.