Articles → MICROSOFT AZURE → Computer Groups In Azure Log Analytics

Computer Groups In Azure Log Analytics






Purpose





Steps




  1. Create 3 virtual machines
  2. Create a log analytic workspace
  3. Create and save the query
  4. Execute the query using computer groups



Create 3 Virtual Machines




Picture showing the virtual machines created in Azure portal
Click to Enlarge


Create A Log Analytic Workspace





Create And Save The Query




Heartbeat
| where Computer == "vm1" or Computer == "vm2"
| distinct  Computer






Picture showing the Save as function option for saving the query as function
Click to Enlarge



Field Value
Function namevm12CG (or any custom name)
Legacy categoryvirtualmachines
Save as computer groupchecked


Picture showing the Save as function section for saving query as function
Click to Enlarge



Picture showing the Computer Groups section in log analytics
Click to Enlarge


Execute The Query Using Computer Groups




Heartbeat
| where Computer in (vm12CG)




Picture showing querying the log analytics using computer group
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Thursday, July 7, 2022

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250