0

I am trying to fetch underutilized computers in Azure. I am trying to use OMS Log Analytics query for this.

The query returns the Azure VMs and on-premise servers as well (fetched via SCOM or direct agent). I need to filter the result to get only the Azure VMs. What is the best way (or query) to fetch only Azure computers in OMS Log Analytics Search Query?

I know that I need to create a Computer Group and then use that Computer Group in my Query as shown below.

Type=Perf ObjectName=Processor CounterName="% Processor Time" Computer IN $ComputerGroups[AzureComputers]

I need to know what Query should I use to create the Computer Group "AzureComputers" which is used in the above query.This computer group will contain only computers which are present in Azure i.e. which are Azure VMs.

Md Farid Uddin Kiron
  • 16,817
  • 3
  • 17
  • 43
Aman Sharma
  • 1,930
  • 1
  • 17
  • 31
  • pretty sure this has nothing to do with stackoverflow – 4c74356b41 Feb 01 '17 at 08:09
  • @4c74356b41 It is related to Azure tag. I have asked similar questions, related to azure tag here before as well. Why do you think it is not related to StackOverflow. I can post this in a different forum if you still think this does not belong here and knows a more appropriate forum for this. I see similar questions on StackOverflow here: http://stackoverflow.com/questions/tagged/azure – Aman Sharma Feb 02 '17 at 01:58

1 Answers1

0

This feature is now provided out of the box in OMS Log Analytics. Finding Azure computers is as easy as running below query in Log Analytics:  

Heartbeat | where ComputerEnvironment == "Azure" and notempty(ResourceId) | distinct Computer
Aman Sharma
  • 1,930
  • 1
  • 17
  • 31