I want add the node of Up-Down & also API Status, Table in custom dashboard please help me to proper direction
SELECT
[Nodes].Caption AS [Node], [Nodes].DetailsURL AS [_LinkFor_Node], [Nodes].Status AS [Status], [Nodes].CustomProperties.Ownership AS [Owner]
, ToLocal([AlertObjects].AlertActive.TriggeredDateTime) AS [Down Time]
, CASEWHEN TOSTRING(FLOOR(HOURDIFF([AlertObjects].AlertActive.TriggeredDateTime,GETUTCDATE())/24)) <> 0THEN CONCAT(TOSTRING(FLOOR(HOURDIFF([AlertObjects].AlertActive.TriggeredDateTime,GETUTCDATE())/24)), 'd') ELSE ''END + ' '
, CASEWHEN TOSTRING(FLOOR(MINUTEDIFF([AlertObjects].AlertActive.TriggeredDateTime,GETUTCDATE())/60.0 % 24)) <> 0THEN CONCAT(TOSTRING(FLOOR(MINUTEDIFF([AlertObjects].AlertActive.TriggeredDateTime,GETUTCDATE())/60.0 % 24)), 'h') ELSE ''END + ' '
, CASEWHEN TOSTRING(FLOOR(MINUTEDIFF([AlertObjects].AlertActive.TriggeredDateTime,GETUTCDATE())%60)) <> 0THEN CONCAT(TOSTRING(FLOOR(MINUTEDIFF([AlertObjects].AlertActive.TriggeredDateTime,GETUTCDATE())%60)), 'm') ELSE ''END AS [Outage Duration]
FROM Orion.AlertObjects [AlertObjects]LEFT JOIN Orion.Nodes [Nodes] ON [Nodes].Uri = [AlertObjects].EntityUri
WHERE [AlertObjects].AlertConfigurations.Name = 'Node is down' -- Uses the OOTB "Node is down" alert that should trigger for each nodeAND [Nodes].CustomProperties.Ownership = 'FT'AND [Nodes].Status = '2'
-- Order widget results by time of outage and node caption ORDER BY [AlertObjects].AlertActive.TriggeredDateTime DESC, [Nodes].Caption ASC
below query not working
You have to join the API status table and and pull the information in select statement above