SOLVED

Unable to Get ComputerGroups to Work

Copper Contributor

Hello Community

 

I have tried many suggestions to run a query on ComputerGroups. I have used the link here to assist

 

https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-computer-groups

 

I have successfully created a group using the command:

 

Heartbeat | where Computer contains "testvm" | distinct Computer

 

The computergroup name is called computergroupv1, and the alias is called aliasv2

 

When I run the following query:

 

Perf | where Computer in (computergroupv1) I get the following error:
 
'where' operator: Failed to resolve table or column or scalar expression named 'computergroupv1'
 
I get the same error when I run:
 
Perf | where Computer in (aliasv2)
 
Carlton

 

 

 

 

2 Replies
OK, it seems like the Log Analytics needs some time to propagate because the following works:

Perf | where Computer in (aliasv2)

However, the following won't bring any results:

Perf
| where CounterName == "% Processor Time"
| where Computer in ("aliasv2")

Can you let me know what I might be doing wrong?

Cheers
best response confirmed by Stanislav Zhelyazkov (MVP)
Solution

Hi,
First you can only use the alias in the queries and not the name. You might need to refresh the poral before you can start using the alias via the UI.
I think you do not need the quotes:

 

Perf
| where CounterName == "% Processor Time"
| where Computer in (aliasv2)
1 best response

Accepted Solutions
best response confirmed by Stanislav Zhelyazkov (MVP)
Solution

Hi,
First you can only use the alias in the queries and not the name. You might need to refresh the poral before you can start using the alias via the UI.
I think you do not need the quotes:

 

Perf
| where CounterName == "% Processor Time"
| where Computer in (aliasv2)

View solution in original post