AZ-400 Question 297
Single answerYou are a DevOps engineer responsible for diagnosing recurring performance bottlenecks in a multi-tier application running on Azure Virtual Machines and Azure Kubernetes Service (AKS). Your goal is to proactively monitor CPU usage, memory consumption, disk I/O, and network traffic across these resources in order to pinpoint bottlenecks quickly. Which approach should you implement to collect and visualize these performance metrics in a unified manner?
- A
Enable Azure Monitor for both VMs and containers, route data to a Log Analytics workspace, and set up alerts and dashboards for CPU, memory, disk, and network metrics.
- B
Rely solely on Azure activity logs in the portal, since they capture all necessary performance metrics out of the box.
- C
Use a manual process that retrieves performance counters from individual VMs using custom scripts and aggregates them in a local database.
- D
Deploy custom agents from a third-party monitoring solution without integrating with Azure Monitor or Log Analytics.
Show answer and explanation
Correct answer: A
Explanation
Azure Monitor and Log Analytics provide native, scalable solutions for collecting and analyzing performance indicators such as CPU, memory, disk, and network usage. By enabling the Azure Monitor for VMs and containers features, you gain centralized visibility across your infrastructure resources, making it easier to pinpoint performance bottlenecks and implement proactive alerting. For more details, refer to the Microsoft documentation on 'Azure Monitor for VMs' and 'Azure Monitor for containers' for best practices on configuration and monitoring.
- A. Correct.
Correct. By enabling Azure Monitor for VMs and Azure Monitor for containers, you can gather CPU, memory, disk I/O, and network metrics across both virtual machines and your AKS cluster. Routing this data to a Log Analytics workspace allows for centralized analysis, query-based filtering, and customizable dashboards. Alerts can be configured to proactively notify you of threshold breaches, making this approach a best practice for comprehensive infrastructure performance monitoring in Azure.
- B. Incorrect.
Incorrect. Azure activity logs provide information on management operations (such as create, update, and delete events) and some resource health insights, but they do not capture detailed performance metrics like CPU usage or memory consumption. Relying solely on activity logs is insufficient for deep troubleshooting of performance issues.
- C. Incorrect.
Incorrect. While manual scripts can collect performance counters, this method is reactive and labor-intensive. It also lacks the robust alerting and correlation features that come built-in with Azure Monitor and Log Analytics. Manual aggregation increases the risk of missing critical data patterns during performance investigations.
- D. Incorrect.
Incorrect. Third-party monitoring solutions are an option but can be complex and costly to maintain. Without integrating with Azure Monitor or storing data in Log Analytics, you lose the tight integration and ease of correlation among Azure services, which is essential for efficient troubleshooting of performance problems.