You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Understanding how to monitor your Azure resources and manage costs is just as important as knowing how to build with them. Azure provides comprehensive tools for observability, alerting, and cost control.
Azure Monitor is the unified monitoring platform for Azure. It collects, analyses, and acts on telemetry from your Azure resources, applications, and infrastructure.
| Type | Description | Example |
|---|---|---|
| Metrics | Numerical time-series data | CPU utilisation, request count, latency |
| Logs | Structured event records | Application errors, audit events, resource changes |
| Traces | Distributed request tracing | End-to-end request flow across services |
| Component | Purpose |
|---|---|
| Metrics Explorer | Visualise and analyse metrics in real time |
| Log Analytics | Query logs using Kusto Query Language (KQL) |
| Alerts | Trigger notifications or actions based on conditions |
| Dashboards | Custom visualisations of metrics and logs |
| Workbooks | Interactive reports combining text, queries, and visualisations |
Azure Monitor alerts notify you when conditions are met:
| Alert Type | Triggers On |
|---|---|
| Metric alert | A metric crosses a threshold (e.g., CPU > 80%) |
| Log alert | A log query returns results |
| Activity log alert | A specific Azure operation occurs (e.g., VM deleted) |
When an alert fires, it can:
Application Insights is an extension of Azure Monitor for application performance management (APM):
You add the Application Insights SDK (or enable auto-instrumentation) to your application code.
The Activity Log records control-plane operations on Azure resources:
The Activity Log is retained for 90 days. For longer retention, send it to a Log Analytics workspace or storage account.
AzureActivity
| where OperationNameValue == "Microsoft.Compute/virtualMachines/delete"
| where ActivityStatusValue == "Success"
| project TimeGenerated, Caller, ResourceGroup
| order by TimeGenerated desc
Azure costs are based on resource consumption:
Entra ID Tenant
|
|-- Billing Account
|
|-- Billing Profile
|
|-- Invoice Section
|
|-- Subscription A (resources billed here)
|-- Subscription B
The Pricing Calculator (azure.microsoft.com/pricing/calculator) lets you estimate costs before deploying:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.