AZ-305: Microsoft Azure Solutions Architect Expert
Design a logging and monitoring solution
Design for Azure Monitor
Azure Monitor is a centralized monitoring solution that enables you to manage and analyze data from both Azure and non-Azure environments. By consolidating logs and metrics from various sources—including applications, guest operating systems, Azure resources, subscriptions, tenants, and custom resources—Azure Monitor offers robust insights for visualization, analysis, alerting, and further integrations.
Data Collection from Multiple Sources
Identifying and prioritizing the right data sources is essential for efficient monitoring. Azure Monitor supports data collection across several tiers:
Application Level:
Use Application Insights to collect application performance data.Guest Operating System:
Utilize diagnostic extensions, the Log Analytics agent, or the Dependency agent to gather metrics, logs, and perform dependency analysis.Azure Resources, Subscription, and Tenant:
- For Azure resources, configure diagnostic settings to collect logs and metrics.
- The subscription-level Activity Log is available by default and records all operations on Azure Resource Manager without extra configuration.
- At the tenant level, integrate with Azure Active Directory (Azure AD) to collect audit and sign-in logs.
Note
Selecting the appropriate data collection method—whether agent-based or out-of-the-box—depends on your monitoring needs. Ensure you only collect the data you require, as unnecessary data can lead to higher billing costs.
The collected data can be stored in internal services such as Log Analytics, Azure Storage, or Event Hub, or forwarded to external systems like Grafana and Splunk. The key is to understand the data required and prioritize its collection.
Configuring Monitoring on Virtual Machines
Configuring monitoring for a Virtual Machine (VM) in Azure is straightforward. By accessing a VM's Insights section in the Azure portal (which requires an installed agent), you can enable monitoring. Once activated, the VM’s data is sent to a configured Log Analytics workspace, where you can review monitoring configurations and performance metrics.
Additionally, out-of-the-box metrics for the VM are available without requiring additional configuration.
Diagnostic Settings for SQL Databases
For resources such as SQL databases, diagnostic settings provide enhanced logging capabilities. By accessing these settings, you can add new diagnostics and choose from various log categories and destinations. For example, if you only need security audit logs, enable just that category. Keep in mind that adding more log categories increases the ingested data volume, which can affect billing.
In some scenarios, the Azure portal may display a page with no diagnostic settings defined, prompting you to configure the necessary logs and metrics based on your monitoring strategy.
Monitoring Data Collection Methods
Below is a summary table outlining the various data collection methods available within Azure Monitor:
Data Source Type | Data Collection Method | Example/Tool |
---|---|---|
Application Level | Application Insights | Application performance monitoring |
Guest Operating System | Diagnostic extensions, Log Analytics agent, Dependency agent | Metrics and dependency analysis |
Azure Resources | Diagnostic settings | Log collection for Azure resources |
Subscription and Tenant Levels | Activity Log, Azure AD integration | Audit and sign-in logs |
Next Steps
For every Azure resource, there are multiple ways to gather monitoring data—whether by configuring diagnostic settings, installing agents, or leveraging built-in metrics. Plan your monitoring strategy carefully to focus on the data that matters most to your operations.
Next, we will explore Log Analytics in greater detail to further enhance your monitoring capabilities.
Watch Video
Watch video content