I'm not a SQL guy, and I was hoping someone out there could help me out. I run all HP boxes, and I've got a series of custom pollers that is polling for information such as NIC redundancy condition, Power supply redundancy, hardware model, and Management version. I downloaded these custom pollers from Thwack. I've been able to generate a custom SQL report that grabs the node name, vendor icon, IP, and the status of one of the custom pollers mentioned above -- but only one of them. I have to generate a new report for each item. I was hoping someone could help me find a way to get each one of those items on the same report. Before I show the code, here are two difficulties we had in getting this report to work. First, it will only poll the data if the custom poller is set to keep history. Second, unless you specify the time element, you will get every single instance that the poller generated for each node assigned. Here is the code I'm using for the current report (that only shows 1 of the stats):
SELECT Nodes.Caption AS NodeName,
--Nodes.Vendor AS Vendor,
Nodes.VendorIcon AS Vendor_Icon,
Nodes.IP_Address AS IP_Address,
Nodes.Location AS Location,
CustomNodePollers_CustomPollers.UniqueName AS Poller_Name,
CustomNodePollerStatistics_CustomPollerStatistics.Status AS Status,
CustomNodePollerStatistics_CustomPollerStatistics.DateTime
FROM
((Nodes INNER JOIN CustomPollerAssignment CustomNodePollerAssignment_CustomPollerAssignment ON (Nodes.NodeID = CustomNodePollerAssignment_CustomPollerAssignment.NodeID)) INNER JOIN CustomPollerStatistics CustomNodePollerStatistics_CustomPollerStatistics ON (CustomNodePollerAssignment_CustomPollerAssignment.CustomPollerAssignmentID = CustomNodePollerStatistics_CustomPollerStatistics.CustomPollerAssignmentID)) INNER JOIN CustomPollers CustomNodePollers_CustomPollers ON (CustomNodePollerAssignment_CustomPollerAssignment.CustomPollerID = CustomNodePollers_CustomPollers.CustomPollerID)
WHERE
CustomNodePollerStatistics_CustomPollerStatistics.DateTime >= DATEADD(mi, -5,GETUTCDATE())
AND
(CustomNodePollers_CustomPollers.UniqueName = 'Server_Model')
--Change the above line so that the UniqueName equals the custom poller you want the report to use
AND
(
(CustomNodePollerAssignment_CustomPollerAssignment.InterfaceID = 0)
)
ORDER BY Location,IP_Address ASC
Thanks in advance,
Brandon