Hello!
I've been throw into the world of Solarwinds and very green to SQL and SWQL, and I've trying to figure out creating this SWQL query.
I have a bunch of nodes that have two custom pollers going, all nodes belonging to one vendor. I want to create a table that lists each node, and the latest value of the two pollers.
So far I've worked out this:
SELECT TOP 1000 n.Caption
, cps.Status
FROM Orion.Nodes n
INNER JOIN Orion.NPM.CustomPollerAssignmentOnNode cpaon ON n.NodeID = cpaon.NodeID
INNER JOIN Orion.NPM.CustomPollerStatistics cps ON cpaon.CustomPollerAssignmentID = cps.CustomPollerAssignmentID
WHERE n.Vendor = 'Name of Vendor' AND cpaon.DisplayName = 'FirstCustomPoller'
GROUP BY n.Caption, cps.Status
Which returns turns all historical values, and I don't know how to only get the latest. I also have a second customer poller (eg. SecondCustomPoller) that I also want to include in the results. But I can't work out how to do that!
Anyone kow what I'm doing wrong?