Microsoft DevOps Engineer Expert (AZ-400) · Section 5 · 8% of the exam
Inspect infrastructure performance indicators, including CPU, memory, disk, and network
One of the objectives of the Exam AZ-400: Designing and Implementing Microsoft DevOps Solutions exam, in the section “Implement an instrumentation strategy”. Here is what it covers, the points to remember and a question to try.
What it covers
Azure Monitor is the platform that stores metrics and logs for everything you run; Log Analytics is where you query them and Application Insights is its application performance monitoring feature. This lesson covers how Azure Monitor plugs into DevOps tools, how to switch on telemetry for applications, VMs, containers, storage and networks, and where to read CPU, memory, disk and network indicators.
Points to remember
- Metrics are precomputed numeric series, logs live in a Log Analytics workspace and are queried with KQL; the activity log is free and automatic.
- Resource logs need a diagnostic setting; platform metrics and the activity log do not.
- Application Insights resources are workspace-based and use a connection string; code uses an OpenTelemetry distro, browsers use the JavaScript SDK.
- Azure Monitor Agent plus a data collection rule replaced the Log Analytics (MMA) agent for guest data.
- VM insights Map and the Dependency agent retire on 30 June 2028; build on Azure Monitor Agent instead.
Try a question
An AKS cluster named aks-prod already exists in resource group rg-app. You must collect container stdout/stderr logs and Kubernetes events in an existing Log Analytics workspace. Which Azure CLI command enables this?
- A
az aks enable-addons --addon monitoring -g rg-app -n aks-prod --workspace-resource-id <id> - B
az aks update --enable-azure-monitor-metrics -g rg-app -n aks-prod - C
az monitor diagnostic-settings create --resource <aks-id> --workspace <id> - D
az monitor log-analytics workspace link --aks aks-prod
Show the answer
A. Container insights is turned on for an existing cluster with az aks enable-addons --addon monitoring, optionally with --workspace-resource-id. It deploys the containerised Azure Monitor agent and collects stdout/stderr (the ContainerLogV2 table by default), Kubernetes events and pod inventory. Prometheus metrics use a different flag and control plane logs use a diagnostic setting.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Azure Monitor, Application Insights and infrastructure telemetry teaches this objective (about 45 minutes), and 15 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Configure Azure Monitor and Azure Monitor Logs to integrate with DevOps tools
- Configure collection of telemetry by using Azure Monitor Application Insights, Azure VM Insights, Azure Container Insights, Azure Monitor for Storage, and Azure Monitor for Networks
- Configure monitoring in GitHub, including enabling insights and creating and configuring charts
- Configure alerts for events in GitHub Actions and Azure Pipelines
- Analyze metrics by using collected telemetry, including usage and application performance
- Inspect distributed tracing by using Azure Monitor Application Insights
- Interrogate logs using basic Kusto Query Language (KQL) queries