I'm trying to write a Report that will display CPU and memory utilization as well as Availability. With the standard report writer options I can’t create this report since no type of report has both statistics available. I'm trying to write a SQL type of report by viewing the SQL code on 2 reports written separately but so far it's proven fruitless. Any help?
Here are the 2 codes I would like to combine.
SELECT TOP 10000 Nodes.Caption AS NodeName,
Nodes.VendorIcon AS Vendor_Icon,
Nodes.IP_Address AS IP_Address,
AVG(ResponseTime.Availability) AS AVERAGE_of_Availability
FROM
Nodes INNER JOIN ResponseTime ON (Nodes.NodeID = ResponseTime.NodeID)
WHERE
( DateTime BETWEEN 39628 AND 39658.9999884259 )
AND
(
(
(Nodes.IP_Address = '***.***.***.***') OR
(Nodes.IP_Address = '***.***.***.***') OR
(Nodes.IP_Address = '***.***.***.***') OR
(Nodes.IP_Address = '***.***.***.***')) OR
(
(Nodes.MachineType LIKE 'Windows 2003%') OR
(Nodes.MachineType LIKE 'HP%') OR
(Nodes.MachineType LIKE 'IBM%') OR
(Nodes.MachineType LIKE 'Cisco%'))
)
GROUP BY Nodes.Caption, Nodes.VendorIcon, Nodes.IP_Address
ORDER BY 1 ASC
and
SELECT TOP 10000 Nodes.Caption AS NodeName,
Nodes.VendorIcon AS Vendor_Icon,
Nodes.IP_Address AS IP_Address,
AVG(CPULoad.AvgLoad) AS AVERAGE_of_AvgCPULoad,
MAX(CPULoad.MaxLoad) AS MAX_of_MaxCPULoad,
AVG(CPULoad.AvgPercentMemoryUsed) AS AVERAGE_of_AvgPercentMemoryUsed,
MAX(CPULoad.MaxMemoryUsed) AS MAX_of_MaxMemoryUsed
FROM
Nodes INNER JOIN CPULoad ON (Nodes.NodeID = CPULoad.NodeID)
WHERE
( DateTime BETWEEN 39655 AND 39686 )
GROUP BY Nodes.Caption, Nodes.VendorIcon, Nodes.IP_Address
ORDER BY 2 ASC, 3 ASC