Articles → MICROSOFT AZURE → Query The Log Analytics Workspace In Azure

Query The Log Analytics Workspace In Azure






Different Components To Query Log Analytics Workspace


ComponentPurpose
Azure Monitor Agent (AMA)The worker who collects data on your Virtual Machine.
Data Collection Rule (DCR)The instructions given to the agent (what to collect, where to send).
Log Analytics WorkspaceThe destination where the agent sends the data.
Log Analytics (KQL)Used to analyse collected telemetry and log data.



Create A Virtual Machine




Picture showing the virtual machine created in the Azure portal



Create An Azure Monitor Service




Picture showing searching the Monitor service in Azure portal




Picture showing the VM insights section of the Monitor service




Picture showing a button to configure insights




Picture showing enable button for enabling insight for the virtual machine




Picture showing enable button for enabling insight for the virtual machine




Picture showing a screen to map Subscription and data collection rule





Query Database




Heartbeat
| where TimeGenerated > ago(1m)
| where Computer == "vm1"
| summarize LatestHeartbeat=max(TimeGenerated) by Computer


Picture showing the output of querying the log analytics database



Posted By  -  Karan Gupta
 
Posted On  -  Thursday, June 9, 2022
 
Updated On  -  Tuesday, May 20, 2025

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250