Azure Monitor: Seeing, Understanding and Reacting to Everything in Your Cloud

Azure Monitor: Seeing, Understanding and Reacting to Everything in Your Cloud

An intermediate guide to Azure Monitor: how telemetry is collected, stored and explored, how alerts and automation respond to problems, and how to design monitoring that is useful, secure and affordable.

Imagine you are the driver of a long-distance truck. The dashboard in front of you shows speed, fuel, engine temperature and tire pressure. A warning light turns on before the engine overheats. A recorder in the cabin keeps a detailed history of every trip, so that if something strange happens, a mechanic can replay it later. Without these instruments, you would only discover trouble when the truck stopped on the side of the road.

Cloud applications are like that truck, but much larger and far more complicated. They run on dozens of services across many machines, and problems can start anywhere. Azure Monitor is the instrument panel, the warning lights and the flight recorder for all of it. This tutorial explains each part from the ground up, then shows how experienced teams combine them into a monitoring approach that catches problems early and explains them quickly.

1What Azure Monitor Is and Why It Exists

Azure Monitor is Microsoft’s service for collecting, analyzing and acting on information about your applications and the resources they run on.

The problem it solves

When software ran on a single server in a back room, monitoring meant glancing at that one machine. Modern systems are different. A single customer request may touch a web front end, several internal services, a database, a cache and a message queue, each running on different infrastructure. If the request is slow, which part is to blame? Without a central view, teams jump between tools, compare timestamps by hand and guess.

Azure Monitor gathers information from all of those parts into one platform. It lets you ask questions across everything at once, draws charts of health, and sends a message to the right person when something goes wrong. It also supports automatic reactions, such as adding more servers when demand rises.

Simple Analogy

Azure Monitor is like the control room of a big hospital. Every patient has sensors, and all the readings flow to one central screen. Nurses watch the screen, alarms sound for danger, and a full history is kept so doctors can review exactly what happened.

What it covers

Azure Monitor works with Azure resources such as virtual machines, databases and web apps. It also reaches beyond Azure, collecting data from servers in other clouds and on-premises data centers, from containers and Kubernetes clusters, and from custom applications that send their own data. This makes it practical for companies that run a mix of environments.

Monitoring versus observability

You will often hear two related words. Monitoring means watching for known problems, such as a server running out of disk space. Observability means having enough detailed data that you can investigate problems you did not predict. Azure Monitor supports both: dashboards and alerts for the known, and rich search over logs and traces for the unknown.

i
Good to Know

Much of Azure Monitor works automatically. Platform metrics and the activity log start flowing the moment you create an Azure resource, with no setup. The deeper features, such as detailed logs, need to be switched on deliberately.

2The Four Kinds of Telemetry

Everything Azure Monitor collects falls into a few categories, and knowing the difference tells you which one to reach for.

Type 1

Metrics

Numbers measured over time, such as processor use or requests per second. Light, fast and ideal for charts and alerts.

Type 2

Logs

Records of events with rich detail, such as an error message, a sign-in or a configuration change. Best for investigation.

Type 3

Traces

The path of a single request as it travels through many services, showing where time was spent.

Type 4

Changes

Records of what was altered in your environment, such as a deployment or a setting update, helping you connect problems to causes.

Simple Analogy

Think of a car trip. Metrics are the speedometer and fuel gauge, always giving a quick number. Logs are the detailed trip diary. A trace is the route map of one specific journey, with the time spent at each stop. Changes are the mechanic’s notes about what was repaired last week.

Why you need more than one

Each type answers a different question. A metric tells you that something is wrong, such as response time doubling. A trace shows where the delay happens, perhaps in a call to a database. A log explains why, perhaps a specific error message. A change record reveals what likely triggered it, such as a deployment ten minutes earlier. Used together they turn a vague complaint into a clear diagnosis.

TypeTypical QuestionStrengthWeakness
MetricsIs something wrong right now?Very fast, cheap, easy to alert onLittle detail about individual events
LogsWhat exactly happened and why?Rich detail and flexible searchMore data, more cost, slower to query
TracesWhere did this request spend its time?Shows the full path across servicesNeeds instrumentation in the application
ChangesWhat changed before this started?Links symptoms to causesOnly shows what was recorded
!
Common Mistake

Sending everything to logs because it feels most flexible. Logs cost more to store and are slower to query than metrics. Use metrics for health and alerts, and keep logs for detail and investigation.

3The Big Picture Architecture

Azure Monitor follows a simple flow: data comes in from sources, lands in a data platform, and is used by tools that show, alert and automate.

flowchart LR
    SRC["Sources: applications, VMs, containers, Azure resources, custom data"] --> COL["Collection: agents, diagnostic settings, SDKs, APIs"]
    COL --> MET["Metrics store"]
    COL --> LOG["Logs store: Log Analytics workspace"]
    COL --> TRC["Traces and application data"]
    MET --> USE["Use: charts, workbooks, dashboards"]
    LOG --> USE
    TRC --> USE
    MET --> ACT["Respond: alerts, autoscale, automation"]
    LOG --> ACT
        
FIG 1 — From telemetry sources to charts and automated responses

Three layers to remember

1

Sources and collection

Things that produce data, plus the mechanisms that carry the data into Azure Monitor, such as agents and diagnostic settings.

2

Data platform

The stores that hold the information: a metrics store for numbers over time and Log Analytics workspaces for logs and other records.

3

Consumption

Tools that make the data useful: explorers, workbooks, dashboards, alerts, autoscale and integrations with other systems.

Simple Analogy

Think of a water system. Rivers and springs are the sources, pipes carry water to reservoirs, and the taps, fountains and fire hydrants are where people actually use it. Azure Monitor has the same three parts for data.

Why the layers matter

Separating these layers explains many design decisions. You can change where data is collected from without touching your dashboards. You can add a new alert without collecting any new data. And you can send the same data to several places at once, such as keeping a copy in cheap storage for compliance while also analyzing it in a workspace for daily operations.

i
Design Habit

Before turning on any collection, name the question the data will answer. Data with no question attached is simply a monthly bill.

4Where the Data Comes From

Azure Monitor collects from several layers of your environment, from the application down to the subscription itself.

Layer 1

Application

Telemetry about your own code: requests, errors, dependencies, custom events and traces. Collected through Application Insights.

Layer 2

Guest operating system

Information from inside a machine, such as memory, disks, processes and system logs. Collected by an agent.

Layer 3

Azure resources

Platform metrics and resource logs from services such as databases, storage and networking.

Layer 4

Subscription

The activity log, which records management actions such as creating or deleting a resource.

Layer 5

Tenant

Identity-level information such as sign-in records from Microsoft Entra ID.

Layer 6

Custom sources

Anything else, sent through public interfaces: on-premises devices, other clouds, business events and more.

flowchart TD
    A["Application code"] --> AM["Azure Monitor"]
    B["Guest operating system"] --> AM
    C["Azure resources"] --> AM
    D["Azure subscription"] --> AM
    E["Azure tenant"] --> AM
    F["Custom and external sources"] --> AM
        
FIG 2 — The layers of an environment that feed Azure Monitor
Simple Analogy

It is like inspecting a building. You look at the whole property record, then the structure, then each room, then the furniture, and finally how people use it. Each level reveals problems the others cannot see.

Platform data comes free, resource detail is opt-in

Two kinds of information appear without effort. Platform metrics show basic health for every Azure resource, and the activity log records who did what at the subscription level. Resource logs, which hold the detailed events inside a service, are not collected unless you create a setting to send them somewhere. Many newcomers wonder why a chart is empty, and the answer is often that this setting has not been created.

!
Common Mistake

Assuming that creating a resource means its detailed logs are being kept. Without a diagnostic setting, those logs are discarded, and you discover this only when you need them most, during an incident.

5Metrics and Metrics Explorer

Metrics are the quick pulse of your system, and they are the foundation of most alerts and charts.

What a metric is

A metric is a number recorded at regular intervals, together with a timestamp. Examples include the percentage of processor in use, the number of requests handled per minute, or the amount of free disk space. Because metrics are small and structured, they are stored in a database built for time-series data, which makes queries very fast and lets charts update almost in real time.

Dimensions

Many metrics carry dimensions, which are extra labels that let you slice the data. A request count might have a dimension for the response status, so you can see successes and failures separately, or a dimension for the server instance, so you can spot one unhealthy machine among many. Dimensions turn one metric into many views without storing separate metrics.

Simple Analogy

A metric is like a school’s total attendance count. Dimensions let you ask for attendance by class, by grade or by day of the week, without needing a separate count for each question.

Aggregation

Raw metric values are combined over time periods using aggregations such as average, minimum, maximum, sum and count. Choosing the right one matters. An average processor use of forty percent might hide short spikes to one hundred percent, while the maximum would reveal them. For counts, the sum over a period is usually what you want.

Metrics Explorer

Metrics Explorer is the tool for charting metrics. You choose a resource, pick a metric, select an aggregation, add filters or splits by dimension, and the chart appears. You can place several metrics on the same chart, compare resources side by side, and pin the result to a dashboard. For many everyday questions, this is the fastest route to an answer.

Fast
Near real-time values, ideal for live health
Light
Compact numeric data, cheap to keep
Sliceable
Dimensions split one metric many ways

Retention and Prometheus metrics

Platform metrics are kept for a limited period, roughly three months, which is enough for most operational use. For longer history, you can send metrics to a Log Analytics workspace or a storage account. Teams that run containers often use Prometheus, a popular open-source metrics format. Azure Monitor offers a managed service for Prometheus metrics, so you can keep that familiar approach without running the storage yourself.

i
Practical Tip

When a chart looks calm but users complain, change the aggregation from average to maximum or to a high percentile. Averages are famous for hiding the unlucky few requests that suffer.

6Logs and Log Analytics Workspaces

Logs hold the rich, detailed story of what happened, and the Log Analytics workspace is the home where most of them live.

What a workspace is

A Log Analytics workspace is a container for log data, with its own settings for retention, access and cost. Inside, data is arranged in tables, each with a defined set of columns. There are tables for virtual machine performance, for web requests, for security events, for resource activity and many more. All the tables in a workspace can be searched together, which allows questions that cross many sources.

Simple Analogy

A workspace is like a large filing room. Each table is a labelled drawer, each row is a document, and a clever clerk can search every drawer at once to find all the documents that mention one customer.

Table plans

Not all log data deserves the same treatment. Azure Monitor lets you choose a plan per table, balancing cost against capability.

PlanBest ForTrade-off
AnalyticsData used daily for alerts, dashboards and investigationHighest ingestion cost, full query capability
BasicHigh-volume, lower-value logs searched occasionallyLower cost, limited query features
AuxiliaryVery large volumes kept for compliance or rare investigationsLowest cost, most limited use

Retention and archive

Each table keeps data for a chosen number of days. After that period, data can be deleted or moved to a low-cost archive state, where it stays available for longer-term needs and can be restored or searched on demand. Setting retention per table, instead of one value for the whole workspace, avoids paying premium prices to keep unimportant data for years.

Many sources, one place

Because so many kinds of data land in the same workspace, you can ask joined-up questions. For example, you can match an increase in web errors with a spike in database timeouts and a deployment that happened shortly before. That cross-checking is the heart of effective troubleshooting, and it is hard to do when each tool keeps its own separate store.

!
Common Mistake

Keeping every table on the most expensive plan with long retention by default. Review which tables are really used for daily work, and move noisy, rarely queried data to cheaper plans.

7Asking Questions with Kusto Query Language

Kusto Query Language, usually shortened to KQL, is how you ask a workspace questions, and its logic is easier than it looks.

The pipe idea

A KQL question reads like a sentence with steps. You begin by naming a table, then pass the rows through a series of steps joined by a pipe symbol. Each step takes the result of the previous one and refines it. You might filter to a time range, keep only error rows, count them by server, sort the result and show the top five. Because the steps read in order, even a long question stays understandable.

Simple Analogy

KQL works like an assembly line of sieves. A pile of documents enters the first sieve, which keeps only this week’s papers. The next keeps only error reports. The next counts them by department. What arrives at the end is a small, neat answer.

Common kinds of steps

Step

Filter

Keep only rows that match a condition, such as a time range or an error level.

Step

Summarize

Group rows and calculate totals, averages or counts, like errors per hour.

Step

Project

Choose or create the columns you want to see, hiding the rest.

Step

Join

Combine rows from two tables using a shared value, such as a request identifier.

Step

Sort and limit

Order results and keep only the top few, such as the slowest ten requests.

Step

Render

Turn results into a chart, such as a line over time or a bar by category.

Where queries are used

Queries are not only for exploration. The same question you write while investigating can be saved, pinned to a workbook or dashboard, or turned into an alert rule that runs on a schedule. This reuse is powerful: a manual investigation that you repeat often becomes automatic monitoring.

Writing efficient queries

Queries scan data, so narrower questions are faster and cheaper. Always limit the time range first, since the time filter is the most efficient way to skip data. Filter early, before heavy steps such as joins, and keep only the columns you need. A habit of starting narrow and widening only if necessary keeps both the query time and the load on the workspace low.

i
Learning Path

Start by reading queries that others have saved, then change one step at a time to see what happens. Learning KQL by modifying working examples is faster than studying it from a blank page.

8Diagnostic Settings and the Activity Log

Diagnostic settings decide where the detailed output of an Azure resource goes, and the activity log records who did what to your subscription.

Diagnostic settings

A diagnostic setting is a small configuration attached to a resource. It says which categories of logs and metrics to export, and where to send them. One setting can send data to several destinations at once, which is useful when different teams need the same data for different reasons.

Destination

Log Analytics workspace

For interactive search, alerts, workbooks and cross-resource analysis.

Destination

Storage account

Low-cost long-term retention for audit and compliance, with no query capability built in.

Destination

Event Hubs

A streaming pipeline to send data to external tools such as security systems or third-party monitoring platforms.

Destination

Partner solutions

Direct integration with certain partner monitoring products without building your own transfer.

Simple Analogy

A diagnostic setting is like the instruction card pinned to a photocopier: copy this page to the working folder, this one to the archive cabinet, and this one to the mailroom for the other office.

Enforcing settings with policy

In a large organization, people forget to create diagnostic settings, and the missing logs are noticed too late. Azure Policy can solve this by automatically deploying a setting to every new resource of a given type, or by flagging resources that lack one. This turns logging from an individual habit into an organizational guarantee.

The activity log

The activity log is a record of management actions at the subscription level. It answers questions like who deleted this virtual machine, when was this setting changed and which deployment failed. It is collected automatically and kept for a limited period, so for longer retention or alerting you send it to a workspace. It is one of the most useful sources for connecting a problem to a human or automated change.

i
Audit Helper

When something suddenly breaks, check the activity log first. Many incidents trace back to a configuration change made shortly before the symptoms began.

9Azure Monitor Agent and Data Collection Rules

To see inside a machine, you need a small program running on it, and a rule that says what it should collect.

The agent

Azure Monitor Agent is software installed on virtual machines and servers, in Azure or elsewhere. It collects performance counters, system logs and other data from inside the operating system and sends it to Azure Monitor. It replaces older agents that had overlapping jobs, so new work should use it. Machines outside Azure can be connected through Azure Arc, which brings them under the same management.

Data collection rules

A data collection rule, usually shortened to DCR, defines what to collect, optionally how to transform it, and where to send it. The agent is simply the carrier, and the rule is the instruction sheet. Many machines can share one rule, so a single change updates the behavior of hundreds of machines. A machine can also follow several rules at once.

flowchart LR
    VM1["Virtual machine 1 with agent"] --> DCR["Data collection rule"]
    VM2["Virtual machine 2 with agent"] --> DCR
    VM3["On-premises server with agent via Arc"] --> DCR
    DCR --> TF["Optional transformation: filter and shape"]
    TF --> WS["Log Analytics workspace"]
    TF --> MT["Metrics store"]
        
FIG 3 — Agents following a shared data collection rule
Simple Analogy

The agent is a courier, and the data collection rule is the delivery order that says which parcels to pick up, whether to remove the packaging first, and which warehouse to deliver them to.

Transformations save money

One of the most valuable features of a data collection rule is the ability to transform data before it is stored. You can drop rows you will never use, remove columns that are too large, or split data into different tables. Because cost depends on how much data is ingested, filtering unneeded data at this point reduces the bill directly, without losing the information that matters.

Data collection endpoints and custom data

For custom sources, such as an application that sends its own business events or a device that is not a standard server, Azure Monitor offers a public interface for ingesting logs. Data sent this way still follows a data collection rule, so you keep the same control over structure, filtering and destination. Where a network must be private, data collection endpoints give a defined, controlled entry point.

!
Common Mistake

Collecting every available performance counter and every system event from every machine. Start with a focused set that supports your alerts and troubleshooting, and add more only when a real question demands it.

10Application Insights and Distributed Tracing

Application Insights watches your application code itself, telling you how real users experience it.

What it is

Application Insights is the application performance monitoring part of Azure Monitor. It collects information about requests coming into your application, calls your application makes to other services, errors and exceptions, page loads in the browser, and custom events that you define. It works with many languages and frameworks, and it stores its data in a Log Analytics workspace so it can be searched together with infrastructure data.

Simple Analogy

If infrastructure monitoring checks the health of the shop’s building, power and shelves, Application Insights watches the customers: how long they wait at the till, which aisles confuse them and which products fail at checkout.

Key features

Feature

Application map

A diagram of your components and the calls between them, colored by health, so weak links stand out at once.

Feature

Transaction search

Find an individual request and see everything that happened during it, including dependencies and errors.

Feature

Live metrics

A real-time view with only a few seconds of delay, useful while releasing or during an incident.

Feature

Availability tests

Synthetic checks that call your application from several locations on a schedule and alert when it stops answering.

Feature

Smart detection

Automatic notices when behavior drifts from its normal pattern, such as a sudden rise in failures.

Feature

Usage analysis

Shows how people use the application, including popular pages, user flows and retention.

Distributed tracing

In a system built from many services, one user action spawns many internal calls. Distributed tracing links all of them together using a shared identifier that travels with the request. In the trace view, you see the request as a timeline, with each service call shown as a bar. The longest bar shows where the time went, so you stop guessing and look straight at the slow part.

sequenceDiagram
    participant U as User
    participant W as Web front end
    participant O as Orders service
    participant P as Payments service
    participant D as Database
    U->>W: Place order
    W->>O: Create order
    O->>D: Save order
    D-->>O: Saved
    O->>P: Charge card
    P-->>O: Approved
    O-->>W: Order confirmed
    W-->>U: Success page
        
FIG 4 — One user request crossing several services, tied together by a trace

OpenTelemetry and sampling

Microsoft recommends instrumenting applications with OpenTelemetry, an open standard for producing traces, metrics and logs. Using a standard avoids lock-in and lets you send the same data to several tools. Because large applications produce enormous volumes of telemetry, sampling is often used. Sampling keeps a representative fraction of the data, often keeping all failures while thinning out routine successes, which controls cost while preserving the useful signals.

i
Release Safety

Watch the live metrics view during every deployment. Seeing failures rise within seconds of a release lets you roll back before most users are affected.

11Insights: Ready-Made Monitoring for Common Services

For popular resource types, Azure Monitor provides curated experiences that save you from building everything yourself.

What insights are

An insight is a packaged monitoring experience for a particular kind of resource. It bundles the data collection, the dashboards and often the recommended alerts, all tuned for that resource type. Instead of deciding from scratch which counters matter for a virtual machine, you enable the insight and receive a sensible default view.

VM insights

Shows performance trends, running processes and network dependencies between machines, helping you understand both health and how machines connect to each other.

Container insights

Monitors Kubernetes clusters and container workloads, showing node health, pod behavior, resource use and container logs in one place.

Network insights

Gives a topology view of network resources and their health, helping you find connectivity and capacity problems.

Storage, database and other service insights

Many services have their own insight showing the measures that matter for them, such as transaction rates and latency for storage, or query performance for databases.

Managed Prometheus and Managed Grafana

Teams that already use Prometheus for metrics and Grafana for dashboards can keep their familiar tools. Azure Monitor managed service for Prometheus stores and queries Prometheus metrics at scale, and Azure Managed Grafana provides hosted Grafana dashboards integrated with Azure sign-in and data sources. You get the popular open-source experience without running the servers behind it.

Simple Analogy

An insight is like a ready-made meal kit. The recipe, the ingredients and the right portions are chosen for you, so you can start cooking without shopping around, and you can still add your own spices.

i
Start With Defaults

Turn on the relevant insight first and watch it for a few weeks. You will learn what normal looks like, and you can then adjust alerts and collection to your real needs.

12Visualization: Workbooks, Dashboards and Grafana

Data is only useful when the right people can see it in a form they understand.

ToolWhat It IsBest For
Metrics ExplorerInteractive charting of metricsQuick checks and ad hoc comparisons
Log Analytics query viewFree-form queries with results and chartsDeep investigation
WorkbooksRich, interactive reports combining text, metrics, logs and parametersGuided investigation and team reports
Azure dashboardsPinned tiles from many services on one pageAt-a-glance status for a team
Managed GrafanaHosted Grafana dashboardsTeams already skilled in Grafana, multi-source views
Power BIBusiness analytics and reportingSharing data with business audiences

Workbooks

Workbooks are the most flexible built-in reporting tool. A workbook mixes written explanation, parameters such as a time range or a chosen resource, and charts or tables driven by metrics and log queries. Because they are interactive, a workbook can guide a person through an investigation: pick a service at the top and every section below updates. They can be shared with a team and reused across environments.

Simple Analogy

A dashboard is like a car’s instrument panel, giving a fast glance at key numbers. A workbook is like the maintenance manual with built-in diagnostic tools, walking you through finding the cause of a problem.

Designing a dashboard that works

A good dashboard answers a few clear questions. Is the service healthy right now? Are users affected? Is something trending badly? Place the most important signals at the top and keep the page uncluttered. A wall of forty small charts looks impressive but helps nobody. A useful rule is that someone who has never seen the dashboard should be able to tell in ten seconds whether things are fine.

“A dashboard nobody looks at is just decoration, and a dashboard with everything on it tells nobody anything.”
!
Common Mistake

Building dashboards that show internal machine details and no user-facing measures. Customers do not care about processor load; they care about speed and errors. Put user experience at the top.

13Alerts: Knowing When Something Goes Wrong

Alerts turn data into action by notifying people, or triggering automation, when conditions are met.

Anatomy of an alert

An alert rule has four main parts. It has a scope, which says which resources it watches. It has a condition, which says what counts as a problem. It has a severity, which says how serious the problem is. And it has actions, which say who is told or what happens automatically. When the condition is met, the rule creates an alert, which can be tracked and closed like a ticket.

Types of alert rules

Rule Type

Metric alerts

Evaluate a metric against a threshold. Fast and reliable, and can use static or dynamic thresholds.

Rule Type

Log search alerts

Run a saved query on a schedule and alert on the result, such as too many errors in five minutes.

Rule Type

Activity log alerts

Fire on management events, such as a resource being deleted or a service health incident.

Rule Type

Prometheus alerts

Evaluate rules written in the Prometheus style against metrics stored in the managed service.

Rule Type

Smart detection

Automatic alerts from Application Insights when behavior departs from its normal pattern.

Static and dynamic thresholds

A static threshold is a fixed number, such as alert when processor use stays above ninety percent. A dynamic threshold learns the normal pattern of a metric, including daily and weekly rhythms, and alerts when the value departs significantly from it. Dynamic thresholds suit metrics whose normal level changes through the day, such as website traffic, where any fixed number would either miss problems at night or fire constantly at noon.

Simple Analogy

A static threshold is a smoke detector that sounds at one fixed temperature. A dynamic threshold is a thoughtful house sitter who knows your normal routine and notices when something unusual happens, even if no fixed limit was crossed.

Severity levels

Alerts carry a severity from zero, the most serious, to four, the least. A consistent meaning for each level, agreed across the organization, is essential. Critical levels should wake someone up, while informational ones should be reviewed during working hours. If everything is marked critical, then nothing is, and people learn to ignore the pager.

Stateful alerts

Alerts have a lifecycle. For most metric alerts, the alert is fired when the condition becomes true and is resolved automatically when it returns to normal, so you are not flooded with repeated notices for one ongoing problem. Understanding this behavior helps you design rules that signal the start and end of an incident cleanly.

!
Common Mistake

Alerting on causes instead of symptoms, such as every spike in processor use. A busy server that serves users well is healthy. Alert on what users feel, such as slow responses and failures, and use cause-level data to investigate afterwards.

14Action Groups and Taming Alert Noise

An alert that reaches the wrong person, or too many people, is almost as bad as no alert at all.

Action groups

An action group is a reusable list of things that happen when an alert fires. Many alert rules can share one action group, and changing the group updates them all. The actions can notify people and also start automated responses.

Action

Notifications

Email, text message, voice call and push messages to the Azure mobile app.

Action

Webhook

Call an external web address, for example to create an incident in a paging or chat system.

Action

Logic App

Run a workflow that can enrich the alert, open a ticket or post in a team channel.

Action

Azure Function

Run custom code that reacts to the alert, such as restarting a service or collecting extra data.

Action

Automation runbook

Start a prepared script to fix a known problem automatically.

Action

IT service management

Create tickets in a connected service management tool.

Alert processing rules

Alert processing rules sit between the alert and its action group, and let you change what happens without editing every alert rule. You can suppress notifications during planned maintenance, add an action group to every alert from a certain subscription, or limit certain alerts to working hours. This is the clean way to handle planned downtime without disabling alerts and risking that you forget to turn them back on.

flowchart LR
    DATA["Metric or log data"] --> RULE["Alert rule evaluates condition"]
    RULE --> ALERT["Alert fired with severity"]
    ALERT --> APR["Alert processing rule: suppress, add or route"]
    APR --> AG["Action group"]
    AG --> N1["Notify on-call person"]
    AG --> N2["Create incident ticket"]
    AG --> N3["Run automated runbook"]
        
FIG 5 — The journey from data to alert to action
Simple Analogy

An alert rule is a fire detector, an action group is the list of people and fire engines to call, and a processing rule is the switch that says do not call the engines this afternoon, because we are testing the alarms.

Fighting alert fatigue

Alert fatigue happens when people receive so many notices that they stop reading them. It is dangerous because real emergencies hide among the noise. The remedies are simple. Alert only on conditions that need human action. Remove alerts nobody acts on. Use dynamic thresholds for variable metrics. Group related alerts. Review alert history regularly and ask of each one: did this lead to action?

i
Actionable Test

For every alert, write down what the person who receives it should do. If you cannot write a clear answer, the alert is probably noise, or it needs a runbook that explains the response.

15Autoscale: Letting Metrics Drive Capacity

Autoscale uses monitoring data to add or remove capacity automatically, matching resources to demand.

The idea

Demand for most applications changes through the day and the week. Running enough servers for the busiest hour all the time wastes money, while running too few causes slowness at peak. Autoscale watches metrics, such as processor use or queue length, and adds instances when demand rises and removes them when it falls. It is supported by many Azure services, including virtual machine scale sets and web hosting plans.

Simple Analogy

Autoscale is like a supermarket opening more checkout lanes when the queues grow long, and closing them when the store empties. Customers are served promptly, and staff are not paid to stand idle.

Scale rules

1

Set limits

Choose a minimum number of instances to guarantee availability and a maximum to protect your budget.

2

Define a scale-out rule

For example, add instances when average load stays high for several minutes.

3

Define a scale-in rule

Remove instances when load stays low, with a safe margin so the system does not swing back and forth.

4

Add a cooldown

Wait a few minutes after any change so new instances have time to start and the metrics settle before the next decision.

Schedules and predictive scaling

Rules react to what has already happened. When demand is predictable, such as a sale starting at nine in the morning, a scheduled profile can add capacity beforehand. For some services, predictive autoscale studies past patterns and prepares capacity ahead of expected load. Combining scheduled and reactive rules gives both readiness and flexibility.

!
Common Mistake

Scaling out and in at nearly the same threshold. The system keeps adding and removing instances in a restless loop, which is called flapping. Leave a clear gap between the two thresholds and use a cooldown.

16Workspace Design and Access Control

How you arrange workspaces and permissions shapes cost, convenience and security for years.

How many workspaces?

There is no single right answer, but there is a useful default. Fewer workspaces make it easier to search across everything and simplify management. More workspaces give clearer separation of cost, access and data location. Most organizations land somewhere between a single central workspace and one workspace per team.

Fewer, centralized workspaces

  • Easy to correlate data across the whole estate
  • Less administration and fewer settings to maintain
  • Better volume discounts through commitment tiers
  • Simple security investigations across teams

Many, separated workspaces

  • Clear cost charge-back to each team
  • Strong isolation for sensitive data
  • Data can stay inside required regions
  • Cross-workspace searches become more complicated

Reasons to separate

Common reasons to create separate workspaces include regulations requiring data to stay in a particular region, strict separation between production and non-production, different retention needs, or a business unit that insists on managing its own costs and access. Without such a reason, extra workspaces mostly add overhead.

Access control

Azure Monitor uses role-based access control. Built-in roles such as Monitoring Reader give read-only access to monitoring data, Monitoring Contributor allows changes to monitoring settings, and Log Analytics Reader and Contributor control workspace access. Workspaces support two access styles. In workspace-context, a person sees all data in the workspace they are allowed into. In resource-context, a person sees only the logs for the resources they already have rights to, which lets application teams query their own data in a shared workspace without seeing everyone else’s.

Simple Analogy

Workspace-context is like giving someone a key to the whole filing room. Resource-context is like handing them only the folders about their own project, even though all the folders sit in the same room.

i
Practical Tip

Prefer resource-context access in shared workspaces. It lets you centralize storage for easy management while still honoring each team’s boundaries.

17Security, Networking and Compliance

Monitoring data often contains sensitive information, so it deserves the same protection as the systems it describes.

What could go wrong

Logs can accidentally contain personal details, passwords, tokens or internal addresses, especially when applications print too much information. A workspace that is broadly readable could expose all of it. Equally, monitoring is a security tool in its own right, because the logs show suspicious sign-ins, strange changes and attacks in progress.

Control

Least-privilege roles

Give each person only the monitoring access they need, and prefer read-only roles for most people.

Control

Private networking

Use private links so that monitoring traffic stays on your private network instead of crossing the public internet.

Control

Managed identities

Let agents and automation sign in using identities managed by Azure, avoiding stored passwords.

Control

Data scrubbing

Use transformations and application settings to remove or mask sensitive values before they are stored.

Control

Encryption

Data is encrypted at rest and in transit, and customer-managed keys are available for stricter requirements.

Control

Auditing

The activity log records who changed monitoring settings, supporting reviews and investigations.

Private connectivity

Organizations with strict network rules can create an Azure Monitor Private Link Scope. This lets virtual networks reach Azure Monitor over private addresses and, if desired, blocks access over the public internet. Data collection endpoints give agents a defined private entry point. Plan these early, because changing network arrangements later is harder.

Monitoring as a security tool

Security teams rely on logs to detect threats. Azure Monitor data, such as sign-in records and resource activity, can feed security analysis tools, and diagnostic settings can stream it to them. Good monitoring therefore serves two audiences with one set of data: operations teams looking for reliability problems and security teams hunting for attacks.

ANTI-PATTERN-01 Avoid
Problem

Applications write full request details, including personal information and access tokens, into logs, and the workspace is readable by a very large group.

Why It’s Harmful

A log reader can see data they should never have seen, and a single leaked token in logs can give an attacker access to real systems. Log data is also hard to delete once spread across tables and archives.

Correct Approach

Log only what is needed, mask sensitive values at the source and in transformations, use resource-context access, and review logs periodically for accidental secrets.

18Managing and Reducing Cost

Monitoring is essential, but a careless setup can quietly become one of the largest items on a cloud bill.

What drives cost

Most of the cost of Azure Monitor comes from the volume of log data ingested into workspaces, followed by how long it is retained, and then by charges for alert rules and certain features. Metrics from Azure resources are generally cheap or free, while detailed logs are where money is spent. Application telemetry can also grow very large in busy systems.

Ingest
How much data you send in
Retain
How long you keep it searchable
Query
Extra charges for some plans and archive access

Practical ways to save

1

Find the big spenders

Use the workspace usage views to see which tables and resources produce the most data. A few noisy sources usually account for most of the bill.

2

Filter at the source

Use data collection rules to drop low-value rows and trim large columns before they are stored.

3

Choose cheaper plans

Move high-volume, rarely queried tables to Basic or Auxiliary plans.

4

Right-size retention

Keep only what you need for daily work in interactive retention and move older data to archive.

5

Use commitment tiers

When daily volume is steady and high, a commitment tier gives a lower effective price than pay-as-you-go.

6

Sample application data

Keep all errors but only a fraction of routine successful requests.

Simple Analogy

Log cost behaves like warehouse rent. The more boxes you bring in and the longer you keep them, the more you pay. Throwing away junk at the door and moving old but necessary boxes to cheap long-term storage keeps the bill sensible.

Daily caps

A workspace can have a daily data cap that stops ingestion once reached. This protects against surprise bills, but it has a dark side: when the cap is hit, new data is lost, which can leave you blind during exactly the kind of event that creates log floods. Most teams prefer alerts on unusual ingestion volume over a hard cap on important workspaces.

!
Common Mistake

Setting a hard daily cap on a production workspace and forgetting about it. During an outage, logs surge, the cap is reached, and the very data you need to investigate stops arriving.

19Designing a Monitoring Strategy

Tools are only half the story; the other half is deciding what really matters and how to react.

Start from the user

Good monitoring begins with the question of what the user experiences. Define a few service level indicators, which are measurable aspects of user experience such as the share of requests that succeed or the time to respond. Then agree on service level objectives, which are targets for those indicators, such as ninety-nine point nine percent of requests succeeding over a month. These targets drive what you alert on and how much risk you accept.

The golden signals

A widely used checklist for any service is the four golden signals.

Signal 1

Latency

How long requests take, looking at slow ones separately from fast ones.

Signal 2

Traffic

How much demand the service is receiving, such as requests per second.

Signal 3

Errors

The rate of requests that fail, whether openly or quietly.

Signal 4

Saturation

How full the service is, such as memory, disk or connection limits approaching their ceiling.

Simple Analogy

Think of a restaurant. Latency is how long a guest waits for food, traffic is how many guests arrive, errors are wrong or refused orders, and saturation is how full the kitchen and tables are getting.

Layers of monitoring

Effective monitoring watches several layers at once and connects them. At the top is the user experience, measured by synthetic tests and real-user data. Below that is the application, with requests, dependencies and errors. Below that is the infrastructure, with machines, containers and networks. Below that is the platform and subscription, with service health and changes. When an alert fires at the top, you drill down through the layers to find the cause.

flowchart TD
    L1["Layer 1: User experience and availability tests"] --> L2["Layer 2: Application requests, dependencies, errors"]
    L2 --> L3["Layer 3: Infrastructure: VMs, containers, network"]
    L3 --> L4["Layer 4: Platform: service health, activity log, changes"]
        
FIG 6 — Monitoring layers from the user down to the platform

Plan for incidents, not just alerts

An alert is only the start. Decide who is on call, how they escalate, where they discuss the incident and where they find a guide for common problems. After each serious incident, hold a blameless review to learn what monitoring would have shown the problem sooner, and improve it. A monitoring system that learns from every incident becomes steadily more useful.

i
Test Your Monitoring

Occasionally break something on purpose in a test environment and check whether your alerts fire, reach the right person and contain enough information. Untested alerts are only hopes.

20Integration with DevOps and Incident Management

Monitoring becomes far more powerful when it is connected to how you build, release and respond.

Monitoring in the release process

Delivery pipelines can use monitoring data as a safety net. A deployment can be marked in your telemetry as an annotation, so every chart shows exactly when a release happened. An environment check in Azure Pipelines can query Azure Monitor alerts and refuse to proceed if there are active alerts, so a new release does not pile onto an existing problem. During a gradual rollout, health measures decide whether to widen it or roll back.

Connecting to work and communication tools

Action groups can create work items, open tickets and post to team chat. This ensures that a problem becomes a tracked piece of work with an owner, rather than a message that scrolls away. Linking alerts to the runbooks or documents that explain the response shortens the time to recovery, especially for people who are new on call.

1

Release is marked

The pipeline records the deployment, so charts show a clear marker at the release time.

2

Health is watched

Error rates and latency are compared against the previous version as traffic shifts gradually.

3

Problems trigger action

If an alert fires, the action group notifies the team, opens a ticket and may start a rollback.

4

Lessons feed back

The review of the incident leads to better alerts, better tests and better runbooks.

Simple Analogy

This is like a pilot and air traffic control working together. The plane reports its status constantly, control watches for trouble, and if something goes wrong, a prepared procedure starts straight away and the review afterward improves the next flight.

Service health and resource health

Not every problem is yours. Azure Service Health tells you when Microsoft has an incident, planned maintenance or advisory affecting your services, and Resource Health tells you whether a specific resource is healthy from the platform’s point of view. Alerts on these save time, because they quickly separate a problem in your application from a problem in the underlying service.

i
Faster Triage

Include a link to the right dashboard or workbook in every alert notification. Saving the responder a few minutes of searching, repeated across many incidents, adds up to a large improvement.

21Design Patterns and Anti-Patterns

Teams that monitor well repeat certain habits and avoid certain traps.

Patterns worth adopting

Central workspace with resource-context access

One shared workspace holds the logs, and each team sees only the data for resources they own. Management stays simple and boundaries are respected.

Policy-driven diagnostic settings

Azure Policy automatically creates diagnostic settings for new resources, so logging is never forgotten and new resources are monitored from their first day.

Symptom-based alerting with cause-based dashboards

Alerts fire on user-visible problems such as failures and slowness, while dashboards and workbooks hold the cause-level details used for investigation.

Monitoring as code

Alert rules, action groups, data collection rules and workbooks are defined in templates stored in version control, so environments are consistent and changes are reviewed.

Tiered log plans

Critical operational data goes to the full-featured plan, while noisy, rarely searched data goes to cheaper plans or archive.

Traps to avoid

ANTI-PATTERN-02 Avoid
Problem

Hundreds of alerts exist for every low-level condition, most of them marked critical and sent to the same group of people.

Why It’s Harmful

People are flooded with notices, learn to ignore them and miss the one that matters. Nights are interrupted for problems that need no action.

Correct Approach

Keep alerts few, actionable and mapped to user impact. Use severity levels consistently, review noisy alerts regularly and remove those that never lead to action.

ANTI-PATTERN-03 Avoid
Problem

Monitoring is added only after a major outage, built by hand through the portal, and differs between every environment.

Why It’s Harmful

Gaps are discovered during incidents, setups cannot be reproduced and nobody knows which alerts exist in which environment.

Correct Approach

Treat monitoring as part of the design from the start, define it in code, and deploy the same definitions to every environment.

ANTI-PATTERN-04 Avoid
Problem

Every available log category from every resource is collected, kept at full price for a long time, and rarely looked at.

Why It’s Harmful

The bill grows quickly, useful signals are buried in noise and queries become slower and more expensive.

Correct Approach

Tie each data source to a specific question, filter at collection, use tiered plans and review usage monthly.

22Best Practices and Real-World Scenarios

A short checklist, followed by examples of the ideas working together.

Best practices

  • Define user-focused indicators and targets before building alerts
  • Use Azure Policy to enforce diagnostic settings everywhere
  • Filter and shape data with data collection rules
  • Use dynamic thresholds for metrics with daily rhythms
  • Link every alert to a dashboard or response guide
  • Define monitoring in code and review changes

Common mistakes

  • Assuming logs are collected without a diagnostic setting
  • Alerting on every cause instead of on user symptoms
  • Hard daily caps on important production workspaces
  • Letting sensitive values leak into logs
  • Never reviewing unused alerts, tables or dashboards
  • Watching averages only and missing the unlucky users

Real-world scenarios

An online retailer facing sudden traffic

During a flash sale, the retailer’s autoscale rules add web instances as traffic climbs, while an alert on response time at a high percentile warns the team if customers start to wait. After the sale, scheduled scale-in returns costs to normal.

A bank investigating a mysterious slowdown

Customers report slow payments. The team opens the application map, sees the payment service turning red, follows a trace to a slow database call, and finds in the activity log that a database setting was changed an hour earlier. Reverting it fixes the slowdown within minutes.

A software company controlling a growing bill

A company notices its monitoring cost doubling. Usage views reveal two verbose tables causing most of the volume. A data collection rule filters out routine rows, the tables move to a cheaper plan, and the bill falls sharply without losing any useful alerts.

flowchart TD
    S["Symptom: customers report slow payments"] --> A1["Check alert and dashboard: response time high"]
    A1 --> A2["Open application map: payments service unhealthy"]
    A2 --> A3["Open trace: slow call to database"]
    A3 --> A4["Query logs: timeouts began at 10:05"]
    A4 --> A5["Check activity log: setting changed at 10:00"]
    A5 --> FIX["Revert change and confirm recovery"]
        
FIG 7 — A typical investigation moving from symptom to cause using several data types

23Frequently Asked Questions

Q1Is Azure Monitor only for resources running in Azure?

No. It can also collect from servers in other clouds and on-premises through agents connected with Azure Arc, and it accepts custom data through public interfaces, so one platform can watch a mixed environment.

Q2What is the difference between metrics and logs?

Metrics are lightweight numbers recorded over time, ideal for quick health checks and alerts. Logs are detailed event records, ideal for investigating why something happened. Most real investigations use both.

Q3Why can I not see logs for my new resource?

Detailed resource logs are not stored unless you create a diagnostic setting that sends them to a destination such as a workspace. Platform metrics and the activity log appear automatically, but resource logs need that setting.

Q4Do I need Application Insights if I already monitor my virtual machines?

Usually yes. Machine monitoring shows whether the infrastructure is healthy, while Application Insights shows how the application behaves for real users, including slow requests, failing dependencies and exceptions.

Q5What is a data collection rule?

It is a configuration that defines which data an agent or interface collects, how it may be filtered or reshaped, and where it is sent. Many machines can share one rule, which makes changes easy to roll out.

Q6When should I use a dynamic threshold instead of a static one?

Use dynamic thresholds for metrics whose normal level changes with time, such as web traffic that varies by hour. Use static thresholds for hard limits that should never be crossed, such as a disk being almost full.

Q7How can I reduce the cost of Azure Monitor?

Find the tables and resources that ingest the most data, filter unneeded rows with data collection rules, move rarely used tables to cheaper plans, shorten interactive retention, use commitment tiers for steady high volumes and sample application telemetry.

Q8Should I use one workspace or many?

Start with as few as your requirements allow. Separate only for data-location rules, strong isolation needs, different retention policies or independent cost responsibility. Resource-context access often removes the need for separate workspaces.

Q9How do I stop alerts during planned maintenance?

Use an alert processing rule that suppresses notifications for the maintenance window. This is safer than disabling alert rules, because the rules automatically resume without anyone having to remember to switch them back on.

Q10Can Azure Monitor work with tools I already use, such as Grafana or a paging system?

Yes. Managed Grafana connects directly to Azure Monitor data, and action groups can call webhooks and connect to service management tools, while streaming through Event Hubs reaches many external platforms.

Q11Is it safe to keep sensitive logs in a workspace?

It can be, if you apply least-privilege access, private networking, encryption and careful data scrubbing. The best protection is to avoid logging sensitive values in the first place.

24Summary and Key Takeaways

Azure Monitor gathers metrics, logs, traces and change records from applications, machines, containers and Azure services into one platform. Agents and data collection rules bring data in, diagnostic settings export what resources produce, and Application Insights shows how real users experience your software. Workspaces, workbooks and dashboards make the data understandable, while alerts, action groups and autoscale turn it into action. The best results come from good design rather than more data: start from user experience, alert on symptoms, protect sensitive information, control cost with filtering and tiered plans, and keep improving after every incident.

Key Takeaways

  • Four kinds of telemetry — use metrics for fast health, logs for detail, traces for request paths and change records for causes.
  • Collection is deliberate — platform metrics and the activity log are automatic, but resource logs need diagnostic settings and machines need agents with data collection rules.
  • Filter before you store — transformations in data collection rules cut cost while keeping the data that answers real questions.
  • See the user’s view — Application Insights, availability tests and distributed tracing reveal what customers actually experience.
  • Alert on symptoms — use clear severities, dynamic thresholds, shared action groups and processing rules to fight alert fatigue.
  • Design workspaces and access carefully — prefer few workspaces with resource-context access, private networking and least-privilege roles.
  • Treat monitoring as a living system — define it as code, connect it to releases and incident response, and improve it after every incident.