Find nodes whose availability is under a certain threshold in SWQL
SELECT
[Nodes].NodeID,
[Nodes].Caption,
AVG([Nodes].ResponseTimeHistory.Availability) AS [Availability]
FROM
Orion.Nodes AS [Nodes]
WHERE [Nodes].ResponseTimeHistory.DATETIME BETWEEN GETDATE() - 365 AND GETDATE() -- this is where you define your time period
GROUP BY [Nodes].NodeID, [Nodes].Caption
HAVING AVG([Nodes].ResponseTimeHistory.Availability) < 10
the result may be largely different from the result from the web-gui
SELECT
n1.NodeID,
n2.Caption,
AVG(n1.PercentLoss) AS loss
FROM Orion.ResponseTime AS n1
INNER JOIN Orion.Nodes AS n2 ON n1.NodeID = n2.NodeID
GROUP BY n1.NodeID, n2.Caption
HAVING AVG(n1.PercentLoss) >= 99;
This is more accurate as it uses the packet loss