Azure Monitor: Logs, Alerts, and Insights
Azure Monitor collects, analyses, and acts on data from your Azure resources. With Log Analytics, alerts, and Application Insights β it's your operations command centre.
What is Azure Monitor?
Think of Azure Monitor as the dashboard in your car.
Your car dashboard shows speed, fuel level, engine temperature, and warning lights. If something goes wrong, an alarm sounds. You can check the trip computer for history.
Azure Monitor does the same for your cloud resources:
Metrics = the gauges (CPU %, memory usage, request count β real-time numbers).
Log Analytics = the trip computer (detailed logs you can search and analyse).
Alerts = the warning lights (notifications when something needs attention).
Application Insights = a special dashboard for your web apps (page load times, errors, user behaviour).
Azure Monitor components
Metrics β real-time numbers
Metrics are numeric values collected at regular intervals:
- CPU percentage
- Memory usage
- Disk I/O
- Network throughput
- Request count
Metrics are lightweight, near real-time, and stored for 93 days. Perfect for dashboards and quick health checks.
Log Analytics β deep analysis
Log Analytics stores detailed logs in a workspace where you can search, analyse, and visualise them:
| Feature | Description |
|---|---|
| Data sources | Azure resources, VMs, applications, custom sources |
| Query language | Kusto Query Language (KQL) |
| Retention | Configurable (30 days to 2 years) |
| Use cases | Troubleshooting, security investigation, compliance reporting |
Harbour Health uses Log Analytics to investigate security incidents: βShow me all failed login attempts in the last 24 hours, grouped by user.β
Azure Monitor Alerts
Alerts proactively notify you when conditions are met:
| Alert Component | Purpose |
|---|---|
| Condition | What triggers the alert (e.g., CPU > 90% for 5 min) |
| Action group | What happens when triggered (email, SMS, webhook, Logic App) |
| Severity | 0 (Critical) to 4 (Verbose) |
| Scope | Which resource(s) to monitor |
Summit Constructionβs alert setup:
- CPU > 80% for 10 minutes β Email to IT manager (warning)
- CPU > 95% for 5 minutes β Email + SMS + auto-scale trigger (critical)
- VM stopped unexpectedly β Email + Teams notification (critical)
- Storage account > 90% full β Email (warning)
Application Insights β for web apps
Application Insights is a specialised monitoring tool for web applications:
| What It Monitors | Example |
|---|---|
| Request rates | How many requests per second your API handles |
| Response times | Average page load time |
| Failure rates | Percentage of requests that return errors |
| Dependencies | How your app interacts with databases and external services |
| User behaviour | Which pages users visit, where they drop off |
Kai adds Application Insights to their Azure Functions API. They can now see that 3% of requests fail with a timeout β and trace the issue to a slow database query.
How all the monitoring tools fit together
| Tool | Question It Answers |
|---|---|
| Azure Monitor (Metrics) | βHow is my resource performing RIGHT NOW?β |
| Log Analytics | βWhat happened over the past week? Show me the details.β |
| Alerts | βTell me immediately when something goes wrong.β |
| Application Insights | βHow is my web app performing for end users?β |
| Azure Advisor | βHow can I improve my setup?β (recommendations) |
| Azure Service Health | βIs Azure itself having problems?β |
| Defender for Cloud | βHow secure is my environment?β |
They all complement each other β Monitor watches, Advisor advises, Health reports Azureβs status, and Defender protects.
π¬ Video walkthrough
π¬ Video coming soon
Azure Monitor β AZ-900
Azure Monitor β AZ-900
~10 minFlashcards
Knowledge Check
Harbour Health wants to investigate all failed login attempts over the past week. Which Azure Monitor component should they use?
Summit Construction wants to automatically receive an SMS when their production VM's CPU exceeds 95% for more than 5 minutes. What should they configure?
Kai wants to monitor their web API's response times and identify which requests are failing. Which Azure Monitor feature is BEST suited?
π Youβve completed all 26 modules of the AZ-900 Study Guide! You now have a comprehensive understanding of cloud concepts, Azure architecture and services, and Azure management and governance. Time to test your knowledge with practice questions!