Hi
The following SQL query retrieve CPU and RAM usage by SAM ComponentID.
It shows the last poll result for each component.
SELECT DateTime, ComponentID, AvgMemoryUsed, AvgPercentCPU
FROM (
SELECT DateTime, ComponentID, AvgMemoryUsed, AvgPercentCPU, ROW_NUMBER() OVER (PARTITION BY ComponentID ORDER BY Datetime DESC) rn
FROM [SolarWindsOrion].[dbo].[APM_CPUAndMemoryUsage] ) x
WHERE x.rn = 1
As far as I know, modern dashboard does not support SQL queries.
Also, SWQL does not support the ROW_NUMBER() function.
So, Can anyone please help me -
How to retrieve the last poll per component ID with SWQL?