liveBook · Manning

Log

As explained in Microsoft Azure in Action

Logging is the practice of recording system or application events and diagnostic information.

Logs record events and diagnostic details, helping explain why something happened; metrics show what is happening. They support troubleshooting, auditing, and understanding VM activity. section 3.7

Azure VM logs offer different views:

  • Activity logs record control-plane actions, such as starting a VM or changing permissions. section 3.7
  • Diagnostic logs capture data from within the VM, including system, application, and performance data when diagnostics are enabled. section 3.7
  • Guest logs come from the operating system, such as Windows Event Logs or Linux syslog, and help investigate OS and application problems. section 3.7

Collect the logs you need, send them to a Log Analytics workspace, and use Kusto Query Language (KQL) to search and correlate records. Queries can support alerts, dashboards, or automated actions. For an unexpected VM restart, compare heartbeat gaps with OS events and Azure activity around the same time. section 3.7.1 section 3.6.2

Heartbeat
| where TimeGenerated > ago(24h)
| summarize LastSeen=max(TimeGenerated) by Computer

This query finds each VM’s most recent heartbeat in the past 24 hours; a gap may indicate a restart. section 3.7.1

Logs can also preserve AI model provenance and explanatory details, letting teams investigate how a prediction or recommendation was produced. section 7.5.2

How Microsoft Azure in Action covers it

How deep it goes
Distinguishes VM log types and demonstrates centralized queries for investigating unexpected restarts.
Examples
Uses VM heartbeat gaps, Windows Event Logs, Linux syslog, Azure activity records, and logged recommendation rationales.
What it assumes
Enables VM diagnostics and forwards logs to a Log Analytics workspace before querying them.
What you can do after
Diagnose unexpected VM restarts by correlating heartbeat, operating-system, and activity records.
How it connects
Connects logs with Azure Monitor, Log Analytics, Kusto Query Language, metrics, alerts, and model explainability.

Also explained in

Compare how 14 books explain log →

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.