I was actually watching one of the THWACK YouTube videos and was excited to learn something new about dashboards...
but there fist example failed and want to know why?
SELECT Min([CPU].AvgLoad) AS MinAvgCpuLoad
, Max([CPU].MinLoad) AS MaxMinCpuLoad
, Avg([CPU].AvgPercentMemoryUsed) AS AvgPercentMemory
, [CPU].Node.Vendor
FROM Orion.CPULoad AS [CPU]
WHERE [CPU].DateTime >= GETUTCDATE() - 7
GROUP BY [CPU]Node.Vendor
ORDER BY AvgPercentMemory DESC
When i input this in SWQL, I get an error popup 'no viable alternative at input 'CPU' in Group By clause' , and when i click ok, i have the following..
2021-05-05 07:00:43,541 [175] WARN SolarWinds.Orion.Web.AuthorizationManager - (null) (null) Warning: Checking Group membership; Account Group 'AD\PACs Access' contained NULL SID.
2021-05-05 07:00:43,541 [175] INFO SolarWinds.Orion.Web.AuthorizationManager - (null) (null) Resolved group: AD\R-SolarN1-FullAdmin for identity: AD\jwj0215admin.
2021-05-05 07:00:43,556 [175] ERROR SolarWinds.InformationService.Core.InformationService - SWQL Studio (null) Exception running query:
SELECT Min(CPU.AvgLoad) AS MinAvgCpuLoad, Max(CPU.MinLoad) AS MaxMinCpuLoad, Avg(CPU.AvgPercentMemoryUsed) AS AvgPercentMemory, CPU.Node.Vendor
FROM Orion.CPULoad AS CPU
WHERE [CPU].DateTime >= GETUTCDATE() - 7
GROUP BY [CPU]Node.Vendor
ORDER BY AvgPercentMemory DESC RETURN XML RAW
2021-05-05 07:00:43,556 [175] ERROR SolarWinds.InformationService.Core.InformationService - SWQL Studio (null) Exception for Operation: <s:Envelope xmlns:s="">www.w3.org/.../soap-envelope" xmlns:a="">www.w3.org/.../addressing">
<s:Header>
<a:Action s:mustUnderstand="1">schemas.solarwinds.com/.../a:Action>
<a:MessageID>urn:uuid:9549d2ea-30fc-4653-87ad-c7bb43ed6516</a:MessageID>
<a:ReplyTo>
<a:Address>www.w3.org/.../a:Address>
</a:ReplyTo>
<i18n xmlns="">schemas.solarwinds.com/.../informationservice" xmlns:i="">www.w3.org/.../XMLSchema-instance">
<Culture>en-US</Culture>
</i18n>
<SwisSettings xmlns="">schemas.solarwinds.com/.../informationservice" xmlns:i="">www.w3.org/.../XMLSchema-instance">
<AppendErrors>true</AppendErrors>
<ApplicationTag>SWQL Studio</ApplicationTag>
<DataProviderTimeout>PT30S</DataProviderTimeout>
</SwisSettings>
<SwisProtocolVersion xmlns="">schemas.solarwinds.com/.../SwisProtocolVersion>
<IsBase64EncodingAccepted xmlns="">schemas.solarwinds.com/.../IsBase64EncodingAccepted>
<a:To s:mustUnderstand="1">net.tcp://solarn1r:17777/SolarWinds/InformationService/v3/Orion/ad</a:To>
</s:Header>
<s:Body>
<QueryXml xmlns="">schemas.solarwinds.com/.../informationservice">
<query>SELECT Min(CPU.AvgLoad) AS MinAvgCpuLoad, Max(CPU.MinLoad) AS MaxMinCpuLoad, Avg(CPU.AvgPercentMemoryUsed) AS AvgPercentMemory, CPU.Node.Vendor
FROM Orion.CPULoad AS CPU
WHERE [CPU].DateTime >= GETUTCDATE() - 7
GROUP BY [CPU]Node.Vendor
ORDER BY AvgPercentMemory DESC RETURN XML RAW</query>
<parameters>
</parameters>
</QueryXml>
</s:Body>
</s:Envelope>
2021-05-05 07:00:43,556 [175] ERROR SolarWinds.InformationService.Core.InformationService - SWQL Studio (null) Exception caught in method SolarWinds.InformationService.Core.InformationService.RunQuery
SolarWinds.Data.SWQL.SWQLSyntaxException: no viable alternative at input 'CPU' in Group By clause ---> Antlr.Runtime.NoViableAltException: A recognition error occurred.
at SolarWinds.Data.SWQL.Parser.SWQLParser.groupingSets()
--- End of inner exception stack trace ---
at SolarWinds.Data.SWQL.Parser.SWQLParser.groupingSets()
at SolarWinds.Data.SWQL.Parser.SWQLParser.groupByClause()
at SolarWinds.Data.SWQL.Parser.SWQLParser.queryRule()
at SolarWinds.Data.SWQL.Parser.SWQLParser.selectStatement()
at SolarWinds.Data.SWQL.Parser.SWQLParser.statement()
at SolarWinds.Data.SWQL.SWQLParser.Parse(String query)
at SolarWinds.Data.Query.Engine.QueryProcessor.CompileQueryExecutionPlan(String query, IQueryExecutionContext context)
at SolarWinds.InformationService.Core.QueryPlanCache.GetQueryPlan(String query, String username, Boolean federationEnabled, Func`1 buildQueryPlan)
at SolarWinds.InformationService.Core.InformationService.GetQueryExecutionPlan(String query, IIdentity currentIdentity, Boolean federationEnabled, IQueryExecutionContext queryExecutionContext)
at SolarWinds.InformationService.Core.InformationService.RunQuery(String query, IDictionary`2 parameters, IDataSerializer serializer, IMessageFormatterStrategy messageFormatterStrategy)
I have verified i did not misspell anything, so i am lost. I also tried taking out the square brackets [CPU].DateTime to CPU.DateTime, etc...but that didn't work either...
Any guidance would be greatly appreciated...