🎉 75% of content is free forever — Unlock Premium from $10/mo →
CW
NEWSLIVESearch All Content
đŸ’ŧ Servicesâ„šī¸ Aboutâœ‰ī¸ ContactView Pricing Plansfrom $10

Azure Data Platform Monitoring: KQL, Alerts, Workbooks

Azure Data EngineeringMonitoring⭐ Premium

Monitoring a data platform is not the same as watching a dashboard. A pipeline can be green for six hours while producing nothing, a SQL pool can be healthy while a query waits behind a blocked session, and storage can accept writes long after the feed that should have produced them stopped. Useful monitoring answers specific questions about freshness, correctness, and cost, and it does so before a business user notices.

In this lesson you will learn how to:

  • Turn on the telemetry that Azure actually emits for data services.
  • Write KQL that surfaces failures and slowdowns in seconds.
  • Design alert rules with severity and thresholds that do not train people to ignore them.
  • Assemble a workbook that becomes the daily operating view.

Prerequisites

  • !Azure Monitor basics
  • !ADF pipelines and Synapse pools
  • !Comfort reading Kusto Query Language

Metrics and logs answer different questions

Azure Monitor exposes two primary telemetry types, and choosing the wrong one wastes hours. Metrics are numeric time series sampled continuously: pipeline run counts, storage capacity, CPU percentage, DWU consumption. They support near real-time alerting because each sample is cheap and already aggregated.

Logs are discrete event records with context: the pipeline activity name that failed, the error message, the SQL text of a slow request, the identity that performed a read. Logs answer why, metrics answer whether. Alert on metrics for speed, then pivot into logs for diagnosis, because a log-only alert arrives late and a metric-only alert arrives without a cause.

Traces matter for distributed pipelines. When a run fans out into Databricks notebooks, copy activities, and stored procedures, correlation ids let you follow a single execution across services rather than guessing from timestamps that happen to be close together.

TelemetryExampleLatencyBest alert use
MetricFailed pipeline runs per minuteSecondsPaging on threshold breach
LogActivity error text and stackMinutesDiagnosis after an alert
TraceCorrelated run id across servicesMinutesRoot cause in complex flows
UsageWorkspace ingestion volumeHoursCost control and retention

Turning telemetry on: diagnostic settings first

Nothing is queryable until a diagnostic setting routes it. For each data factory, Synapse workspace, storage account, Key Vault, and Databricks workspace, create a diagnostic setting that sends resource logs to a Log Analytics workspace. Platform metrics are available without this step, but the logs that explain failures are not.

Two decisions matter here. First, choose categories deliberately; enabling every category on a chatty storage account inflates ingestion cost without adding insight. Second, decide the retention in the workspace: long enough to satisfy audit requirements, short enough that the bill stays predictable. Archive to a storage account if compliance demands seven years, since keeping seven years of logs in Log Analytics rarely makes financial sense.

Once routing is in place, verify with a simple query that the categories you expect are actually arriving. A missing category looks exactly like "no problems occurred", which is the most dangerous state a monitoring system can be in.

KQL that finds problems in seconds

The queries you will reuse most are the ones that summarize runs, surface slow warehouse requests, and confirm that storage is growing as expected.

AzureDiagnostics
| where ResourceProvider == "MICROSOFT.DATAFACTORY"
| where Category == "PipelineRuns"
| summarize
    total = count(),
    succeeded = countif(Status_s == "Succeeded"),
    failed = countif(Status_s == "Failed")
    by bin(TimeGenerated, 1h)
| extend failureRate = round(100.0 * failed / total, 2)
| order by TimeGenerated desc

AzureDiagnostics
| where ResourceProvider == "MICROSOFT.SYNAPSE"
| where Category == "SQLRequest"
| where DurationMs_d > 1000
| project TimeGenerated, QueryText_s, DurationMs_d, User_s
| order by DurationMs_d desc
| take 25

AzureMetrics
| where MetricName == "UsedCapacity"
| summarize avgGB = avg(Average) / 1073741824 by bin(TimeGenerated, 1d)

Note the shape: filter first, aggregate per time bucket, then compute a rate. Ratios travel better across teams than raw counts, because a hundred failures at three in the morning means something different when the hourly total is one hundred versus one million.

Alert rules with severity that means something

An alert rule binds a condition to an action group. The condition should be a metric or a log query with a threshold; the action group decides who is notified and what runs automatically.

{
  "properties": {
    "displayName": "ADF pipeline failure rate above 5 percent",
    "severity": 2,
    "enabled": true,
    "evaluationFrequency": "PT5M",
    "windowSize": "PT15M",
    "criteria": {
      "allOf": [
        {
          "metricNamespace": "Microsoft.DataFactory/factories",
          "metricName": "PipelineRunFailed",
          "operator": "GreaterThan",
          "threshold": 3,
          "timeAggregation": "Count"
        }
      ]
    },
    "actions": {
      "actionGroups": [
        "/subscriptions/xxx/resourceGroups/rg/providers/Microsoft.Insights/actionGroups/ag-data-oncall"
      ]
    }
  }
}

Treat severity as a contract. Severity zero pages someone immediately; severity two goes to a working channel; severity four is a weekly review. If everything is critical, nothing is, and within a month the team has disabled notifications. Start thresholds conservatively, measure the false-positive rate for two weeks, then tighten.

The workbook that becomes the daily view

Alerting tells you something broke. A workbook tells you whether the platform is healthy overall, and it is the artifact that replaces a dozen scattered blades. Build one Azure Monitor workbook with tiles for pipeline success rate over the last twenty-four hours, data freshness by critical dataset, DWU or cluster utilization, ingestion volume, and open alerts.

Attach it to the team channel and review it at the start of each day. When a tile moves the wrong way, the workbook should link directly into the KQL query behind it so investigation starts from evidence rather than from a fresh hunt.

Monitoring also has to cover data volume and spend, not only failures. Chart storage growth, scan volume, and the cost of the analytics pools, and set an alert on anomaly rather than on a fixed number. A platform that is reliable but surprises finance every month eventually gets a mandate to cut spend, usually in the least thoughtful way possible.

Signals specific to Spark and storage

Databricks emits telemetry that generic platform alerts miss. Track cluster lifecycle events, the ratio of idle to active time, and DBU consumption per job. A cluster that stays alive between runs quietly costs money every hour, while a job that repeatedly starts a fresh cluster is paying a startup penalty on every execution. Both patterns show up clearly in a per-job cost view.

For storage, monitor container growth against expected ingestion and watch for small-file accumulation, which shows up as rising file counts with flat capacity. Small files are a leading indicator of slow queries downstream, so an alert on file count per partition gives you warning before anyone complains about a dashboard timing out.

The same reasoning applies to log and telemetry ingestion itself. If workspace volume jumps thirty percent without a matching change in traffic, something is logging more verbosely than before. Catching that early protects the budget that pays for the rest of the monitoring stack.

Common Mistakes

Leaving diagnostic settings unconfigured and assuming logs exist

Fix: Create a diagnostic setting per data service and verify each category with a test query.

Paging on every single pipeline failure

Fix: Alert on failure rate over a window, assign severity honestly, and tune after two weeks of data.

Keeping all logs in Log Analytics for years

Fix: Route long-term retention to a storage account archive and keep only recent windows queryable.

Monitoring uptime while ignoring data freshness

Fix: Add a freshness tile per critical dataset so a silent feed failure is visible within one cycle.

Best Practices

  • Name alert rules after the impact they predict, not the resource they touch
  • Compute rates and percentages so thresholds survive volume growth
  • Keep one workbook as the canonical operating view for the team
  • Verify telemetry presence with a heartbeat query after every change
  • Review alert noise monthly and delete rules nobody acts on

Questions interviewers ask about monitoring

đŸŽ¯Interview Tip

A frequent question asks how you would detect a pipeline that succeeds but processes nothing. The answer combines a row-count metric or log from the activity with a freshness check on the target partition, then an alert on zero rows or on missing partition rather than on run status.

Interview Questions

Q1: What should you monitor for a data engineering platform?

Pipeline success and failure rates, row volumes per load, data freshness by dataset, query duration distributions, storage and compute utilization, cost trends, and alert noise. Freshness and volume catch the silent failures that run status misses.

Q2: How do metrics differ from logs in Azure Monitor?

Metrics are numeric time series sampled continuously and available within seconds, so they suit threshold alerting. Logs are detailed event records with context such as error text or SQL statements, so they suit investigation. Use both, with metrics triggering and logs explaining.

Q3: How would you implement end-to-end monitoring for an ADF pipeline?

Enable diagnostic settings, send pipeline and activity logs to Log Analytics, publish row counts and durations from each activity, build a KQL failure-rate query, attach an alert rule to it, and surface the result in a shared workbook with a freshness tile.

Q4: How do you keep alerts from becoming noise?

Alert on rates over windows rather than single events, assign severity by customer impact, review false positives on a fixed cadence, and retire rules that never produce action. Noise that is tolerated is equivalent to no monitoring at all.

Key Takeaways

  • Diagnostic settings must exist before any log-based monitoring can work
  • Metrics trigger fast, logs explain the cause, traces connect the pieces
  • Rate-based thresholds with honest severity keep alerts trustworthy
  • A single workbook beats a folder of scattered blades
  • Freshness and row volume catch silent failures that run status misses
  • Long-term log retention belongs in archive storage, not in the query workspace
🔒

Premium Content

Azure Data Platform Monitoring: KQL, Alerts, Workbooks

You've previewed the first section. Unlock this full lesson and 900+ advanced tutorials with a Premium plan.

đŸŽ¯End-to-end Projects
đŸ’ŧInterview Prep
📜Certificates
🤝Community Access

Already a member? Log in

CW

ChatWhole Learn Editorial Team

Written by experienced data scientists, software engineers, and educators. All content is reviewed by industry professionals to ensure accuracy and relevance.

Last reviewed: 2026-10-12

—
☆☆☆☆☆
0 ratings

Rate & Feedback

Advertisement