Domain 5 of 5 · Chapter 1 of 2

Monitor resources in Azure

How Azure Monitor collects and stores data

Suppose a VM's CPU chart spikes at 02:00, and you want to see the spike, find out who resized the VM the day before, and read the VM's Windows events from that time. Those are three kinds of monitoring data, collected in different ways: Azure Monitor automatically collects host metrics and activity logs from Azure virtual machines, but guest log data typically isn't collected by default[1]. Most monitoring decisions start by asking which kind you need.

The Microsoft AZ-104 study guide skills measured[2] lists Azure Monitor metrics, logs, alerts and Insights, and "Use Azure Network Watcher and Connection Monitor", under Monitor resources in Azure. This topic runs from data collection through KQL and alerts to Insights and Network Watcher, where IP flow verify detects traffic filtering issues and Next hop detects routing issues[3]. Those tools diagnose security rules and routes; configuring them belongs to other outline skills, such as "Create and configure network security groups (NSGs) and application security groups" under Configure secure access to virtual networks. An NSG contains security rules that allow or deny traffic[4]; see Configure secure access to virtual networks. Custom routes can override some Azure system routes[5]; see Configure and manage virtual networks in Azure. Backup reports use Azure Monitor logs and workbooks[6], and Azure Backup raises built-in alerts for scenarios such as backup and restore failures[7]; see Implement backup and recovery.

Metrics and logs

A second kind of workspace exists for metrics: an Azure Monitor workspace stores Prometheus and OpenTelemetry metrics, which you chart with Prometheus query language (PromQL) instead of KQL[10]. The two workspace types are different resources.

What arrives on its own, and what you configure

In the table, a diagnostic setting routes platform logs and metrics to destinations (see 'Diagnostic settings'), and Azure Monitor Agent collects guest data as a data collection rule specifies (see 'Azure Monitor Agent and data collection rules').

Data How it is collected Kept
Platform metrics (CPU, transactions, latency, among others) Automatically, with no configuration Most for 93 days
Activity log (management operations on resources) Automatically, with no configuration 90 days
Resource logs (operations inside a resource) Only after you create a diagnostic setting As configured at the destination
Guest data (metrics and logs from inside a VM's operating system) By deploying Azure Monitor Agent with a data collection rule As configured at the destination

The diagnostic settings documentation[9] states the collection behavior in the first three rows. Most metrics are stored for 93 days[10], and Azure retains activity log events for 90 days and then deletes them[11]; they reach a workspace's AzureActivity table only when exported with a diagnostic setting (see 'Activity log and resource logs'). For guest data, you must configure guest logs before Azure Monitor can collect them, and ingestion and storage charges apply[12].

The takeaway: decide whether the answer lives in a metric or a log, then check whether that data arrives automatically or exists only after you configure a diagnostic setting or a data collection rule.

Metric aggregation, time grain and missing values

A metric chart never shows raw measurements: it shows one aggregated value per time interval, so the aggregation and the interval you pick decide what the chart can reveal.

Time grain

The time grain (time granularity) is the period whose measurements are combined into one point on the chart. Its current minimum is one minute, and if you don't pick a grain, it is selected automatically based on the selected time range[8]. A 24-hour chart at a 30-minute grain draws 48 points; at a 1-minute grain it draws 1,440. The grain is independent of the overall time range, but with Automatic grain a longer range produces a coarser grain, and zooming with the time brush selects a smaller granularity[10]. Stretching the time range to look for short CPU peaks therefore tends to hide them.

Aggregation types

Aggregation What it computes for each interval
Sum (also called Total) The sum of all values captured
Count The number of measurements, ignoring their values
Average The mean, which for most metrics is Sum divided by Count
Min The smallest value captured
Max The largest value captured

The aggregation reference[8] defines all five. Two consequences follow:

Not every metric offers every aggregation: the metric definition decides. In the Blob Storage metric reference, for example, Success E2E Latency supports Average, Minimum and Maximum, while Transactions supports Total (Sum)[13].

A missing value is not a zero

When the system expects metric data from a resource but doesn't receive it, it records a NULL value, and NULL values aren't counted as valid measurements[8]. On a line chart a NULL can appear as a dotted or dashed segment, and an average over an interval with NULLs uses fewer data points. For platform metrics, each resource provider decides whether an inactive metric reports zero or NULL, and alerts evaluate whatever values the provider actually writes. A dashed segment therefore means "no data reported", not "zero load": check whether the resource was reporting before reading a drop as reduced utilization.

In short, the chart answers the question its aggregation and grain ask: total or typical, sustained or momentary, and measured or simply absent.

Metrics explorer: scope, history and dimensions

Metrics explorer is the Azure portal tool for charting metrics. Three of its rules decide whether a chart can answer a question at all: how far back it can look, which resources it can combine, and how it breaks one metric into parts.

History: 93 days kept, 30 days per chart

Most metrics are stored for 93 days, you can query up to 30 days of data on any single chart, and you can pan the chart to view the full retention[10]. The 30-day window is a per-chart query limit, not a retention setting: a longer time range neither keeps data longer nor bypasses the limit. To analyze a metric over a longer period, send platform metrics to a Log Analytics workspace for long-term trending[14] through a diagnostic setting (later section) and set the retention you need on that workspace's table.

Scope: one resource type, one region, one subscription

A chart can cover several resources only when the resources are within the same resource type, location and subscription[10]. The resources may sit in different resource groups, and for compatible resource types you can select a whole subscription or several resource groups. Selecting VMs through a management group does not lift these limits, because a management group can span subscriptions and regions. To visualize metrics across multiple resources, resource groups or a subscription, you need Monitoring Reader permission at the subscription level[10].

The same page advises against mixing units on one chart: avoid putting a millisecond metric next to a kilobyte metric, or metrics whose scales differ greatly, and use multiple charts instead so one series does not flatten another.

Dimensions: filter versus split

A dimension is a name/value pair that carries more data to describe the metric value[14]; a disk-space metric might carry a Drive dimension with values C: and D:. Two operations use dimensions:

  • Filtering chooses which dimension values count toward the chart. Filtering the storage Transactions metric on its ResponseType dimension shows only the response category you select.
  • Splitting draws a separate line for each dimension value, so you can compare the contributors, for example one line per API name. The default split limit is 10 values, adjustable from 1 to 50.

Both descriptions come from the Metrics explorer guide[10], and Transactions exposes ResponseType and ApiName dimensions[13]. Both operations need a dimension that the metric actually exposes, and a dimension value that isn't in the result set for the selected time range doesn't appear in the filter values list[10].

A metric namespace is different from a dimension: it is a category for the metric[14], so changing it selects a different family of metrics rather than isolating values inside one metric.

To sum up: keep a chart inside one resource type, region and subscription, at most 30 days wide, and use filters to narrow a metric and splits to compare its parts.

Activity log and resource logs

Azure produces two kinds of platform logs, and they describe operations on opposite sides of a resource, so collecting one never yields the other.

The distinction rests on two planes. The control plane is where you manage a resource through Azure Resource Manager (create it, resize it, change its settings). The data plane is where you use the resource (read a secret, query a database).

The activity log: control-plane operations, collected automatically

The activity log records management operations for your Azure resources, such as creating a virtual machine or changing a key vault access policy[11]. Its properties:

Because these operations happen in Azure Resource Manager, not inside the VM, collecting deployment or management history in the activity log requires no guest monitoring agent. To export the activity log with the Azure CLI, you create a subscription-scope diagnostic setting with az monitor diagnostic-settings subscription create, as the diagnostic settings guide[9] describes.

Resource logs: data-plane operations, collected only on request

Resource logs capture data plane operations performed within a resource, such as getting a secret from a key vault or making a request to a database, and aren't collected by default[11]. To collect them, you must create a diagnostic setting for each Azure resource[16].

The rule to carry forward: the activity log answers who changed the resource and is already there for 90 days; resource logs answer what happened inside the resource and exist only after you configure a diagnostic setting.

Diagnostic settings

A diagnostic setting is the object that collects resource logs and routes platform metrics or the activity log to destinations outside the default stores. It is created on a resource for its logs and metrics, or on the subscription for the activity log ('Activity log and resource logs'). Create a separate diagnostic setting for each resource that you want to collect data from[9]; each setting names the data to collect (log categories, or category groups such as allLogs and audit, plus AllMetrics for platform metrics) and the destinations.

The destinations

Destination Use it for Requirements
Log Analytics workspace Log queries, workbooks and log search alerts Only the workspace must exist; its tables are created when the first data arrives
Storage account Audit, static analysis or backup; data can be kept indefinitely and made immutable Standard accounts only (Premium accounts aren't supported); same region as a regional monitored resource
Event hub Streaming to an external system such as a non-Microsoft SIEM (security information and event management) Same region as a regional monitored resource; not a compacted event hub
Partner solution Integration with a non-Microsoft monitoring platform Varies by partner

Every row comes from the diagnostic settings destination table[9]. An event hub is a stream, not a store you can query: when the requirement is KQL analysis, the destination is a workspace. A compacted event hub is ruled out because compaction needs a partition key on every message and Azure Monitor doesn't include one.

Limits that shape the design

The same page sets these constraints:

  • Five settings per resource, one destination of each type per setting. To send the same logs to two workspaces, create two settings.
  • Destinations must already exist. A workspace is the exception only for its tables, which are created on first data.
  • Location. For regional resources, a storage account or event hub destination must be in the monitored resource's region; a Log Analytics workspace can be in another region.
  • Subscription. A destination can be in another subscription if the person configuring the setting has appropriate Azure RBAC (role-based access control) access to both subscriptions.
  • Firewalls. When a storage account or event hub restricts network access, allow trusted Microsoft services to bypass the firewall so the diagnostic settings service can deliver data. Adding an administrator's IP address does nothing for this service. For storage firewall exceptions, see Microsoft's trusted Azure services guidance[17].
  • Event Hubs permissions. The Event Hubs namespace's authorization rule (also called a shared access policy) defines what the streaming mechanism may do, and streaming requires Manage, Send and Listen. Separately, the person who updates the setting to include streaming needs the ListKey permission on that authorization rule.

When nothing arrives

After you create a diagnostic setting, data should start flowing within 90 minutes; if you get no information within 24 hours, either no logs are being generated or something is wrong in the routing mechanism[9]. Rule out an idle source first: a resource with no activity produces no resource logs.

Cleaning up when a resource changes

Delete any diagnostic settings for a resource if you delete or rename it, or migrate it across resource groups or subscriptions[9]. Otherwise a stale setting can apply to a re-created resource with the same identity and, for some resource types, resume collection with the old destinations and categories.

The takeaway: design within these limits, verify destinations and an active source when nothing arrives, and clean up after a delete, rename or move.

The figure below shows the fan-out these limits allow for the three Azure destination types (not partner solutions): up to five settings per resource, each with at most one workspace, storage account and event hub.

Monitored resourceup to 5 settingsDiagnostic settingLog AnalyticsworkspaceStorageaccountEvent hub(stream)At most one destinationof each type per setting
Diagnostic setting fan-out to three Azure destination types: up to five settings per resource, each with at most one workspace, storage account and event hub

Collection mode and metric export

Two details of a diagnostic setting change what you will find in a Log Analytics workspace afterward: which table resource logs land in, and how faithfully exported metrics match the originals.

Collection mode: one shared table or one table per category

Resource logs sent to a workspace use one of two collection modes[16]:

  • Azure diagnostics mode writes everything to the shared AzureDiagnostics table, whose schema is the superset of every resource type that writes to it. It is the legacy method, used today by a minority of services.
  • Resource-specific mode writes each log category to its own table. Compared with Azure diagnostics mode it makes queries easier, gives better discoverability of schemas, improves ingestion latency and query times, and lets you grant Azure RBAC rights on a specific table.

Most resources use one mode without offering a choice. Where a service does offer the choice, the same page recommends resource-specific mode for any new diagnostic setting. With the Azure CLI, add the export-to-resource-specific parameter with a value of true[9]:

Azure CLI: diagnostic setting for a key vault in resource-specific mode

# Sends the AuditEvent category and AllMetrics to a workspace.
# The storage and event hub destinations from the full example are omitted here.
az monitor diagnostic-settings create \
  --name KeyVault-Diagnostics \
  --resource <key vault resource ID> \
  --logs '[{"category": "AuditEvent","enabled": true}]' \
  --metrics '[{"category": "AllMetrics","enabled": true}]' \
  --workspace <workspace resource ID> \
  --export-to-resource-specific true

Switching an existing setting changes only future data. Data already collected remains in the AzureDiagnostics table until it's removed according to your retention setting, new data is collected in the dedicated table, and you use the union operator to query across both tables[16]. A query rewritten to read only the new table misses the history; a query left on AzureDiagnostics misses everything new.

Exported metrics are not identical to platform metrics

Sending AllMetrics to a workspace produces a copy with three limitations[9]:

  • Not every metric is exportable. Check the Exportable column in the list of supported metrics before relying on an export.
  • Dimensions are flattened. Multidimensional metrics are exported as single-dimensional metrics aggregated across dimension values: a per-node read-bytes metric arrives as one total for all nodes. An exported series is therefore not a per-instance record. When you need the dimensional detail, query the Metrics REST API.
  • Idle resources export with a delay. When a resource is inactive and exporting zero values, export backs off: after one hour of inactivity to 15 minutes, reaching a maximum of two hours after seven days of inactivity, and returning to the normal three-minute export latency once nonzero values resume. The backoff applies only to exported metrics; it doesn't affect metric alerts or autoscale.

The same guidance notes that Azure Monitor collects platform metrics automatically and makes them available in Metrics explorer without a diagnostic setting[9], so skip exporting them unless you need them in the workspace.

The takeaway: prefer resource-specific mode for new settings and union the old and new tables after a switch, and treat exported metrics as a flattened, possibly delayed copy rather than the platform series itself.

Azure Monitor Agent and data collection rules

Guest data, the metrics and logs produced inside a VM's operating system, reaches Azure Monitor through Azure Monitor Agent (AMA), and AMA collects only what a data collection rule tells it to.

What a data collection rule is

A data collection rule (DCR) defines collection (the data sources), processing (optional transformations that filter or modify data) and routing (the destinations)[18]. The same page is explicit that a DCR is control-plane configuration: telemetry doesn't flow through it and nothing is stored in it. The destination, typically a Log Analytics workspace, stores the data and keeps its own retention settings.

A DCR reaches a machine through a data collection rule association (DCRA), and each association connects one resource to one DCR. So:

  • to apply one DCR to many machines, create one association per machine;
  • to apply several DCRs to one machine, create one association per DCR.

Design a DCR around a shared collection requirement, such as an IT baseline for every machine, and layer workload-specific DCRs on only the machines that need them. Because one change to a shared DCR affects every associated machine, identify the resources that use a DCR before you change it[18]. Use transformations, not destination settings, to drop incoming data you don't need: workspace retention controls how long stored data lives, not which events are collected.

Onboarding prerequisites

The guest data collection guide[1] lists what the portal setup needs:

  • Rights: at least contributor rights on the destination Log Analytics workspace, and permissions to create DCR objects.
  • Region: the DCR must be in the same region as any Log Analytics workspace or Azure Monitor workspace it sends to; for workspaces in different regions, create multiple DCRs and associate them with the same machines. Monitored machines can be elsewhere for most data, though the portal warns that some telemetry types require the DCR and the resources to share a region.
  • Identity: AMA on an Azure VM authenticates with a managed identity. When you add a VM to a DCR in the portal, a system-assigned managed identity is enabled by default; if the VM should use an existing user-assigned identity, you must specify it, or the machine falls back to a system-assigned one.
  • Scale: a DCR can have up to 10 data sources, and a VM can use any number of DCRs.

Verifying collection in two steps

When AMA communicates correctly with Azure Monitor, it sends a record to the Heartbeat table every minute[1], so query Heartbeat for the machine first. A heartbeat proves only that the agent talks to Azure Monitor; next query the configured data source's destination table (listed in the next section) to confirm records are arriving.

Moving off retired collectors

AMA replaces two retired collectors. The Log Analytics agent was retired in August 2024[14], and the Azure Diagnostics extension was retired on March 31, 2026[19]. Both were agents on the machine (the extension collects monitoring data from the guest operating system[19]); the Log Analytics workspace isn't retired, and the extension is neither a diagnostic setting nor Azure diagnostics mode. For the Windows and Linux diagnostics extensions (WAD and LAD), the replacement depends on where they sent data:

WAD or LAD destination Replacement
Azure Storage blobs AMA, sending to custom tables, optionally on the low-cost Auxiliary table plan
Azure Event Hubs The Azure Monitor Logs data export capability
Azure Monitor metrics (guest performance counters) An Azure Monitor workspace as the destination for OpenTelemetry performance counters

Remove LAD or WAD after you configure Azure Monitor Agent to avoid duplicate data[19]. Duplicates can also come from two DCRs with the same data source associated with one VM (configure them to filter for unique data) and from a DCR on a VM still running the legacy Log Analytics agent[1]; overlapping collection can increase ingestion charges.

In short: AMA collects only what its associated DCRs specify; verify with Heartbeat, then the source table; remove legacy collectors afterward.

The figure below shows a conceptual onboarding sequence, from identity to verification, not the order the portal follows. It matches installing AMA as a VM extension, a method that doesn't create a DCR, so you must create and associate one[20]. By contrast, when you create a DCR in the Azure portal, the agent installs on any machine added as a resource for the DCR[20], and enabling monitoring in the portal also creates and associates the DCRs (see 'Monitoring virtual machines').

1. Managed identity on VM2. Install AMA VM extension3. DCR: sources, destinations4. DCR association per VM5. Agent gets DCR, sends data6. Check Heartbeat, thenthe source table
Conceptual onboarding with Azure Monitor Agent installed as a VM extension: identity, agent, DCR, association, collection, two-step verification

Guest data sources and their tables

For DCR data sent to a Log Analytics workspace, verifying collection, or finding data that seems missing, means querying the destination table for the source you configured; metrics sent elsewhere must be checked at their configured metrics destination.

Data source Destination table
Windows events Event
Performance counters Perf
Syslog (Linux) Syslog
IIS logs (Windows) W3CIISLog
Text log, JSON log The custom table you configure
OpenTelemetry metrics An Azure Monitor workspace, not a table

The table comes from the guest data collection guide[1]. Note what it excludes: IIS logs collected by AMA land in W3CIISLog, not in AzureDiagnostics (which belongs to resource logs from diagnostic settings), and text and JSON logs go to their own custom tables rather than to Event or Syslog.

Windows events

In the Windows Event Logs data source you select logs and severity levels, and only events at the selected levels are collected. For finer control, select Custom and write an XPath query in the form LogName!XPathQuery: Application!*[System[EventID=1035]] collects only Application log events with event ID 1035. The same page sets the boundaries:

  • Events, including Security log events selected in the DCR, go to the Event table alongside System and Application events. The SecurityEvent table is filled by a separate Microsoft Sentinel connector, so a general Windows event DCR's Security events are found in Event.
  • Collection works only for event log files stored on a local disk; logs on network shares or UNC paths aren't supported.
  • Analytic and Debug channels can't be collected, because Windows doesn't allow subscribing to them.

Performance counters

Enhanced monitoring of a VM, which installs AMA, has a classic logs-based experience that stores guest performance data in a Log Analytics workspace (see 'Monitoring virtual machines'). That experience collects a predefined set of performance counters, and this set can't be modified[21]. To add a counter, create an additional DCR with a Performance Counters data source, choose the counter and its sampling rate (the lower the rate, the more often the value is collected), and send it to a Log Analytics workspace, where it is stored in Perf. The predefined counters are a different stream: the logs-based monitoring DCR sends them through Microsoft-InsightsMetrics[22] to the InsightsMetrics table, so look for your extra counters in Perf, not there.

Syslog

For Linux, a Syslog data source selects facilities and a minimum log level for each facility. Selecting a log level collects that level and the levels with higher severity[23] (this behavior is documented on the Microsoft Sentinel connector page, which configures the same AMA Syslog DCR). Selecting LOG_WARNING therefore collects warning, error, critical, alert and emergency messages for the selected facilities, and the events appear in Syslog.

The working rule: confirm both the source definition (log, channel, facility, level) and the destination table before concluding that collection failed.

Data collection endpoints

A data collection endpoint (DCE) is an Azure resource that provides network endpoints for Azure Monitor Agent: a configuration access endpoint, from which the agent retrieves its DCRs, and logs and metrics ingestion endpoints, which receive data. The DCR still defines what to collect, and the workspace still stores the data; the DCE only supplies the addresses.

When a DCE is required

The DCE overview[24] gives three cases:

  • Private Link. By default AMA retrieves its configuration from a public endpoint, and a DCE is required only when you use Private Link. Because an Azure Monitor Private Link Scope (AMPLS) depends on private DNS zones, any AMA installation on a network that shares DNS with AMPLS resources requires a DCE.
  • Certain data sources. Some AMA data sources require a DCE on their own, specified in the DCR that uses them; other data sources can keep using the public endpoint.
  • Private destinations. If a data source sends to a destination configured for Private Link, the DCE in that DCR must be added to the AMPLS.

Regions

The two endpoint roles follow different regions, according to the same page:

Endpoint Must be in the region of
Configuration access endpoint The monitored resources
Logs ingestion endpoint The destination Log Analytics workspace

When monitored machines and the workspace share a region, one DCE serves both roles. When they don't, create a DCE in each region where agents run, for their configuration, and send data to a DCE in the workspace's region. Placing every DCE only in the workspace region leaves agents elsewhere without a same-region configuration endpoint.

In short, think of a DCE as an address book (an analogy, not Azure terminology): it supplies addresses, not rules or storage, and you add it for Private Link, for data sources that demand it, and in the right region for each of its two roles.

Table plans and retention

Every table in a Log Analytics workspace has a plan, which sets its price and its query and alerting capabilities, and a retention, which sets how long data stays queryable and how long it is kept at all.

Table plans

Plan Example purpose
Analytics Continuous monitoring and latency-sensitive analysis
Basic Troubleshooting and incident response
Auxiliary (shown as Auxiliary / Lake) High-volume, verbose data for long-term, inexpensive storage

The table plan guide[25] describes what changes with each plan:

  • Support varies by table. All tables support Analytics and all DCR-based custom tables support every plan, but support for Basic and Auxiliary varies across Azure tables. Azure tables default to Analytics.
  • Queries cost extra on Basic and Auxiliary. Moving a table from Analytics to either plan adds billing for queries.
  • Auxiliary removes alerting. Moving a table to Auxiliary stops alerts from working for that table, and Auxiliary tables provide unoptimized query performance[26]. Check which alerts and Insights views depend on a table before you downgrade it.
  • Changing plans keeps the data. Data ingested before a change is preserved for its retention period, and plan updates are limited to one switch per table per week.

Retention: analytics, long-term and total

By default, all tables in a workspace retain data for 30 days, except tables with a 90-day default, such as Usage and AzureActivity[27]. The same page defines the periods:

  • Analytics retention is the period in which Analytics tables answer real-time queries. It can be extended up to two years. Basic tables have a fixed 30-day query period.
  • Total retention can be extended up to 12 years. Data past its analytics retention stays in the table as low-cost long-term retention, and you retrieve it with a search job (the mechanism the retention guide names for retrieving data past its analytics retention). Auxiliary data remains queryable throughout its total retention.
  • Workspace default versus table override. Changing the workspace's default retention affects every Analytics table that still uses the default. A table whose retention you set explicitly keeps its own value, so raising the workspace default does not change it.
  • The included 31 days. You can reduce analytics retention to as little as four days, but because 31 days of analytics retention are included in the ingestion price, going below 31 days doesn't reduce costs.

For data you rarely read, combine a short analytics retention with a long total retention and use search jobs for the occasional historical question.

Putting it together: choose the plan by how the data is used (Analytics suits continuous monitoring and performance analysis), then set retention per table, remembering that explicit table settings outrank the workspace default.

The workspace daily cap

A daily cap is a safety stop on a Log Analytics workspace, not a budget control, and treating it as a spending ceiling produces both surprise charges and blind spots.

A daily cap stops collection of billable data for Analytics and Basic tables for the rest of a 24-hour period when the threshold is reached; Auxiliary tables aren't subject to any daily cap[28]. The same page sets its limits:

  • The reset hour is fixed. Collection resumes at a reset time that differs per workspace and can't be configured.
  • It overshoots. The cap can't stop collection at precisely the specified level, the excess can be large when data arrives at high rates, and data collected above the cap is still billed.
  • It blinds you. Once the cap is reached, data collection stops, which affects your ability to monitor resources and receive alerts until the reset.
  • It isn't a filter. Microsoft states that the daily cap should not be the primary way to reduce data before ingestion; use ingestion-time transformations to filter or reshape data.

Use the cap as protection against an unexpected surge. For routine cost control, reduce data at the source (only the log categories and events you need) or with transformations, and create an alert rule that warns you before the cap is reached; when the cap is hit, an event is also written to the workspace's Operation table.

The point to keep: a daily cap trades data for money after the fact and is not exact, so it complements source reduction and never replaces it.

Query scope and cross-workspace queries

The scope you open Log Analytics in (via Logs on a workspace, resource group, subscription or resource menu) sets the default records a log query evaluates, but explicit cross-resource expressions can retrieve data beyond that context: workspace() and app() (classic Application Insights, see below) can't be used from a resource scope, while resource() works from a resource scope[26]. Its argument is the Azure resource ID of the resource, resource group, or subscription from which to correlate data[26].

The scope you open Log Analytics from

Opened from Records in scope
A Log Analytics workspace (Azure Monitor or workspace menu) All records in the workspace
A resource group or subscription Records created by its resources, possibly from several workspaces
Any other Azure resource Records created by that resource, possibly from several workspaces

Per the query scope guide[29], a resource scope (also called resource context) is a scope set to a resource or set of resources[29], covering the table's resource group, subscription and other-resource rows; it lets a resource owner see only their resource's data, even when it is spread across workspaces. In a resource scope, saving queries, Query explorer and New alert rule aren't available, and the workspace() and app() expressions can't be used. Queries over Basic or Auxiliary tables are blocked under a resource scope and require a workspace scope. A where clause removed from a resource-scoped query still sees only that resource's records.

Scope selects among data you may read; it does not grant access. Querying a workspace requires Microsoft.OperationalInsights/workspaces/query/*/read permissions, as provided by the Log Analytics Reader role[29].

Explicit references: workspace() and union

The cross-workspace query guide[26] names two ways to span workspaces: implicit, a query in a resource scope, which reads every workspace holding that resource's data, and explicit, the workspace(), app() and resource() expressions; only resource() works in a resource scope. With workspace(), identify the workspace by its GUID or full Azure resource ID (names only are slower and error-prone), and append tables from several workspaces with union:

KQL: Update records from two workspaces in one result

union
  workspace("00000000-0000-0000-0000-000000000001").Update,
  workspace("00000000-0000-0000-0000-000000000002").Update
| where TimeGenerated > ago(1d)

The query reads both stores where they are; nothing is copied or re-collected. Its limits, from the same guide:

  • Size. A single query can include up to 100 Log Analytics workspaces or classic Application Insights resources, and you need read permission on each. Application Insights is an application performance monitoring (APM) feature of Azure Monitor[30], not the Storage or Network insights views.
  • Application Insights. A workspace-based Application Insights resource stores its telemetry in a Log Analytics workspace, so query it with workspace(); the app() expression addresses classic Application Insights resources.
  • Saved functions in alerts. A function that scopes several resources can drive a dashboard, but a log search alert validates its resources when the rule is created, so adding resources to the function later does not update the alert's scope; edit the alert rule instead.

The takeaway: pick the scope that matches the question (resource for one owner's data, plus resource() for other resources; workspace for Basic and Auxiliary tables), and reach other workspaces or classic apps with workspace(), app() and union.

KQL: filtering rows

A KQL query is a pipeline: the pipe character (|) separates commands, so the output of the first command is the input of the next[31]. For these log-analysis queries, start from a relevant table and filter early to make clear which events the question is about. KQL is case sensitive for table and column names[31], so perf is not Perf.

Time filters

where keeps only the rows whose predicate is true. A relative interval uses ago(); a fixed interval uses between with two datetime endpoints, as in the cross-workspace guide's example[26]:

KQL: relative and fixed time filters

SecurityEvent
| where TimeGenerated > ago(1h);         // the last hour

Heartbeat
| where TimeGenerated between (todatetime("2023-03-08 15:00:00") .. todatetime("2023-04-08 15:05:00"))

The where operator's performance tips[32] favor simple comparisons between a column and a constant (ago() counts as a constant) and putting single-column clauses first. Place selective filters early, before operators that do more work. Use where for the row filters shown here; project (next section) chooses columns and never removes rows by time.

Position also changes meaning: a where after summarize filters the aggregated groups, not the original events.

Matching strings

KQL indexes string columns by terms, the maximal runs of alphanumeric characters in a value. The string operator reference[33] defines the operators that matter most:

Operator Matches when Case-sensitive
== The whole value is equal Yes
=~ The whole value is equal No
has The right side is a whole term in the value No
contains The right side occurs anywhere, even inside a term No
has_cs, contains_cs As above Yes (the _cs suffix)

The difference between has and contains is the one people miss: "KustoExplorerQueryRun" has "Explorer" is false, because Explorer is not a whole term, while contains "Explorer" is true. Prefer has when whole-term semantics fit, because the term index covers terms of three characters or more; contains, and terms shorter than three characters, fall back to scanning the column, which is much slower.

Missing values: null versus empty

KQL represents missing data differently by type. The string type doesn't support null values[34], so a missing string is an empty string, tested with isempty() or isnotempty(); other scalar types use isnull() or isnotnull(). where drops rows whose predicate evaluates to false or null; a null compared with a non-null value using != evaluates to true[34]. To keep missing measurements alongside a threshold, say so explicitly:

KQL: keep values above 3 and rows where the value is missing

T
| where val > 3 or isnull(val)

In short: filter rows with where, early and by time; match whole terms with has and fragments with contains; and test empty strings with isempty() but null numbers with isnull().

KQL: shaping, aggregating and ordering results

After filtering, the rest of a query decides the shape of the answer: which columns it has, whether each row is an event or a group, and in what order the rows come back.

Columns: project versus extend

The Log Analytics query tutorial[31] separates the two column operators:

  • project selects, renames or calculates columns and returns only those columns: project Computer, TimeGenerated, EventCode=substring(Activity, 0, 4).
  • extend adds a calculated column and keeps every existing column: extend EventCode=substring(Activity, 0, 4).

Neither groups rows, and a later operator can use only columns that earlier steps kept or created.

Groups: summarize

summarize replaces the rows with one row per combination of its by columns, applying aggregation functions such as count(), countif(), sum() and avg() to each group. The tutorial shows why the grouping columns define the population: averaging CounterValue by Computer alone mixes different performance counters and is meaningless, while grouping by Computer, CounterName keeps each counter separate. Filter to the counter you mean before averaging. When only some rows should be counted but every group should remain, use countif() rather than a where that would drop the groups.

Distinct values are not counts: distinct Account lists accounts, whereas summarize count() by Account returns how many events each account produced.

Time buckets: bin and render

Grouping by raw TimeGenerated would create a group for almost every record, because timestamps are nearly unique. Use bin to break the range into units[31], for example bin(TimeGenerated, 1h) for hourly buckets, and add another grouping column (such as Computer) when each machine needs its own trend. render timechart then draws the prepared result: the render operator must be the last operator and doesn't modify data[35], so it aggregates nothing on its own.

KQL: hourly average CPU per computer, drawn as a time chart

Perf
| where CounterName == "% Processor Time" and ObjectName == "Processor" and InstanceName == "_Total"
| summarize AggregatedValue = avg(CounterValue) by bin(TimeGenerated, 1h), Computer
| render timechart

This query is adapted from the one in the Log Analytics dashboard tutorial[36], with the hourly bucket written as 1h: the timespan reference[37] documents a number followed by h as a time interval in hours. The figure below traces how each step changes the rows.

Empty input and nulls in aggregates

Two behaviors of summarize explain many puzzling results. When the input table is empty, summarize without a group expression outputs a single row, and with a group expression it outputs no rows[38]; the single row holds the default values of the aggregates, which is 0 for count(), countif() and sum(). So summarize count() over no events still returns one row containing 0: count the value in the row, not the number of rows. The same page notes that aggregates such as avg() ignore null values, while count() counts rows including those with null fields.

Order: take, sort and top

take returns arbitrary records in no particular order[31], so take 10 alone is a sample, not a guarantee of the latest ten. For an ordered result use sort by (all rows, ordered) or top 10 by TimeGenerated (sorts the whole table on the server and returns the first ten). Descending is the default for both, so top 10 by TimeGenerated already returns the newest records; add asc when the earliest or smallest values should come first.

The pattern to remember: shape columns with project or extend, define populations with summarize ... by (adding bin() for trends), and use top or sort whenever order matters.

Perf: every recordwhere: CPU counter rows onlysummarize by hourly bin:one row per hour, computerrender: draws, changes nothing
How each operator of the hourly CPU query changes the rows: Perf, where, summarize with bin, render (adapted from the Azure Monitor Logs dashboard tutorial)

KQL: combining tables with join and union

Two operators bring rows from different tables together, and they do opposite things: union stacks rows, while join matches rows side by side on a key.

union appends

union returns the rows of every input table without guaranteeing their order. It is the right tool for collecting the same kind of record from several places, such as the same table in two workspaces or the old AzureDiagnostics table plus a new resource-specific table after a collection-mode switch (both shown in earlier sections). It never enriches a row with columns from a matching row elsewhere.

join matches

join combines a left table with a right table wherever the key matches. If the columns have the same name in both tables, use on ColumnName; otherwise use on $left.LeftColumn == $right.RightColumn[39], as in on $left.Computer == $right.HostName. The flavor, set with kind=, decides which rows survive:

Flavor Rows returned
innerunique (the default) Left rows deduplicated on the key, then matched with right rows
inner Only matching rows from both tables, keeping repeats
leftouter Every left row, plus matching right rows where they exist
leftanti Left rows that have no match on the right

The flavors and the default come from the join operator reference[39]. The default matters: because innerunique deduplicates the left side first, a query that joins repeated sign-in events to a host table without stating a flavor can silently return one event per host instead of all of them. State kind=inner when every matching left event must be kept, kind=leftouter to keep unmatched events too, and kind=leftanti to find events with no match (for example, machines that sent no heartbeat). The same reference recommends putting the smaller table on the left when one is always smaller.

In one line: union adds rows, join adds columns from matching rows, and the kind you choose decides which rows remain.

Investigating a management change in AzureActivity

When the question is who changed an Azure resource, the evidence is in the activity log, and once the activity log is exported to a Log Analytics workspace it can be queried with the filtering and shaping operators from the previous sections.

Exporting is the prerequisite, because of the 90-day retention described in 'Activity log and resource logs': after export to a location such as a Log Analytics workspace, you find the creator of a resource by querying the AzureActivity table[11]. AzureDiagnostics is the wrong place to look: it holds resource logs from diagnostic settings, not exported activity log events.

The columns that answer who, what and how it ended

The AzureActivity table reference[40] defines the columns an investigation uses:

Column What it holds
Caller The caller who initiated the operation (the reference describes it as the GUID of the caller)
OperationNameValue The operation identifier, for example Microsoft.Storage/storageAccounts/listAccountSas/action
ActivityStatusValue The status, such as Started, Succeeded or Failed
CorrelationId A shared ID: events with the same value belong to the same overall action

KQL: who deleted resources in a resource group during the last week

AzureActivity
| where TimeGenerated > ago(7d)
| where ResourceGroup =~ "rg-prod"                 // case-insensitive match
| where OperationNameValue endswith "/delete"
| project TimeGenerated, Caller, OperationNameValue, ActivityStatusValue, CorrelationId

A single management action usually produces several events (for example, Started and then Succeeded), so filter on one CorrelationId to see the whole action together. Two cautions from the activity log documentation[11]: values in AzureActivity fields can differ in case, so use case-insensitive operators such as =~; and, as 'Activity log and resource logs' explains, a missing read event proves nothing.

The takeaway: export first, then restrict by time and resource and read Caller, OperationNameValue and ActivityStatusValue, grouping related events by CorrelationId.

Saving queries and sharing dashboards

A useful query becomes a team view in three steps (save it, visualize it, pin it to a shared dashboard), and the sharing step controls who can see the dashboard, not who can see the data on it.

The Log Analytics dashboard tutorial[36] walks the steps:

  1. Save the query with a name and category, building a library of reusable queries.
  2. Visualize it, for example with render timechart. Dashboards support log query charts of the types areachart, columnchart, piechart (rendered as a donut), scatterchart and timechart.
  3. Pin it with Pin to dashboard and pick the dashboard.

A new dashboard is private by default, so only you can see it. To share it, select Share and publish it to a subscription and resource group; access to the published dashboard is then controlled with Azure RBAC, through roles you already hold on the subscription or roles assigned on the dashboard or its resource group.

Dashboard access is not data access

Individual tiles enforce their own access control requirements based on the resources they display[41], so a user who can open a shared dashboard may still see an empty tile. To let someone see a log query tile, give them permissions on the underlying data (for example, query access to the workspace) as well as access to the dashboard. Assigning Reader on the dashboard alone shares the layout, not the results.

In short: save, render and pin to share a query's picture, then grant access to both the dashboard and the data behind each tile.

Alert rules and how they evaluate

An alert rule watches a signal on one or more resources and fires an alert when its condition is met. An alert rule combines the resources to be monitored, the signal or data from the resource, and conditions[42]; a fired alert then runs its action groups (a later section). The figure below shows the path from rule to action, including the alert processing rules that can change it on the way; its monitor condition is explained in 'The lifecycle of a fired alert', and suppressing or adding action groups in 'Alert processing rules'.

Choosing the rule type by signal

The alert type guide[15] assigns each type a signal:

  • Metric alert: the data is already a metric that needs little or no manipulation, such as Percentage CPU.
  • Log search alert: the data is in logs, or the condition needs advanced KQL logic.
  • Activity log alert: a specific event happens to a resource (a restart, a shutdown, a create or delete), or a Service Health or Resource Health event occurs. Service Health alerts and Resource Health alerts are activity log alerts.

Pick the signal before the threshold. Guest memory pressure is not a control-plane event, so no activity log alert can detect it; it needs a metric or log search alert on guest data.

How a metric alert evaluates

Dynamic thresholds

A dynamic threshold replaces a fixed number with a threshold that machine learning calculates from the signal's historical behavior[15], which suits metrics whose normal level varies. Its learning boundaries come from the dynamic thresholds overview[44]:

  • A rule doesn't trigger before it has collected three days and at least 30 samples of data, so new resources don't alert at first.
  • Weekly seasonality needs at least three weeks of history.
  • It detects significant deviations; slow behavior changes probably won't trigger an alert.
  • It can't be used in a rule that monitors multiple conditions.

When a known ceiling must be enforced from day one (a contractual maximum, a capacity limit), use a static threshold.

How a log search alert measures

A log search alert runs a query at a set frequency and measures either the number of table rows returned or a calculation on a numeric column[15]. Use row count for events (errors, Syslog entries) and a numeric measure for values such as CPU percentage or computed latency. The query shape must match the measure: a query ending in summarize avg(CounterValue) returns one row, so counting rows tests nothing about the average. Split by dimensions creates one alert per resource when you split on the resourceId column[42]; without a split, the condition describes the combined population. Each extra dimension combination is another monitored time series, and splitting rules are charged by the number of time series.

Permission to create a rule

To create an alert rule you need read permission on the target resource, write permission on the resource group in which the rule is created, and read permission on any associated action group[42]. The built-in Monitoring Contributor role can create alerts within its scope; Monitoring Reader can only view them. When the rule's resource group or the action group sits in a different scope from the target, check all three permissions, not only the one on the monitored resource. For assigning these roles, see Microsoft's Assign Azure roles using Azure CLI[45].

The takeaway: choose the rule type by signal, then shape evaluation with lookback, aggregation, threshold type, measure and splitting.

Alert rule evaluatesits signalcondition metAlert fires(monitor condition Fired)Alert processing rulessuppress or add groupsAction groups runconcurrently, no set order
Path of an Azure Monitor alert from rule evaluation through alert processing rules to concurrent action groups (Azure Monitor alerts overview)

The lifecycle of a fired alert

A fired alert carries two independent status fields and a fixed retention, and reading them correctly separates what the monitoring system detected from what the operations team did about it.

Monitor condition and user response

The alerts overview[42] defines both fields:

  • The monitor condition is set by the system: Fired when the alert fires, Resolved when the underlying condition clears.
  • The user response is set by a person and doesn't change until a person changes it: New, Acknowledged or Closed.

The two never drive each other. Fixing the resource can resolve the monitor condition but leaves the user response at New; setting Closed records that someone handled the alert and says nothing about the resource's health or about any automation having run.

Stateful and stateless alerts

Each rule is evaluated on its own, with no check for duplicates, so a second rule with the same conditions produces a second, independent alert rather than a reminder from the first.

Retention: 30 days, no manual deletion

Alerts are stored for 30 days and automatically deleted afterward, and you can't delete alert instances manually, even if the parent alert rule was deleted[46]. To tidy the list, change the user response and filter by it. For a stateful alert, the same page notes that the alert condition is stored until the alert resolves, even after the instance itself is deleted at 30 days, so an old alert aging out does not cause a fresh firing for the same ongoing problem.

In short: read the monitor condition for what the signal is doing, the user response for what the team did, and expect every instance to disappear on its own after 30 days.

Action groups

An action group is the response half of alerting: a collection of who gets notified and what actions are taken when an alert fires[47], saved once and reused by any number of alert rules.

Reuse and execution

The action groups guide[47] sets three rules:

  • You can add up to five action groups to a single alert rule.
  • Action groups are executed concurrently, in no specific order.
  • Multiple alert rules can use the same action group.

Action groups are therefore not a workflow: putting a prerequisite step in one group and the dependent step in another gives no sequencing. When steps depend on each other, call one Logic Apps workflow or Automation runbook that performs them in order.

Notifications and actions

Notification receivers are email, SMS, voice call and push notifications to the Azure mobile app. Email Azure Resource Manager Role sends email to members of a role instead of fixed addresses. The guide sets its conditions: the role must be Owner, Contributor, Reader, Monitoring Contributor or Monitoring Reader; the assignment must be made at the subscription level to a user or group; and mail goes to the email address in the user's Microsoft Entra profile. A role assigned only on a resource group or a resource is not picked up.

Automated actions must match the interface of the receiving system:

Action type Use it when
Automation Runbook An operational task should run, such as shutting down resources
Azure Function A function with an HTTP trigger should run; the endpoint must support POST
Logic Apps A workflow should integrate with another service or reshape the payload, for example to post to a Microsoft Teams channel
Webhook An endpoint can process the JSON payloads alert sources emit; basic authentication goes in the URI
Secure webhook The endpoint is a web API protected by Microsoft Entra ID; basic authentication isn't supported
Event Hubs Notifications must be published to an event hub; the only action type that supports Azure Private Link and a network security perimeter
ITSM An incident should be opened in an IT service management tool

Three details from the same guide decide common designs. A webhook endpoint that expects a different schema, such as the Teams schema, needs a Logic Apps action to transform the alert first. The common alert schema, an option enabled separately for each supported action in an action group, is a single extensible payload format across alert types. A Function action saves the function's endpoint and access key, so changing that key means removing and re-creating the action. For delivery that must stay on Private Link or behind a network security perimeter, choose Event Hubs; a secure webhook adds Entra authentication but not private delivery.

Global or regional processing

An action group is created in a region you select, and that region controls processing, not which resources it can serve. A Global action group is persisted in at least two regions and its actions may be processed in any geographic region; a Regional action group is stored and processed within the selected region, for geographic-boundary requirements. One exception decides the choice: Service Health alerts are only supported in public clouds within the global region, so their action group's region must be Global[47], even when the incident concerns a single region.

Testing an action group

Testing checks delivery without waiting for a real alert. The testing procedure[47] is:

  1. Create and save the action group; when editing, save the changes before testing.
  2. Select Test, choose a sample alert type and the notification and action types to try, and run it.
  3. Read Success or Failed; for a failure, View details shows the error. Fix, save and test again.

The test isolates delivery from detection, so a failing receiver is fixed in the action group, not by changing an alert threshold. One more prerequisite applies to email receivers: new addresses must be verified with a one-time passcode (OTP) within 30 minutes of saving the action group, and an expired code can be resent. Once enforcement is active, an unverified address receives neither alert nor test notifications. Email Azure Resource Manager Role receivers don't require OTP verification.

The takeaway: build action groups as reusable, unordered sets of receivers and actions, pick action types by the receiving interface, keep Service Health groups Global, and test after every saved change.

Alert processing rules

An alert processing rule changes alerts as they fire, without editing the alert rules that produced them. Alert rules generate new alerts, while alert processing rules modify the fired alerts to change the usual alert behavior[48]; they were previously called action rules.

The two actions

The alert processing rules guide[48] describes both:

  • Suppression removes all action groups from the affected fired alerts. The alerts stay visible in the portal, Azure Resource Graph, the API and PowerShell, but their action groups don't run, not even at the end of the maintenance window: suppressed notifications are not replayed.
  • Apply action groups adds action groups to the affected fired alerts. This also covers alerts that no alert rule of yours produces, such as Azure Backup alerts, which can't otherwise be given action groups.

A rule is always active by default, or runs in a one-time window or on a recurring schedule, such as weekly. Suppression on a schedule is the maintenance tool: disabling alert rules instead stops alerts for every resource the rule covers, including resources not under maintenance, and leaves alerts without a rule untouched.

Scope and filters

  • Scope is a list of resources, a resource group or a whole subscription, and always within the same subscription as the rule. A management group can't be a scope, so covering several subscriptions needs a rule in each.
  • Filters narrow the alerts within the scope: severity, monitor service, resource type, resource, alert rule name and others. Multiple filters combine with AND; each filter can hold up to five values, which combine with OR. For example, resource type Virtual Machines AND severity Sev0 matches only Sev0 alerts on VMs.
  • Propagation. A new or changed rule can take up to 30 minutes to take effect, and alerts fired in the meantime might not be affected.
  • Service Health alerts aren't affected by alert processing rules.

When both kinds match

Suppression wins. If one fired alert is matched by a suppression rule and by an Apply action groups rule, its action groups are suppressed, as the guide states. Precedence is by action type, not by how specific a rule is, so a narrower Apply action groups rule does not punch a hole in a broad suppression. To keep a critical resource notifying during maintenance, narrow the suppression rule's scope or filters to exclude it, for example with a Resource filter set to Does not equal. The figure below traces the decision for one fired alert.

In short: suppress on a schedule for maintenance, add action groups at scale for routing, stay inside one subscription, and remember that suppression always outranks addition.

Matches a suppressionrule?NoYesMatches an Applyaction groups rule?No action groupsrun; alert visibleYesNoAlert rule'sgroups plusadded groupsOnly the alertrule's ownaction groups
Which action groups run for one fired alert when alert processing rules match: suppression first, then Apply action groups

Monitoring virtual machines

VM monitoring layers two kinds of data: host data that Azure collects about the VM from outside, and guest data collected from inside its operating system. Knowing which layer holds an answer decides whether anything must be installed.

Host metrics versus guest data

The VM monitoring overview[12] draws the line:

  • Host metrics (CPU usage, network traffic, disk I/O and availability) are collected automatically at no cost and show overall load.
  • Guest metrics and logs show what happens inside the machine, such as memory pressure, processes and operating system events. They require enhanced monitoring, which installs Azure Monitor Agent and starts collecting a default set of metrics.
  • Activity logs record operations on the VM, such as start, stop and configuration changes; they say nothing about the processes consuming its memory.

Start with host metrics to see which machines are under load, then use guest data to explain why. When you enable monitoring in the portal, it automatically installs the agent, creates the DCRs and associates them with the VM[22]; guest data is never automatic until that happens.

Two guest metric experiences

Enhanced monitoring stores guest performance data in one of two ways, compared in the VM monitoring overview[12] and the enablement guide[22]:

OpenTelemetry metrics (recommended for new deployments) Logs-based metrics (classic)
Stored in An Azure Monitor workspace A Log Analytics workspace
Queried with PromQL KQL
Data path OpenTelemetry metrics DCR Predefined counters through the Microsoft-InsightsMetrics stream to InsightsMetrics

Guest logs, such as Windows events and Syslog, always go to a Log Analytics workspace, through separate log DCRs. The enablement guide says not to modify the logs-based metrics DCR; add Windows events, Syslog or extra counters with their own DCRs (the earlier section on guest data sources lists their tables).

Fleets and machines outside Azure

The enablement guide lists Azure VMs, virtual machine scale sets and Arc-enabled servers as monitoring targets, and supports enabling monitoring at scale with the Azure CLI, PowerShell, Azure Policy, ARM templates and Bicep. Azure Policy evaluates resources as they are created or changed, so a policy assignment also reaches machines added later; for machines that already exist, run a remediation task to enable monitoring on existing virtual machines in the scope[49] (see 'Compliance evaluation and remediation tasks' in Manage Azure subscriptions and governance). A machine outside Azure needs the Azure Connected Machine agent first, which makes it an Arc-enabled server that Azure can manage; only then can Azure Monitor Agent be installed and monitoring enabled.

If the agent is present but expected data is missing, inspect the machine's DCR associations and the DCRs' sources before reinstalling anything: the agent collects only what its associated rules specify.

In short: host metrics are free and automatic, guest data needs enhanced monitoring, and the chosen experience decides whether guest metrics live in an Azure Monitor workspace or a Log Analytics workspace.

Storage insights

Storage insights is a curated set of workbooks (interactive Azure Monitor reports) for storage accounts, and it runs on platform metrics, so it works without any setup: the storage metrics from your storage accounts are collected by default[50]. Enabling resource logs is not a prerequisite for its capacity or performance views.

Views and what each investigates

From Azure Monitor it shows many accounts at once; from a single account it drills down. The Storage insights overview[50] describes the drill-down workbooks:

  • Capacity: storage used by the account and by each data service (blob, file, table, queue), to find over- and under-used storage.
  • Performance: opened from E2E Latency or Server Latency, it charts end-to-end versus server latency and breaks down the latency of successful calls by API.
  • Failures: opened from an error category, it shows client-side errors, client-throttling errors and a chart by the transaction Response Type dimension, with tables of transactions by API name and by response type.
  • Availability: availability by service or API operation.

The multi-account view returns at most 200 storage accounts, even if you select more, so an account missing from the grid may simply be beyond that limit rather than unmonitored.

Reading latency: server time versus end-to-end time

Two latency metrics sit side by side, and their difference is the diagnosis. In the Blob Storage metric reference[13], Success E2E Latency is the end-to-end latency of successful requests, including the processing time needed to read the request, send the response and receive acknowledgment; Success Server Latency is the time Azure Storage takes to process a successful request and excludes that network latency.

  • High E2E latency with normal server latency points to the network or the client, so investigate those before assuming storage needs scaling.
  • High server latency points inside the storage service; drill into the Performance workbook by API.
  • Rising errors or throttling call for the Failures workbook and its Response Type breakdown, because both latency metrics describe successful requests only.

Customizing without creating alerts

You can edit a workbook to change its metrics, colors, scope and availability thresholds and save it as your own workbook, which leaves the published default untouched. The default availability thresholds are 99 percent for warning and 90 percent for critical; changing them changes how the grid is colored. A workbook threshold sends no notification: when a condition must alert someone, create an alert rule. Sections can be pinned to an Azure dashboard for shared visibility.

The takeaway: Storage insights needs no setup, compares server and end-to-end latency to locate a slowdown, and colors thresholds without alerting on them.

Network insights

Network insights is the Azure Monitor view of all deployed network resources, and part of it works with no configuration while other parts only display data from features you configure separately.

The Network insights overview[51] describes its parts:

Part What it shows Needs configuration?
Topology Virtual networks and connected resources and their relationships across subscriptions, regions and resource groups, with drill-down to a resource No
Network health and metrics Inventory of network resources by type, with resource health, metrics and alerts No
Connectivity Reachability of tests configured in Connection monitor, by source and destination Yes: Connection monitor tests
Traffic Network security groups and their flow log and traffic analytics configuration status Yes: flow logs and traffic analytics
Diagnostic Toolkit Shortcuts to packet capture, VPN troubleshoot, connection troubleshoot, next hop and IP flow verify Each tool runs on demand

Connection monitor, flow logs, traffic analytics and the toolkit's tools are Network Watcher features, each explained later: 'Network Watcher and its diagnostic tools', 'Connection troubleshoot and Connection monitor', 'Packet capture', 'VPN troubleshoot' and 'Virtual network flow logs and traffic analytics'.

The overview states that topology, health and metrics are provided for all deployed network resources without requiring any configuration. Use them to spot an unhealthy resource and drill into its metrics, alerts and diagnostic tools.

Connectivity visualizes tests you have already created in Connection monitor, and traffic data exists only where flow logging was configured. Opening Network insights therefore cannot produce packet or flow history for a period when no flow logs were running.

In short: Network insights gives instant inventory, topology and health, and shows connectivity and traffic evidence only where Connection monitor and flow logs collect it.

Network Watcher and its diagnostic tools

Suppose a VM can't reach a database in another subnet: the cause could be a route, a security rule or something further along the path, and each of those questions has its own tool. Azure Network Watcher is a regional service with tools to monitor and diagnose the network of IaaS resources such as VMs, virtual networks, application gateways and load balancers. The Network Watcher overview[3] states that it isn't designed for PaaS monitoring or web analytics.

Enablement: one instance per region per subscription

Network Watcher has one instance per region per subscription[3], and that instance enables the service for the whole region, not for one virtual network. Creating or updating a virtual network automatically enables Network Watcher in that region, with no associated charge for the automatic enablement. The exception is a subscription that opted out of automatic enablement, which must enable it manually. When a tool is unavailable for a VM, check that Network Watcher is enabled in the VM's region. Enabling is free, but the capabilities you then use are priced separately, as the overview's pricing section notes.

The tools and the question each answers

The overview lists seven diagnostic tools plus monitoring and traffic capabilities. The vocabulary used throughout this topic:

Question Tool
Do security rules allow this flow? IP flow verify, NSG diagnostics
Which rules are applied to this NIC? Effective security rules
Which route does this traffic take? Next hop
Can the source reach the destination right now? Connection troubleshoot
Is it reachable over time, and how fast? Connection monitor
What exactly was sent? Packet capture
Why is a VPN gateway or connection failing? VPN troubleshoot
What traffic flowed, historically? Virtual network flow logs and traffic analytics

Security-rule diagnostics

NSG rules are processed in priority order, with lower numbers processed before higher numbers, and once traffic matches a rule, processing stops[4]. Three tools check them:

  • IP flow verify tests one packet to or from a VM, described by direction, protocol, local IP, remote IP, local port and remote port. It returns Access allowed or Access denied and the name of the security rule that decided[52], considering the NSGs on both the subnet and the NIC. It tests only TCP and UDP rules and only a VM's network interface. It answers the filtering question directly, without collecting any traffic.
  • NSG diagnostics simulates a flow and returns allowed or denied with the deciding rule, for VMs, network interfaces, scale set network interfaces and application gateways v2 except private deployments. Its source or destination can be an IP address, an IP prefix or a service tag (overview[3]), and it tests ICMP rules and scale set rules, which IP flow verify doesn't[52].
  • Effective security rules shows the rules applied to a network interface, to its subnet, and the aggregate of both. Use it to inspect the whole configuration rather than to get one verdict; looking only at the NSG on the NIC misses the subnet's NSG.

An allowed verdict settles filtering only. If the connection still fails, routing or the application may be the cause, which the next tools help check.

Next hop: routing evidence

Next hop returns the next hop type, the next hop IP address and the route table ID for traffic from a VM to one destination IP address, as the overview[3] describes. Compare the result with the intended path (a network virtual appliance, a gateway, the internet): it is the tool that proves whether a user-defined route took effect, which IP flow verify cannot show. A correct next hop does not mean security rules or the destination accept the traffic, so follow it with a filtering check or a connection test.

The takeaway: enable Network Watcher per region, then pick the tool by the question: rules (IP flow verify, NSG diagnostics, effective security rules), route (Next hop), live reachability, packets or flow history (the following sections).

Connection troubleshoot and Connection monitor

Both tools test connectivity from a source to a destination and report reachability and latency; the key distinction here is timing: Connection troubleshoot tests once, now, and Connection monitor tests repeatedly and keeps the results.

Connection troubleshoot: a point-in-time test

Connection troubleshoot tests a connection between a virtual machine, a virtual machine scale set, an application gateway or a Bastion host and a virtual machine, an FQDN, a URI or an IPv4 address[3]. It returns information similar to Connection monitor's, but for a single point in time. Use it for a one-off investigation, including failures that a single security-rule check doesn't explain, when an immediate answer is enough and an ongoing record is not needed.

Connection monitor: continuous tests

Connection monitor tests measure aggregated packet loss and network latency across TCP, ICMP and HTTP checks[53] at regular intervals and records reachability over time. Its building blocks, from the Connection monitor overview[53]:

  • Sources need an agent; destinations don't. Azure VMs and scale sets act as sources through the Network Watcher Agent virtual machine extension, also known as the Network Watcher extension[53]. On-premises hosts can be sources only when Azure Arc-enabled, with Azure Monitor Agent installed. Destinations can be Azure VMs, scale sets, Arc-enabled hosts, URLs, FQDNs or IP addresses, including on-premises endpoints without Arc, and don't require the extension. The source sends the probes, so you can monitor reachability of a public site or another team's service without installing anything there.
  • A test configuration sets the protocol (HTTP, TCP or ICMP, not UDP), the port where applicable, thresholds and test frequency.
  • A test group combines sources, destinations and test configurations, and each source, destination and configuration combination becomes one individual test. Two sources, two destinations and two configurations produce eight tests. Use separate test groups when endpoint sets need different test behavior.
  • Limits: 20 test groups and 20 test configurations per connection monitor, 100 sources and destinations per connection monitor, and 100 connection monitors per subscription per region.

The figure below shows how a test group expands into tests.

Test states

For HTTP, a check fails when the response code isn't one of the valid codes; for TCP and ICMP, the failed-check percentage is the packet-loss percentage. Each test then gets a state:

State Meaning
Pass Failed-check percentage and round-trip time (RTT) are within thresholds
Fail Failed-check percentage or RTT exceeded its threshold; without thresholds, Fail means 100 percent of checks failed
Warning Failed-check percentage above 80 percent of its set threshold, or past the automatic thresholds when none are set: 10 percent failed checks, or 750 ms RTT for TCP and ICMP
Indeterminate No data in the Log Analytics workspace; check the metrics
Not Running The test group is disabled

Indeterminate is missing data, not 100 percent loss: check collection before concluding the path is down.

Metrics, logs and endpoint refresh

Results go to two places: ChecksFailedPercent and RoundTripTimeMs metrics in Azure Monitor, and detailed data in the Log Analytics workspace[53]. Use the metrics for metric alert rules, and the logs and topology view for hop-by-hop analysis. Connection monitor reevaluates endpoint status once every 24 hours, so a VM deallocated, or a selected scale set instance scaled down, during that cycle shows Indeterminate until the next evaluation. For scale sets, the overview advises letting Connection monitor pick instances randomly within a coverage level instead of selecting fixed instances that may disappear; a vanished instance is a stale endpoint selection, not a routing fault.

In short: Connection troubleshoot for now, Connection monitor for over time; Connection monitor uses agents only at the source and has test states that distinguish failure, slowness and missing data.

Connection monitorTest group (up to 20)Sources(agent)Destinations(no agentneeded)TestconfigurationsOne test per source,destination, configuration
How a Connection monitor test group expands into one test per source, destination and test configuration (Azure Network Watcher Connection monitor)

Packet capture

Packet capture records the actual packets to and from a VM or a scale set instance, the only Network Watcher evidence that shows a protocol exchange itself rather than a verdict or a summary.

Prerequisites and storage

The packet capture overview[54] sets these conditions:

  • Agent. Packet capture requires the Network Watcher extension, AzureNetworkWatcherExtension, on the target: the same extension Connection monitor sources use ('Connection troubleshoot and Connection monitor').
  • Where captures go. Captured data is saved to the local disk or to Azure Storage blobs.
  • Key access for storage. Packet capture uses shared access signature (SAS) tokens to write to the storage account, so key access must be enabled on the account. If it isn't, captures can be saved only to the VM's local disk. Granting a user a blob data role does not change this, because the capture service authorizes with SAS, not with the user's identity. For SAS tokens and account keys, see Microsoft's SAS overview[55] and account access key guidance[56].

Filters and limits

Filters select what is recorded, based on the packet's protocol and its local and remote IP addresses and ports (together, the 5-tuple):

Filter Values
Protocol TCP, UDP or All
Local IP address, local port The captured VM's end of the packet
Remote IP address, remote port The other end

Local always means the machine being captured. To capture a VM's outbound calls to a web service, put the service's address in Remote IP address, not in Local. Two limits bound the volume: Maximum bytes per packet (all bytes are captured if it's left blank; 34 captures only the IPv4 header) and Time limit per session (default 18,000 seconds, five hours). Keep enough bytes for the analysis you intend.

Capturing an intermittent problem

Two options record traffic around an event you can't schedule:

  • Alert-triggered capture. You can use virtual machine alerts to trigger packet captures[54], so recording starts when the problem is detected.
  • Continuous packet capture (preview). It writes to a rotating set of files (a ring buffer): you set the number of files (default 10) and the size of each file (default 100 MB), and when the count is reached, the oldest file is deleted. It runs for the duration you set, up to seven days. Size the buffer to keep the recent history you need, because older packets are overwritten.

Connection monitor is not a substitute: its probes measure connectivity and keep no copy of the real packets exchanged before a failure.

The takeaway: install the extension, filter on the 5-tuple from the captured VM's point of view, bound the size, and use a triggered or continuous capture for problems that come and go.

VPN troubleshoot

VPN troubleshoot diagnoses the health of a virtual network gateway and its connections, and it applies only to the gateway and connection types its support table lists.

The VPN troubleshoot overview[57] sets the scope:

Gateway or connection Supported
VPN gateway, route-based Yes
VPN gateway, policy-based No
ExpressRoute gateway No
IPsec connection Yes
VNet-to-VNet connection Yes
ExpressRoute connection No
VPN client (point-to-site) connection No

An ExpressRoute connection also uses a virtual network gateway, but VPN troubleshoot does not support it.

What it reports

Results name a fault type with a summary, a detailed description and recommended actions. Connection fault types include Authentication (preshared key mismatch), PeerReachability (the peer gateway isn't reachable) and IkePolicyMismatch (the peer has IKE policies Azure doesn't support), among others. Detailed log files are written to a storage account you provide when troubleshooting finishes.

Operational limits

The same page lists two limits. Only one VPN troubleshoot operation can run at a time per subscription; starting another before the first completes makes it fail. With the Azure CLI, the VPN gateway and the storage account must be in the same resource group; when they aren't, use PowerShell or the Azure portal.

In short: point VPN troubleshoot at a route-based VPN gateway or its IPsec or VNet-to-VNet connection, one run per subscription at a time, and read the fault type and the logs it stores.

Virtual network flow logs and traffic analytics

Flow logs answer what traffic flowed, after the fact; traffic analytics turns those records into network-wide views. Together they form a pipeline you configure ahead of time, because no tool can produce flow history for a period when logging was off.

What a virtual network flow log records

Virtual network flow logs (called VNet flow logs in the portal and the documentation) are a Network Watcher feature that operates at the virtual network level, so it also captures traffic through resources such as gateways. The virtual network flow logs overview[58] describes the record:

  • Flow logs operate at Layer 4 and record all IP flows through a virtual network, except for unsupported services, such as those listed under 'Storage and coverage boundaries' below.
  • Logs are collected at one-minute intervals through the Azure platform, with no agent and no effect on your resources or traffic, and written as JSON to Azure Storage.
  • Each record holds the network interface, the 5-tuple (source and destination address and port, and protocol), direction, flow state, encryption state, and throughput (bytes and packets), plus the rule that allowed or denied the flow.

A flow record is a summary, not the conversation: it carries no payload. To see what an application actually sent, use packet capture.

Storage and coverage boundaries

The same page sets the storage account rules: it must be in the same region as the virtual network, in the same subscription or in a subscription associated with the same Microsoft Entra tenant, and on the Standard performance tier (Premium accounts aren't supported). Coverage is not universal: services including App Service, Azure Container Instances, Azure Container Apps, Azure Functions and Azure Logic Apps don't support virtual network flow logs, so missing records for them are expected, not a collector failure.

Moving from NSG flow logs

NSG flow logs, the older per-NSG version, are retiring. NSG flow logs retire on September 30, 2027, and new NSG flow log creation is no longer supported[3]; after retirement, Azure deletes the remaining NSG flow log resources but not the records already in storage, which keep following their retention policies. Use virtual network flow logs for new deployments, and disable NSG flow logs before enabling virtual network flow logs on the same workloads to avoid duplicate traffic recording and additional costs[58].

Traffic analytics

Traffic analytics analyzes raw flow logs and combines them with intelligence about security, topology and geography[59], storing the enhanced data in a Log Analytics workspace. It answers questions that raw JSON makes tedious: most-communicating hosts, protocols and host pairs, allowed and blocked traffic, open internet ports, and the most-blocking rules. If flow logs are supported in a region but a Log Analytics workspace isn't supported there for traffic analytics, a workspace from another supported region can be used. Connection monitor results can't replace it: synthetic probes measure test traffic, not the volume of real application flows.

The figure below traces the pipeline from traffic to analysis.

The takeaway: enable virtual network flow logs to a Standard storage account in the same region, retire overlapping NSG flow logs, and add traffic analytics with a Log Analytics workspace for network-wide insight.

Virtual network trafficVirtual network flow log(Layer 4, every minute)Storage account: JSON(Standard, same region)Traffic analytics(adds topology, geography)Log Analytics workspace
Pipeline from virtual network traffic through a virtual network flow log and storage to traffic analytics in a Log Analytics workspace (Azure Network Watcher)

Alert rule types: metric alert vs log search alert vs activity log alert

PropertyMetric alertLog search alertActivity log alert
Signal evaluatedNumeric metric values at regular intervalsThe result of a KQL query, run at a set frequencyA new activity log event that matches the rule's conditions
Typical useData already available as a metric that needs little manipulationData in logs, or a condition that needs advanced query logicA specific operation (restart, delete, role assignment) or a Service Health or Resource Health event
StateStateful by default; resolves after three consecutive checks that no longer meet the conditionStateful or stateless, as configuredAlways stateless; the monitor condition stays Fired
One rule, many resourcesSame resource type, one region, one subscription (supported types; not VM guest or VM network metrics)Any resources that send data to the queried workspace; split on a resource ID column for one alert per resourceEvents in the rule's subscription by default
Dynamic thresholdsSupported, but not in a rule with multiple conditionsSupported (preview)Not offered: the rule matches events, not thresholds

Decision tree

Which Network Watcher tool?Which Network Watcher tool?Need the routetraffic takes?YesNext hopNoRule verdict for aVM TCP or UDP flow?YesIP flow verifyNoICMP, service tag orscale set verdict?YesNSGdiagnosticsNoSee all rulesapplied to a NIC?YesEffectivesecurity rulesNoVPN gateway orconnection failing?YesVPNtroubleshootNoReachabilityright now?YesConnectiontroubleshootNoReachability andlatency over time?YesConnectionmonitorNoNeed actual packetcontents?YesPacket captureNo: need traffic historyVirtual networkflow logs

Sharp facts the exam loves — give these one last read before exam day.

Cheat sheet

Sharp facts the exam loves — scan these before test day.

Platform metric retention and the chart query window are different limits

Azure Monitor retains platform metrics for 93 days, but a single Metrics explorer chart can query at most 30 days at once. Select a shorter interval and pan to investigate older retained data. For longer-term trending, export supported metrics to a Log Analytics workspace and configure the required log retention.

Trap Using a longer chart time range as the archival mechanism, which neither extends metric retention nor bypasses the per-chart query window.

2 questions test this
Metric aggregations answer different measurement questions

Metric Sum totals the reported values, Count counts the measurements, and Average describes their mean over the selected interval. Use Sum for a metric reporting bytes transferred when the requirement is total traffic; use Average for typical utilization. Count equals Sum when every reported measurement has the value one, and the metric determines which aggregations are available.

Trap Using Count to obtain transferred bytes, which counts observations rather than their numeric contents.

2 questions test this
Time grain and aggregation together determine whether brief peaks remain visible

Metrics explorer aggregates measurements into one point per selected time grain, independently of the total chart time range. A coarser Average smooths brief spikes, while Max preserves the largest observed value in each interval and Min exposes the lowest. Use a finer grain to inspect short incidents and a broader aggregation interval to assess sustained load; Automatic grain changes with the selected time range.

Trap Extending the chart time range alone to reveal short CPU peaks, which can make the automatically selected grain coarser.

2 questions test this
Filtering selects metric segments while splitting compares them

Metric dimension filters restrict which values contribute to a chart, while splitting draws separate series for dimension values. Filter a storage transaction metric by ResponseType to isolate a response category, then split by an available dimension such as API name to compare its contributors. These operations require dimensions that the metric actually exposes; a dimension value absent from the selected interval may not appear in the filter list.

Trap Changing the metric namespace to isolate one response category, which selects a family of metrics rather than filtering a metric's dimension values.

2 questions test this
Multi-resource metric charts require compatible resources; use comparable scales

Metrics explorer can combine supported resources of the same resource type, region, and subscription, even when they belong to different resource groups. Use separate charts when metrics have different units or substantially different scales so that one series does not obscure another. Monitoring Reader at subscription scope supplies the documented access for visualizing metrics across multiple resources, resource groups, or the subscription.

Trap Combining every VM selected through a management group into one platform-metric scope, which does not satisfy the subscription and region restrictions.

2 questions test this
A missing metric measurement is not necessarily a measured zero

A null metric value represents absent data and is excluded from valid measurement counts and averages. Line charts can show gaps with dotted or dashed connections, so inspect reporting availability before interpreting a drop as reduced utilization. Platform providers decide whether an inactive metric reports zero or null, and alert evaluation uses the values that provider actually writes.

Trap Treating a dashed chart segment as proof of zero load, which assigns a numeric measurement to an interval without reported data.

2 questions test this
Activity logs and resource logs require different collection decisions

The Azure activity log automatically records control-plane management operations, such as creating a VM or changing a key vault access policy, without collection configuration. Azure retains these events for 90 days; configure activity-log export when an audit requires longer retention. Resource logs describe operations performed within a resource, such as retrieving a key vault secret or sending a database request, and are not collected by default. Configure resource-log collection separately when investigating those service-level operations.

Trap Installing a guest monitoring agent to obtain subscription deployment audit history, because that history is generated by the Azure control plane rather than inside the VM.

2 questions test this
Diagnostic destinations serve different analysis and integration needs

A diagnostic setting can send selected data to Log Analytics for KQL analysis, Storage for retained files, and Event Hubs for streaming to an external consumer. Each resource supports up to five diagnostic settings, and each setting can name only one destination of each type. To deliver the same logs to two workspaces, create two settings; destinations must already exist, but workspace tables are created when data first arrives.

Trap Selecting Event Hubs as a substitute for a query workspace, which supplies a stream rather than a Log Analytics table store.

2 questions test this
Diagnostic routing must satisfy destination location, access, and firewall rules

For a regional monitored resource, diagnostic destinations in Storage or Event Hubs must be in that resource's region; a Log Analytics workspace can be elsewhere. A destination can be in another subscription when the configuring identity has appropriate access to both. For network-restricted Storage or Event Hubs destinations, enable the trusted Microsoft services firewall exception so the diagnostic service can deliver data; Event Hubs streaming also requires its authorization rule to provide Manage, Send, and Listen permissions.

Trap Adding only the administrator workstation's public IP to a destination firewall, which does not authorize delivery by the Azure diagnostic service.

2 questions test this
Resource-specific diagnostic mode separates new logs into dedicated tables

Resource-specific diagnostic mode writes logs to dedicated tables instead of the shared AzureDiagnostics table, improving schema discoverability and enabling table-specific access control. Select it for new settings when the service offers the choice; the CLI option is --export-to-resource-specific true. Switching an existing setting changes future ingestion only, so historical analysis may need a union of the old and new tables until the old data expires.

Trap Rewriting only the AzureDiagnostics query after changing collection mode, which leaves the new dedicated-table data outside that query.

2 questions test this
Diagnostic metric export does not preserve every platform-metric capability

Diagnostic settings export only supported metrics and flatten dimensional metrics by aggregating across dimension values. Check the metric reference's Exportable field before relying on export, and query the Metrics API when the investigation requires dimensional detail unavailable through diagnostic export. A Log Analytics copy is therefore not automatically equivalent to the original platform metric series.

Trap Using an exported AzureMetrics series as a per-instance dimensional record, which may already have combined those instance values.

2 questions test this
Missing diagnostic output can reflect an idle source or export latency rather than broken routing

Diagnostic settings must be configured for each emitting resource, and data should begin flowing within 90 minutes after a setting is created. If nothing arrives within 24 hours, first distinguish a source that generated no logs from a routing problem. Export of zero-value metrics progressively backs off during inactivity, reaching a maximum two-hour backoff after seven inactive days and potentially delaying the next nonzero export. This backoff affects exported metrics, not native metric alerts or autoscale.

Diagnostic export requires a compatible destination and separate permission to retrieve its streaming key

Diagnostic settings support Standard storage accounts, not Premium storage accounts, as storage destinations. An Event Hubs destination must not use log compaction because compacted event hubs require a partition key that Azure Monitor does not supply. The identity updating the setting to stream to Event Hubs also needs ListKey permission on the Event Hubs authorization rule; this is separate from the permissions the rule grants to the streaming mechanism.

Diagnostic settings need cleanup when their emitting resource changes identity or placement

Delete a resource's diagnostic settings when deleting or renaming the resource or moving it across resource groups or subscriptions, then configure the intended settings for its new lifecycle. A stale setting can otherwise apply to a subsequently recreated resource and resume log collection with the old destinations and categories. Include diagnostic-setting cleanup in the resource change rather than assuming that recreating the resource creates a clean monitoring configuration.

Data collection rules define reusable collection policies rather than storing telemetry

A data collection rule specifies supported sources, optional transformations, and destinations; it is configuration, not a telemetry store. For Azure Monitor Agent collection, associate the DCR with every applicable machine: one rule can serve many machines, and one machine can use several rules through separate associations. Use ingestion-time filtering or reshaping to remove unnecessary incoming data, and inspect all associations before changing a shared rule.

Trap Creating a Log Analytics workspace retention setting to exclude incoming event categories, which controls stored-data lifetime rather than source selection.

2 questions test this
Log table retention separates interactive analysis from long-term preservation

Analytics tables normally inherit the workspace's 30-day analytics retention unless a table override or service-specific default applies; explicit table overrides survive later workspace-default changes. Analytics retention can extend to two years, while total retention can extend to 12 years, with search jobs retrieving Analytics data beyond its analytics window. Use longer total retention with a shorter analytics window for infrequent historical access, and note that reducing analytics retention below the 31 days included in ingestion pricing does not reduce that included charge.

Trap Increasing only the workspace default to change a table with an explicit retention override, which retains its own setting.

2 questions test this
A workspace daily cap is an emergency safeguard rather than a precise spending ceiling

A Log Analytics daily cap stops collection of billable Analytics and Basic data until the workspace's fixed reset hour; Auxiliary tables are not subject to that cap. Collection can overshoot the threshold and the excess is still billed. Prefer source reduction or ingestion-time transformations for routine cost control, and alert before reaching the cap because stopping collection also removes data needed by monitoring and log alerts.

Trap Using a daily cap as a guaranteed maximum invoice amount, which ignores ingestion overshoot and charges outside the capped data paths.

2 questions test this
A log table plan trades ingestion price against query and monitoring capabilities

Choose Analytics for continuous monitoring and latency-sensitive analysis, Basic for supported lower-cost troubleshooting data, and Auxiliary for low-touch verbose data when its slower query path and lack of alerts are acceptable. Basic and Auxiliary queries incur separate query charges, and support for these plans varies by Azure table even though DCR-based custom tables support all three. Plan changes preserve existing data under applicable retention and are limited to one switch per table per week, so validate alert and Insights dependencies before downgrading.

Trap Moving an actively alerted table to Auxiliary solely for lower ingestion cost, which removes the table's alert capability.

2 questions test this
Windows event collection uses DCR source filters and the Event table

Use a Windows Event Logs data source in an Azure Monitor Agent DCR to select local logs and severities, or Custom XPath for a more precise event filter. XPath entries use LogName!XPathQuery, such as Application!*[System[EventID=1035]], and the collected events appear in the Event table, including Security-log events collected through this general path. Logs on network shares and Analytic or Debug channels are unsupported, so verify both the source channel and destination table when data appears missing.

Trap Querying only SecurityEvent to verify a general Windows Event Logs DCR's Security-log collection, which uses the Event table for that path.

2 questions test this
Guest collection migration must replace the old delivery path without retaining overlapping ingestion

Replace retired Log Analytics agent collection with Azure Monitor Agent and DCRs, verify the required data, and remove the legacy collection path after validation. For the retired Windows and Linux Azure Diagnostics extensions, WAD and LAD, use the documented replacement for the destination: AMA-backed log tables for logs, Azure Monitor Logs data export for Event Hubs, or the Azure Monitor workspace OpenTelemetry path for guest metrics. Remove WAD or LAD after replacement is configured, and ensure multiple DCRs associated with one machine filter for distinct data rather than collecting the same records into the same destination, which duplicates ingestion and charges.

Trap Retaining WAD as an Event Hubs forwarding layer after migrating guest collection, although the documented replacement exports collected Azure Monitor Logs data instead.

Additional logs-based guest performance counters belong in a separate DCR and the Perf table

When logs-based VM monitoring lacks a required performance counter, create an additional DCR with a Performance Counters source, select the counter and sampling interval, and send it to a Log Analytics workspace. The predefined performance-counter set cannot be modified; a shorter sampling interval collects values more frequently. Verify the additional collection in Perf, rather than expecting those counters to appear in the predefined Microsoft-InsightsMetrics stream.

Trap Editing the predefined VM monitoring performance rule to add a counter, although its fixed counter set is extended through an additional collection rule.

Working guest collection needs authenticated onboarding and evidence from both the agent and its source table

Azure Monitor Agent requires a managed identity on an Azure VM; a user-assigned identity must be specified in the agent configuration when that identity is used. The portal setup requires DCR creation permissions and at least Contributor access to the destination Log Analytics workspace, and the DCR must share the workspace's region even when monitored machines are elsewhere. After deployment, query Heartbeat for the machine to verify agent communication, then inspect the configured source's destination table to verify actual collection. A heartbeat establishes agent communication, not that every requested source is producing records.

A data collection endpoint supplies network endpoints rather than collection rules or telemetry storage

A data collection endpoint, or DCE, exposes configuration-access and ingestion endpoints; the DCR still defines collection, and the destination workspace stores the data. AMA normally retrieves configuration through a public endpoint, but Private Link, including networks sharing DNS with Azure Monitor Private Link Scope (AMPLS) resources, requires a DCE, and certain data sources require one independently. Add the ingestion DCE to AMPLS when its destination uses Private Link. Configuration access uses a DCE in the monitored machine's region, whereas log ingestion uses a DCE in the destination Log Analytics workspace's region, so a cross-region deployment can need separate endpoints.

Trap Placing every DCE only in the workspace region for a cross-region private deployment, although agents obtain configuration from an endpoint in their own region.

Guest log verification must use the table and filters for the configured source

Configure a Linux Syslog DCR source with the required facilities and minimum severity, then verify matching events in Syslog; selecting LOG_WARNING collects warning and more severe levels for the selected facilities. IIS log collection on Windows writes to W3CIISLog. Supported local text and JSON log sources instead write to their configured custom tables, so search those tables rather than assuming all guest logs appear in Event or Syslog.

Trap Searching AzureDiagnostics for IIS logs collected by AMA, although the guest IIS source writes to W3CIISLog rather than the resource diagnostic-log path.

Log Analytics scope determines which records a query can evaluate

Opening Logs from a resource restricts analysis to that resource's records, potentially across several workspaces; opening a workspace exposes its authorized workspace data. Use workspace scope when you need explicit workspace() references or Basic and Auxiliary tables, which cannot be queried through resource-context scope. Workspace queries require query/read permissions such as those provided by Log Analytics Reader; broadening the selected scope does not grant additional access.

Trap Removing a where clause to recover other resources' records from a resource-scoped Logs session, which leaves the session scope unchanged.

2 questions test this
KQL pipelines filter source rows before downstream analysis

A KQL pipeline passes each operator's table output to the next operator, and table and column names are case-sensitive. Use where TimeGenerated > ago(1h) for a relative interval or between with datetime endpoints for a fixed interval, placing selective filters early to reduce subsequent work. A where clause after summarize filters the aggregated result rather than the original events, so its position changes the question being answered.

Trap Using project to restrict the event time range, which selects or computes columns rather than applying a row predicate.

2 questions test this
Project shapes the returned columns while extend preserves the existing row shape

Use project to select, rename, or calculate only the columns required in the result. Use extend to add a calculated column while keeping existing columns, such as a duration derived from two timestamps. Neither operator groups records, and a later operator can use only columns that the earlier pipeline has retained or created.

Trap Using summarize to add a per-event calculated duration while preserving every event, which collapses rows into aggregation groups.

2 questions test this
Summarize defines the population and statistic for each result row

KQL summarize produces one row per combination of its by columns, applying functions such as count(), countif(), sum(), and avg() to each group. For example, SecurityEvent | summarize count() by Account counts events for each account, while multiple grouping columns retain separate populations. Filter performance records to the relevant counter before averaging CounterValue, and use countif() when only matching rows should contribute to a count within an otherwise retained population.

Trap Using distinct Account to obtain the number of events per account, which lists unique values without their event frequencies.

2 questions test this

Use bin(TimeGenerated, 1h) in a summarize by clause to aggregate events into hourly intervals rather than a separate group for every timestamp. Include another grouping column when each resource needs its own trend, and select the interval that matches the investigation. Appending render timechart visualizes the prepared time-series result; rendering alone does not aggregate the input records.

Trap Sorting raw timestamps to create hourly counts, which orders individual events without forming time buckets.

2 questions test this
Top and sort are required when the order of log results matters

KQL take returns an arbitrary sample and does not establish recency or ranking. Use top 10 by TimeGenerated desc for the ten newest records, or sort by a column when all matching rows need an ordered view; descending is the default for top and sort. Use asc explicitly when the earliest or smallest values should appear first.

Trap Using take 10 on an unsorted log table to obtain the latest incidents, which makes no ordering guarantee.

3 questions test this
Explicit workspace references correlate distributed logs without moving the data

Use workspace() with a workspace GUID or full resource ID to address another workspace, and union to append records from several workspace-qualified tables. A single query can reference up to 100 Log Analytics workspaces or classic Application Insights resources and requires permission to the queried data. For workspace-based Application Insights, query its workspace data rather than using the classic app() model; adding resources to a saved scoping function does not automatically update an existing alert's validated resource scope.

Trap Creating another ingestion pipeline solely to compare logs that already exist in two accessible workspaces, which duplicates collection instead of querying both stores.

2 questions test this
Join flavor determines which correlated and unmatched records survive

KQL join matches rows by a common column or an explicit expression such as $left.Computer == $right.HostName. Use kind=inner for matching records, kind=leftouter to retain every left-side record, or kind=leftanti to find left-side records without a match. Specify the flavor deliberately because the default innerunique join deduplicates the left side before matching, which can remove repeated left-side events.

Trap Using union to enrich each event with matching host properties, which appends rows rather than matching their correlation keys.

2 questions test this
KQL string operators distinguish whole terms, substrings, and exact equality

Use has for a whole alphanumeric term and contains when a substring inside a larger term must match. Exact equality uses case-sensitive == or case-insensitive =~, while _cs variants make supported text operators case-sensitive. Prefer indexed term searches when their semantics fit: terms of at least three characters can use the term index, whereas contains scans column values.

Trap Using has to find an arbitrary interior fragment of a computer name, which searches term boundaries rather than every substring.

2 questions test this
Exported activity events identify who initiated a management operation and its related events

When investigating who changed an Azure resource, query AzureActivity after exporting the activity log to a Log Analytics workspace. Restrict the time and resource, inspect Caller, OperationNameValue, and ActivityStatusValue, and filter CorrelationId to connect events belonging to the same overall action. The activity log does not typically record read operations, so an absent read event is not evidence that nobody viewed the resource.

Trap Using AzureDiagnostics to identify the initiator of a resource-management change, although that table is the shared resource-log destination rather than the exported activity-log table.

An empty event population can still produce an aggregate result row

KQL summarize without a by clause returns one aggregate row even when its input is empty; summarize count() therefore returns a row containing zero. With grouping keys, empty input returns no rows. Count counts input rows, including rows with null-valued fields, whereas avg ignores null values in its calculation. When interpreting an aggregate query or alert, distinguish the number of result rows from the event count stored inside an aggregate column.

Trap Using returned-row count to detect events after an ungrouped summarize count(), although even an empty event population produces one result row.

Missing values require predicates that match the column's null or empty representation

Use isnull() or isnotnull() for nullable scalar fields and isempty() or isnotempty() for string fields when investigating missing log values. KQL strings do not support null values, so an absent string is normally represented by an empty string. A where operator retains only predicates that evaluate to true and discards those that evaluate to null; explicitly include isnull(Column) when a numeric threshold filter must also retain missing measurements.

Trap Using isnull() to locate absent string values, although string columns represent missing content as an empty string rather than a null scalar.

Sharing a log-query dashboard publishes its presentation but does not grant access to its data

Save a useful Log Analytics query for reuse, run it with a supported visualization such as render timechart, and use Pin to dashboard to add the result to an Azure dashboard. A new dashboard is private by default; publish it to a subscription and resource group, then assign the appropriate Azure RBAC access for its viewers or editors. Each tile still enforces access to the underlying resources and data, so dashboard access alone does not make a log query's results visible to every viewer.

Trap Granting Reader only on the published dashboard to authorize its log data, although the tile separately checks permissions for the underlying data.

The monitoring signal determines the appropriate alert rule type

Use a metric alert for an available numeric metric requiring little manipulation, a log search alert for a KQL-derived condition, and an activity log alert for a matching management or health event. Service Health and Resource Health alerts are activity log alert types, not guest-performance checks. Choose the data source before configuring thresholds so the rule evaluates the event or measurement that actually expresses the requirement.

Trap Using an activity log restart alert to detect high guest-memory utilization, which is not a control-plane operation event.

2 questions test this
Alert frequency, lookback, and condition logic control different parts of detection

An alert's evaluation frequency determines when it checks, while the lookback period determines the data interval aggregated at each check. Configure the aggregate and lookback to distinguish sustained pressure from brief spikes. Multiple conditions in a single-resource metric alert are combined with AND, so separate rules are appropriate when either independent condition must trigger an alert.

Trap Adding CPU and disk conditions to one metric rule for an either-condition requirement, which requires both conditions to be true together.

2 questions test this
Dynamic thresholds detect deviations from a learned baseline rather than a fixed limit

Use dynamic thresholds when normal metric levels vary and a fixed threshold would require repeated tuning. Detection requires at least three days and 30 samples, and learning weekly seasonality requires at least three weeks of history. Dynamic thresholds cannot be combined with multiple conditions in one rule and are less suitable for slow deterioration, so use a static threshold when a known operating ceiling must always be enforced.

Trap Choosing a learned anomaly threshold to enforce a contractual fixed maximum immediately on a new resource, which requires both history and deviation from normal behavior.

2 questions test this
Multi-resource metric alerts evaluate supported resources independently within a regional scope

For supported resource types, one metric alert can monitor resources of the same type in one region within a subscription, including a resource-group or subscription-based scope. Each resource is evaluated separately and generates its own alert. VM guest metrics and the documented VM network metrics do not support this multi-resource mechanism; use another supported collection and alerting path when a common rule must span those signals or multiple regions.

Trap Selecting every VM network-traffic metric in a multi-resource CPU-style alert, which assumes identical multi-resource support across VM metrics.

2 questions test this
Log search alerts can evaluate a result count or a numeric result separately for each resource

A log search alert can measure the number of returned rows or aggregate a numeric query column. Use row count for matching events and a numeric measure for values such as computed latency, choosing a query shape that represents the intended condition. Splitting on an Azure resource ID column creates resource-centric alerts for the qualifying resources; without an appropriate split, the result can describe the combined population, and additional dimension combinations increase monitored series and cost.

Trap Counting the single row returned by summarize avg(CounterValue) to test the average itself, which measures result cardinality instead of the numeric average.

2 questions test this
Stateful alerts suppress repeated firing until the monitored condition resolves

A stateful alert fires when its condition is met and does not fire new actions for that same ongoing condition until resolution. Metric alerts are stateful by default and resolve after three consecutive checks no longer meet their conditions. Stateless alerts can fire repeatedly as conditions are evaluated, and activity log alerts are event-driven and stateless, so their Fired monitor condition does not imply that a continuing fault remains unresolved.

Trap Duplicating a stateful rule to obtain periodic reminders, which creates independent alert instances instead of changing the original rule's notification behavior.

2 questions test this
An alert's user response is independent of its monitor condition

Azure Monitor sets the monitor condition, such as Fired or Resolved, from the rule's evaluation. A user separately sets New, Acknowledged, or Closed to record the handling of the alert, and that response stays unchanged until a user changes it. Use the monitor condition to assess the detected signal and the user response to track operational ownership and closure; fixing the resource does not itself set the response to Closed.

Trap Interpreting Closed as proof that an automated runbook corrected the resource, which confuses a human workflow marker with monitored health.

2 questions test this
Creating an alert requires access to its target, rule container, and associated action group

To create an Azure Monitor alert rule, the identity needs read access to the target, write access to the resource group containing the rule, and read access to an associated action group. Monitoring Contributor supports alert management within its assigned scope, while Monitoring Reader supports viewing. Check all involved scopes when the action group or rule container is elsewhere; permission on the monitored VM alone does not establish all three permissions.

Trap Granting Monitoring Reader on the target subscription to let an operator create rules, which supplies visibility without rule write permission.

2 questions test this
Alert instances expire after 30 days rather than being manually deleted

Azure Monitor retains alert instances for 30 days and then deletes them automatically; an administrator cannot manually delete an instance even after deleting its parent alert rule. Setting the user response to Closed changes handling status rather than erasing the instance. For a stateful alert, the service retains the ongoing condition beyond the visible instance's retention window until resolution, preventing a fresh firing merely because the old instance aged out.

Action groups are reusable response collections rather than ordered workflows

An action group contains notification recipients and automated actions and can be reused by multiple alert rules. A rule can invoke up to five action groups, which execute concurrently without a guaranteed order. Use a workflow or runbook when actions have dependencies instead of relying on the order of action group entries.

Trap Placing a prerequisite action in the first action group and its dependent action in the second, which provides no execution sequencing.

2 questions test this
Action group action types must match the receiving system's interface

Use an Automation Runbook action for operational remediation, an HTTP-triggered Function for a compatible function endpoint, or a Logic Apps action for an integration workflow. A webhook receiver must understand the emitted payload; use Logic Apps when an endpoint such as a Teams integration expects a different schema. The common alert schema standardizes supported alert payloads, and a secure webhook uses Microsoft Entra ID authentication rather than basic authentication.

Trap Sending an unchanged generic alert webhook directly to an endpoint with a different required schema, which omits the necessary payload transformation.

2 questions test this
Action group processing location is a separate choice from the monitored resource's region

A Global action group is persisted in at least two regions and can process actions across geographic regions. Select regional processing when the supported region must contain the action group's processing for a geographic-boundary requirement. Service Health alerts in public clouds require the action group's region to be Global, so a regional action group is not interchangeable for that use case.

Trap Selecting a regional action group solely because a Service Health incident affects that region, which violates the Service Health notification requirement.

2 questions test this
Alert processing rules can silence actions without removing the alert record

Use an alert processing rule with a one-time or recurring schedule to suppress action groups during maintenance while keeping fired alerts visible. Suppression removes the affected alert's action groups and does not replay those notifications when the maintenance window ends. An Apply action groups rule instead adds response groups to fired alerts, including supported service-generated alerts that have no editable alert rule of their own.

Trap Disabling every alert rule for a shared scope during maintenance on a subset of resources, which also prevents alert generation for resources outside that subset.

2 questions test this
Alert processing filters narrow a same-subscription resource scope with explicit Boolean logic

An alert processing rule can cover selected resources, resource groups, or its subscription, but not resources in a different subscription. Multiple filters are combined with AND, while up to five values within one filter are combined with OR. Combine severity, monitor service, and resource filters to target a precise population, and account for up to 30 minutes of propagation after creating or changing a rule; Service Health alerts are not affected by alert processing rules.

Trap Using one processing rule on a management group to cover all child subscriptions, which is outside the rule's supported same-subscription scope.

2 questions test this
Suppression takes priority over action-group addition for the same alert

When a fired alert matches both a suppression rule and an Apply action groups rule, suppression wins and none of that alert's action groups run. Use this precedence to layer a maintenance exception over an otherwise broad notification-routing rule. Narrow the suppression scope or filters when a critical resource must continue notifying; adding another action group does not create an exception to suppression.

Trap Creating a more specific Apply action groups rule to override a broad suppression rule, which is not a specificity-based precedence model.

2 questions test this
Role-based action-group email targets subscription role members through their Entra email addresses

Action groups can notify explicit email addresses, SMS or voice telephone recipients, and Azure mobile app users through push notifications. Use Email Azure Resource Manager Role to notify members of supported roles such as Owner or Monitoring Reader based on subscription-level assignments to users or groups. This receiver uses the user's configured Microsoft Entra profile email; a role assigned only at resource-group or individual-resource scope does not meet its subscription-assignment requirement.

Trap Assigning Monitoring Reader only on the monitored resource group to populate a role-email receiver, although that receiver selects subscription-level role members.

Action-group testing checks saved receivers independently of alert-rule detection

Save an action group, including any edits, before selecting Test; choose a sample alert type and the notification receivers or actions to exercise. Inspect Success or Failed and View details to diagnose delivery failures, then save corrections and retest. Where direct-email OTP enforcement is active, verify the address using the passcode within 30 minutes of saving, or resend an expired code; an unverified receiver cannot receive alert or test notifications. Email Azure Resource Manager Role receivers do not require this OTP verification.

Trap Changing an alert threshold to investigate a receiver delivery failure, although the action group's sample-payload test isolates delivery without relying on rule detection.

Action-group integrations depend on endpoint method, saved credentials, and supported network delivery

An action-group Function receiver must expose an HTTP trigger that accepts POST. The action saves the function endpoint and access key, so changing that key requires removing and recreating the Function action. When notification delivery must use Azure Private Link or a network security perimeter, choose the Event Hubs action, the documented action type supporting those network controls, rather than assuming a private Function or webhook endpoint is directly reachable.

Trap Selecting Secure webhook solely to reach a private receiver, although its Entra authentication does not supply the Private Link delivery support of the Event Hubs action.

VM host metrics identify overall load while guest monitoring explains operating-system pressure

Azure automatically collects VM host metrics such as CPU, disk I/O, network traffic, and availability without an agent. Detailed guest metrics and operating-system logs require enhanced monitoring and configured collection, so use guest evidence to investigate memory pressure or operating-system behavior that host data does not describe. Enabling VM monitoring in the portal installs Azure Monitor Agent and configures its required collection resources rather than making all guest data automatic by default.

Trap Using the VM activity log to identify an application process consuming memory, which records management operations instead of guest resource consumption.

2 questions test this
VM monitoring's metric experience determines its workspace and query path

The logs-based VM monitoring experience sends predefined performance data through the Microsoft-InsightsMetrics stream to a Log Analytics workspace, where it can be queried with KQL. The OpenTelemetry metrics experience stores metrics in an Azure Monitor workspace and uses PromQL. Guest logs use the Log Analytics path. Collect additional Windows events or Syslog with separate log-collection DCRs rather than modifying the predefined logs-based performance DCR.

Trap Selecting an Azure Monitor workspace as the destination for Windows event log tables, because guest log collection uses a Log Analytics workspace instead.

2 questions test this
Fleet monitoring needs both machine onboarding and the right collection associations

Use Azure Policy or supported infrastructure-as-code methods to enable VM monitoring consistently across an existing fleet and future machines. Azure VMs, scale sets, and Arc-enabled servers are supported monitoring targets, but machines outside Azure must first be connected through the Azure Connected Machine agent. If an agent is present without the expected data, inspect the machine's DCR associations and collection configuration rather than repeatedly installing another agent.

Trap Installing only Azure Monitor Agent on an unconnected on-premises machine through an Azure VM extension workflow, which lacks the Arc-managed resource prerequisite.

2 questions test this
Storage insights separates utilization, latency, failures, and availability investigations

Storage insights uses automatically collected storage metrics, so its baseline performance and capacity views need no agent or diagnostic-log enablement. Use Capacity to investigate service-specific space consumption, Performance to compare latency, and Failures to break down transactions by API and response type. The multi-account view supports up to 200 selected accounts, so an account missing from that view can reflect its display limit rather than absent metric collection.

Trap Enabling request logs as a prerequisite for the baseline storage-capacity workbook, which already uses platform metrics collected by default.

2 questions test this
Storage performance diagnosis compares service latency with end-to-end latency and response categories

Storage insights exposes Success E2E Latency and Success Server Latency together so you can distinguish successful-request processing time inside the storage service from additional network time included in end-to-end latency. Drill into the Performance workbook by API when latency rises, and into Failures by ResponseType when throttling or other error categories rise. Comparing these dimensions is more informative than treating an account-wide average or a single error count as a complete diagnosis, and successful-request latency alone does not describe failed requests.

Trap Scaling storage immediately from a high end-to-end latency value alone, which does not isolate time spent inside the storage service.

2 questions test this
Insights workbook thresholds customize presentation rather than defining notification rules

Storage insights workbooks can be edited and saved as custom workbooks to change metrics, colors, scope, and availability thresholds without overwriting the published default. Its default availability visualization uses 99 percent for warning and 90 percent for critical; change those visual thresholds to match reporting needs. Configure Azure Monitor alert rules separately when those conditions must trigger notifications, and pin workbook sections to a dashboard for shared visibility.

Trap Changing a workbook's critical color threshold to create an operational alert, which changes rendering rather than an alert rule condition.

2 questions test this
Network insights combines an automatic inventory view with separately configured connectivity evidence

Network insights provides topology, resource health, metrics, and alert views for deployed network resources without baseline configuration. Use topology to inspect relationships across subscriptions, resource groups, and regions, then drill into an unhealthy resource or its diagnostic tools. Its Connectivity view visualizes configured Connection monitor tests, while traffic analysis depends on configured flow logging; the overview itself does not create those tests or traffic records.

Trap Opening the Network insights overview to retrospectively obtain unconfigured packet-flow history, which does not enable traffic collection.

3 questions test this
Network Watcher is enabled per subscription and region rather than per virtual network

A subscription can have one Network Watcher instance per region, enabling its regional diagnostic capabilities. Creating or updating a virtual network normally enables Network Watcher automatically in that region unless automatic enablement was previously opted out. Check regional enablement when a diagnostic capability is unavailable, and distinguish the no-charge act of enabling the service from separately charged capabilities such as traffic processing.

Trap Creating another Network Watcher instance for each VNet in one region, which exceeds the service's per-region instance model.

2 questions test this
IP flow verify evaluates whether security filtering allows a specified VM flow

Use IP flow verify to evaluate a specified inbound or outbound VM packet by addresses, ports, and TCP or UDP protocol. It returns an allow or deny result and the security rule responsible, making it a direct way to test suspected traffic filtering without collecting historical logs. A successful filtering verdict still needs to be reconciled with routing and application reachability when the connection itself fails.

Trap Starting packet capture to obtain the name of the denying NSG rule, which records traffic rather than directly returning the security-rule evaluation.

2 questions test this
NSG diagnostics evaluates a flow while effective security rules exposes the applied rule sets

Use NSG diagnostics for a filtering evaluation on supported VMs, scale sets, or application gateways, including criteria expressed as an IP prefix or service tag. It also supports ICMP filtering checks, which IP flow verify does not. Use Effective security rules when you need the rules applied to a NIC, its subnet, and their combined view rather than a single traffic verdict; choose the tool based on the supported target, protocol, and whether the requirement is evaluation or configuration inspection.

Trap Inspecting only the NSG attached directly to a NIC to establish its complete applied rule set, which leaves out the subnet's NSG.

2 questions test this
Next hop diagnoses the selected route rather than security filtering

Use Network Watcher Next hop to determine the next-hop type, next-hop IP, and route table used for traffic from a VM to a destination address. Compare that result with the intended appliance, gateway, or direct path when investigating a routing problem. Correct routing evidence does not establish that security rules or the destination service will accept the traffic, so follow it with the relevant filtering or connection test.

Trap Using IP flow verify to prove that a user-defined route selected the intended appliance, which evaluates packet filtering rather than route selection.

2 questions test this
Connection troubleshoot tests current reachability and exposes more than an NSG verdict

Use Connection troubleshoot for a point-in-time connection test from a supported source such as a VM, scale set, application gateway, or Bastion host to a supported destination such as an FQDN, URI, VM, or IPv4 address. Its connection evidence helps investigate a failure that is not explained by a single security-rule check. Use Connection monitor instead when the requirement is a continuing record of reachability and latency over time.

Trap Configuring continuous monitoring solely to run a one-off reachability investigation, which introduces a persistent test resource where an immediate diagnostic test suffices.

2 questions test this
Packet capture provides packet-level evidence and requires an enabled capture path

Network Watcher packet capture records traffic to or from a VM or scale set and requires the AzureNetworkWatcherExtension agent. Use its recorded packet evidence when flow summaries do not explain a protocol exchange, with captures saved locally or to blob storage. Storage upload uses SAS authorization and requires storage-account key access; if key access is disabled, the supported capture destination is the VM's local disk.

Trap Granting a user a blob data role alone to repair capture upload to an account with key access disabled, which does not enable the capture service's SAS authorization path.

2 questions test this
VPN troubleshoot diagnoses supported gateways and tunnel connections rather than arbitrary network paths

Use Network Watcher VPN troubleshoot for supported route-based VPN gateways and IPsec or VNet-to-VNet connections, not ExpressRoute, policy-based gateways, or VPN-client connections. Its results identify issues such as shared-key authentication failure, peer reachability, or IKE policy mismatch and can provide diagnostic files in a storage account. Only one operation can run at a time per subscription; the CLI also requires the gateway and storage account in the same resource group, while the portal or PowerShell supports the documented alternative arrangement.

Trap Running VPN troubleshoot on an ExpressRoute connection because both use a virtual network gateway, which exceeds the tool's supported gateway and connection types.

2 questions test this
Packet-capture filters and limits select relevant evidence before it is recorded

Configure Network Watcher packet-capture filters using protocol, local and remote IP addresses, and local and remote ports to select the traffic under investigation. Protocol choices are TCP, UDP, or All, and local versus remote describes the captured machine's side versus its peer. Set maximum bytes per packet and the session time limit to bound evidence volume; leaving maximum bytes blank captures all packet bytes, so preserve enough data for the intended analysis.

Trap Applying a destination-only filter as the local address for an outbound client capture, although local identifies the captured machine rather than the remote service.

Triggered and continuous captures preserve different evidence for intermittent incidents

Use an alert-triggered Network Watcher packet capture to collect packet evidence when a VM alert occurs. For an intermittent issue needing recent traffic before discovery, supported continuous packet capture uses a ring buffer with configurable file size and file count, deleting the oldest file when the count limit is reached. The continuous feature is in preview and runs for the selected duration up to seven days; choose its buffer limits to retain useful recent evidence rather than expecting unlimited history. Connection monitor supplies synthetic connectivity probes, not this rotating record of actual packets.

Trap Using scheduled Connection monitor tests to retrieve packets exchanged before an intermittent failure, although probes measure connectivity rather than retain those packets.

Connection monitor requires collection capability at the source but not every destination

An Azure VM or scale-set source uses the Network Watcher extension for Connection monitor tests. On-premises source hosts must be Azure Arc-enabled and use the supported Azure Monitor Agent path; an agentless on-premises endpoint can still be a destination. Destinations can also be URLs, FQDNs, or IP addresses and do not require the Network Watcher extension, allowing reachability monitoring of services you do not administer.

Trap Deploying monitoring extensions to a public website before testing it as a destination, which is unnecessary because the source sends the probes.

2 questions test this
Connection monitor test groups combine endpoint selections with reusable protocol settings

A Connection monitor test configuration defines protocol, port where applicable, frequency, and thresholds for HTTP, TCP, or ICMP checks. A test group combines sources, destinations, and configurations, producing an individual test for each source-destination-configuration combination. Separate groups when different endpoint sets require different test behavior; limits include 20 test groups and 20 test configurations per monitor and 100 monitors per subscription per region.

Trap Adding a UDP test configuration for continuous Connection monitor probes, which are based on HTTP, TCP, or ICMP.

2 questions test this
Connection monitor distinguishes failed probes, slow probes, and missing telemetry

Connection monitor evaluates failed-check percentage and round-trip time against configured thresholds; HTTP checks also evaluate accepted response codes. A test can fail when either configured threshold is exceeded, while Indeterminate indicates missing Log Analytics data and warrants checking metrics and collection before concluding that the path is down. Without explicit thresholds, 100 percent failed checks causes Fail, while the documented warning defaults include 10 percent failed checks and 750 milliseconds RTT for TCP or ICMP.

Trap Treating Indeterminate as a measured 100-percent packet-loss result, which substitutes a failed-probe measurement for missing data.

2 questions test this
Connection monitor supplies metric and log evidence with different troubleshooting uses

Connection monitor publishes ChecksFailedPercent and RoundTripTimeMs to Azure Monitor and detailed monitoring data to Log Analytics. Use metrics for threshold alerts and logs or topology for deeper path analysis. Endpoint status is reevaluated on a 24-hour cycle, so a deallocated VM or scaled-down selected instance can temporarily appear Indeterminate; choose representative scale-set coverage rather than relying on fixed instances that may disappear.

Trap Editing network routes immediately after a selected scale-set instance disappears from monitoring, which does not address a stale endpoint selection or missing source data.

2 questions test this
Virtual network flow logs record traffic summaries rather than packet contents

Virtual network flow logs collect Layer 4 IP-flow records through the platform at one-minute intervals and write JSON data to Azure Storage. Records identify the flow's address-and-port tuple, direction, state, applicable rules, throughput, and encryption state, supporting traffic-history and compliance investigations without a VM capture agent. They do not provide the payload-level evidence needed to reconstruct an application's protocol conversation.

Trap Selecting flow logs to inspect the contents of an application request, which are outside a Layer 4 flow-summary record.

2 questions test this
New traffic logging should use virtual network flow logs and avoid overlapping legacy collection

New NSG flow log creation is no longer supported, and existing NSG flow logs retire on September 30, 2027, so use virtual network flow logs for new deployments. Disable overlapping legacy NSG flow logging when enabling VNet flow logs on the same workloads to avoid duplicate recording and additional costs. Retirement removes the legacy flow-log resources but does not erase already stored records, which continue under their configured storage retention policies.

Trap Keeping both legacy NSG logging and VNet logging enabled on the same traffic as a cost-free migration safety measure, which can double-record flows.

Traffic analytics turns stored flow data into network-wide usage and security views

Traffic analytics analyzes Network Watcher flow logs and enriches them with topology, security, and geographic context, using a Log Analytics workspace for analysis. Use it to identify top communicating hosts, blocked flows, internet exposure, and traffic distribution rather than repeatedly inspecting raw JSON. Configure flow logging and the analytics workspace as part of the pipeline; if a flow-log region lacks a supported local analytics workspace, a workspace in another supported region can be used.

Trap Using Connection monitor's synthetic test results as the complete record of actual application traffic volume, which measures probes rather than all real flows.

2 questions test this
Virtual network flow logging has storage eligibility and workload coverage boundaries

A VNet flow-log storage account must use the Standard performance tier and be in the VNet's region, either in its subscription or another subscription associated with the same Microsoft Entra tenant. Logging at VNet scope covers supported workloads, not every service integrated with that network. App Service, Azure Container Instances, and Azure Container Apps are among the unsupported services, so their missing flow records do not by themselves establish a collector failure.

Also tested in

References

  1. https://learn.microsoft.com/en-us/azure/azure-monitor/vm/data-collection
  2. https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-104
  3. https://learn.microsoft.com/en-us/azure/network-watcher/network-watcher-overview
  4. https://learn.microsoft.com/en-us/azure/virtual-network/network-security-groups-overview
  5. https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-udr-overview
  6. https://learn.microsoft.com/en-us/azure/backup/configure-reports
  7. https://learn.microsoft.com/en-us/azure/backup/backup-azure-monitoring-alerts
  8. https://learn.microsoft.com/en-us/azure/azure-monitor/metrics/metrics-aggregation-explained
  9. https://learn.microsoft.com/en-us/azure/azure-monitor/data-collection/diagnostic-settings
  10. https://learn.microsoft.com/en-us/azure/azure-monitor/metrics/analyze-metrics
  11. https://learn.microsoft.com/en-us/azure/azure-monitor/fundamentals/activity-log
  12. https://learn.microsoft.com/en-us/azure/azure-monitor/vm/vminsights-overview
  13. https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-storage-storageaccounts-blobservices-metrics
  14. https://learn.microsoft.com/en-us/azure/azure-monitor/metrics/data-platform-metrics
  15. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-types
  16. https://learn.microsoft.com/en-us/azure/azure-monitor/logs/resource-logs
  17. https://learn.microsoft.com/en-us/azure/storage/common/storage-network-security-trusted-azure-services
  18. https://learn.microsoft.com/en-us/azure/azure-monitor/data-collection/data-collection-rule-overview
  19. https://learn.microsoft.com/en-us/azure/azure-monitor/agents/diagnostics-extension-overview
  20. https://learn.microsoft.com/en-us/azure/azure-monitor/agents/azure-monitor-agent-manage
  21. https://learn.microsoft.com/en-us/azure/azure-monitor/vm/data-collection-performance
  22. https://learn.microsoft.com/en-us/azure/azure-monitor/vm/vm-enable-monitoring
  23. https://learn.microsoft.com/en-us/azure/sentinel/connect-cef-syslog-ama
  24. https://learn.microsoft.com/en-us/azure/azure-monitor/data-collection/data-collection-endpoint-overview
  25. https://learn.microsoft.com/en-us/azure/azure-monitor/logs/logs-table-plans
  26. https://learn.microsoft.com/en-us/azure/azure-monitor/logs/cross-workspace-query
  27. https://learn.microsoft.com/en-us/azure/azure-monitor/logs/data-retention-configure
  28. https://learn.microsoft.com/en-us/azure/azure-monitor/logs/daily-cap
  29. https://learn.microsoft.com/en-us/azure/azure-monitor/logs/scope
  30. https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview
  31. https://learn.microsoft.com/en-us/azure/azure-monitor/logs/get-started-queries
  32. https://learn.microsoft.com/en-us/kusto/query/where-operator?view=azure-monitor
  33. https://learn.microsoft.com/en-us/kusto/query/datatypes-string-operators
  34. https://learn.microsoft.com/en-us/kusto/query/scalar-data-types/null-values
  35. https://learn.microsoft.com/en-us/kusto/query/render-operator
  36. https://learn.microsoft.com/en-us/azure/azure-monitor/visualize/tutorial-logs-dashboards
  37. https://learn.microsoft.com/en-us/kusto/query/scalar-data-types/timespan
  38. https://learn.microsoft.com/en-us/kusto/query/summarize-operator?view=azure-monitor
  39. https://learn.microsoft.com/en-us/kusto/query/join-operator
  40. https://learn.microsoft.com/en-us/azure/azure-monitor/reference/tables/azureactivity
  41. https://learn.microsoft.com/en-us/azure/azure-portal/azure-portal-dashboard-share-access
  42. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-overview
  43. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-create-metric-alert-rule
  44. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-dynamic-thresholds
  45. https://learn.microsoft.com/en-us/azure/role-based-access-control/role-assignments-cli
  46. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-manage-alert-instances
  47. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/action-groups
  48. https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-processing-rules
  49. https://learn.microsoft.com/en-us/azure/azure-monitor/vm/vminsights-enable-policy
  50. https://learn.microsoft.com/en-us/azure/azure-monitor/insights/storage-insights-overview
  51. https://learn.microsoft.com/en-us/azure/azure-monitor/insights/network-insights-overview
  52. https://learn.microsoft.com/en-us/azure/network-watcher/ip-flow-verify-overview
  53. https://learn.microsoft.com/en-us/azure/network-watcher/connection-monitor-overview
  54. https://learn.microsoft.com/en-us/azure/network-watcher/packet-capture-overview
  55. https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview
  56. https://learn.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage
  57. https://learn.microsoft.com/en-us/azure/network-watcher/vpn-troubleshoot-overview
  58. https://learn.microsoft.com/en-us/azure/network-watcher/vnet-flow-logs-overview
  59. https://learn.microsoft.com/en-us/azure/network-watcher/traffic-analytics