SOLVED

Unable to Get ComputerGroups to Work

%3CLINGO-SUB%20id%3D%22lingo-sub-241470%22%20slang%3D%22en-US%22%3EUnable%20to%20Get%20ComputerGroups%20to%20Work%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-241470%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Community%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20many%20suggestions%20to%20run%20a%20query%20on%20ComputerGroups.%20I%20have%20used%20the%20link%20here%20to%20assist%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flog-analytics%2Flog-analytics-computer-groups%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Flog-analytics%2Flog-analytics-computer-groups%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20successfully%20created%20a%20group%20using%20the%20command%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EHeartbeat%20%7C%20where%20Computer%20contains%20%22testvm%22%20%7C%20distinct%20Computer%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThe%20computergroup%20name%20is%20called%26nbsp%3Bcomputergroupv1%2C%20and%20the%20alias%20is%20called%20aliasv2%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EWhen%20I%20run%20the%20following%20query%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%3E%3CDIV%3E%3CSPAN%3EPerf%20%7C%20%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3EComputer%20in%20(computergroupv1)%20I%20get%20the%20following%20error%3A%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E'where'%20operator%3A%20Failed%20to%20resolve%20table%20or%20column%20or%20scalar%20expression%20named%20'computergroupv1'%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3EI%20get%20the%20same%20error%20when%20I%20run%3A%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%3CSPAN%3EPerf%20%7C%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3Ewhere%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3BComputer%20in%20(aliasv2)%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3E%3CSPAN%3E%3CSPAN%3ECarlton%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-241470%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Log%20Analytics%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-242025%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20Get%20ComputerGroups%20to%20Work%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-242025%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3CBR%20%2F%3EFirst%20you%20can%20only%20use%20the%20alias%20in%20the%20queries%20and%20not%20the%20name.%20You%20might%20need%20to%20refresh%20the%20poral%20before%20you%20can%20start%20using%20the%20alias%20via%20the%20UI.%3CBR%20%2F%3EI%20think%20you%20do%20not%20need%20the%20quotes%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EPerf%0A%7C%20where%20CounterName%20%3D%3D%20%22%25%20Processor%20Time%22%0A%7C%20where%20Computer%20in%20(aliasv2)%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-241477%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20Get%20ComputerGroups%20to%20Work%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-241477%22%20slang%3D%22en-US%22%3EOK%2C%20it%20seems%20like%20the%20Log%20Analytics%20needs%20some%20time%20to%20propagate%20because%20the%20following%20works%3A%3CBR%20%2F%3E%3CBR%20%2F%3EPerf%20%7C%20where%20Computer%20in%20(aliasv2)%3CBR%20%2F%3E%3CBR%20%2F%3EHowever%2C%20the%20following%20won't%20bring%20any%20results%3A%3CBR%20%2F%3E%3CBR%20%2F%3EPerf%3CBR%20%2F%3E%7C%20where%20CounterName%20%3D%3D%20%22%25%20Processor%20Time%22%3CBR%20%2F%3E%7C%20where%20Computer%20in%20(%22aliasv2%22)%3CBR%20%2F%3E%3CBR%20%2F%3ECan%20you%20let%20me%20know%20what%20I%20might%20be%20doing%20wrong%3F%3CBR%20%2F%3E%3CBR%20%2F%3ECheers%3C%2FLINGO-BODY%3E
Highlighted
Occasional 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
Highlighted
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
Highlighted
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)