Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20396

Re: Re: Difference between SWQL Studio and Orion Custom SWQL Query

$
0
0

If anyone is looking for something similar, this the modified version I've gone with - UTC for timing, ToLocal for display, with a server link to the node added in:

 

SELECT Server, '/Orion/NetPerfMon/NodeDetails.aspx?NetObject=N%3a' + ToString(NodeID) AS [_LinkFor_Server], MachineType,Last_Poll FROM (

 SELECT c.NodeID, a.Caption as Server, a.MachineType, ToLocal(MAX(DateTime)) as Last_Poll , MinuteDIFF(MAX(DateTime), getutcdate()) as TimeSinceLastPoll
FROM Orion.CPULoad c

    INNER JOIN (       SELECT NodeID, Caption, MachineType      FROM Orion.Nodes      where Status=1      and UnManaged=0        ) a ON c.NodeID=a.NodeID
GROUP BY c.NodeID, a.Caption, a.MachineType
) as polling
where TimeSinceLastPoll>30
ORDER BY Last_Poll

Viewing all articles
Browse latest Browse all 20396

Trending Articles