Course contentsShow
← Cloud and Infrastructure
Lesson 2053 of 2,98943. Observability - LoggingFree lesson

Azure Monitor Logs

Send logs from AKS, App Service, and VMs to Azure Monitor Logs and Log Analytics workspaces.

Azure Monitor Logs

What you'll learn: How to centralize logs from Azure Kubernetes Service (AKS), App Service, and Virtual Machines into Azure Monitor Logs using Log Analytics workspaces.

What Are Azure Monitor Logs?

Azure Monitor Logs is Microsoft Azure's fully managed logging service that collects, stores, and analyzes telemetry from your cloud and on-premises resources. At its core is the Log Analytics workspace—a centralized repository where all your logs land, similar to how Elasticsearch serves as the storage layer in the ELK stack you've learned about.

Sending Logs from Azure Resources

AKS (Azure Kubernetes Service)

When you enable Container Insights on your AKS cluster, Azure automatically deploys a containerized agent (similar to the DaemonSet pattern you know) that collects stdout/stderr logs, performance metrics, and cluster events, forwarding them to your Log Analytics workspace.

App Service

Azure App Service applications can stream diagnostic logs directly to Azure Monitor. You enable this through Diagnostic Settings, selecting which log categories (application logs, web server logs, deployment logs) to route to your workspace.

Virtual Machines

For VMs, you install the Log Analytics agent (formerly called MMA) or the newer Azure Monitor Agent (AMA). These agents collect system logs, application logs, and custom logs—functioning like Fluentd or Fluent Bit agents collecting from traditional servers.

The Log Analytics Workspace

Think of the workspace as your log aggregation endpoint. All configured resources send their structured logs here, where you can query them using KQL (Kusto Query Language)—Azure's equivalent to Kibana's KQL or Loki's LogQL.

Key Takeaway: Azure Monitor Logs consolidates telemetry from AKS, App Service, and VMs into Log Analytics workspaces, providing a unified platform for querying and analyzing logs across your entire Azure infrastructure.