liveBook · Manning

Kusto Query Language

As explained in Microsoft Azure in Action

Kusto Query Language is a query language for retrieving and analyzing telemetry, log, and time-series data in Azure and other Microsoft services.

Kusto Query Language (KQL) turns the mountain of telemetry in Azure Log Analytics into something you can investigate. It helps filter, correlate, and summarize logs from virtual machines, applications, and operating systems—rather like giving a detective a very fast flashlight. section 3.6.2 section 3.8

A practical KQL workflow looks like this:

  • Send useful diagnostics—performance counters, event logs, heartbeat signals, and custom application logs—to a Log Analytics workspace. section 3.6.2 section 3.7.1
  • Filter records by time or condition, then project the fields that answer the question. section 3.6.2 section 3.7.1
  • Summarize and correlate results across sources, such as heartbeat data, system events, syslog, and Azure Activity Log entries. section 3.6.2 section 3.7.1
  • Turn useful queries into dashboards, workbooks, alerts, or automated actions instead of repeatedly searching by hand. section 3.6.2 section 3.7.1

Finding recently active virtual machines

Run `Heartbeat | where TimeGenerated > ago(1h) | summarize count() by Computer` to count heartbeat records for each VM during the past hour. To investigate an unexpected restart, compare the last heartbeat with Windows event logs, Linux syslog entries, and Azure activity around the same timestamp. section 3.6.2 section 3.7.1

Heartbeat
| where TimeGenerated > ago(1h)
| summarize count() by Computer

Inspect the compact heartbeat query and see how a table, time filter, and summary combine into a useful VM check. section 3.6.2

How Microsoft Azure in Action covers it

How deep it goes
Explains filtering, correlation, summarization, projection, and reusable dashboards through practical VM investigations rather than language internals.
Examples
Demonstrates heartbeat queries, VM availability checks, reboot-event searches, syslog searches, and activity-log correlation.
What it assumes
Assumes logs are collected in a Log Analytics workspace while teaching basic KQL through simple heartbeat and troubleshooting queries.
What you can do after
Diagnose VM availability, reboots, failed deployments, and related operational problems by querying and correlating collected logs.
How it connects
Connects KQL with Azure Monitor, Log Analytics, workbooks, telemetry, alerts, Activity Log, event logs, and syslog.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microsoft Azure in Action. The section links point to the parts of the book it draws on.