NPM NCM UDT IPAM NTA
Hi
Would someone please provide some assistance please.....
I seem to be going round in circles with creating a summary report for providing a weekly / monthly report with not too heavy on the layout but enough information ports.
I am new to SW and I have been tasked to produce a report for all sites Approximately 600 Cisco nodes.
I have no knowledge of SQL/SWSQL
The task is to provide a report that shows -
Device site
Device name
Toal ports
Used ports
Available ports
Operationaly status
Last Active
I have found the following code and applied it and it looks good but the code is not pulling in any data. To keep things simple I only discovered 1 site for its ports, but nothing is showing in the table.
i have modified the below code to include some more columns and info, but still no data. i will add the modified code when i logged in.
What do I need to do,to make this happen?
SELECT NodeID, Caption,
COUNT (*) AS "Total Ports", SUM (IsUp) AS "Used Ports", SUM (IsDown) AS "Available Ports"
FROM (
SELECT ND.Caption, ND.NodeID,
CASE WHEN OperStatus = 'Up' THEN 1 ELSE 0 END AS IsUp,
CASE WHEN OperStatus = 'Down' THEN 1 ELSE 0 END AS IsDown
FROM NCM_Interfaces NCMI INNER JOIN NCM_NodeProperties NCMNP ON (NCMI.NodeID = NCMNP.NodeID)
INNER JOIN NodesData ND ON (NCMNP.CoreNodeID = ND.NodeID)
WHERE (InterfaceTypeDescription like '%ethernet%')
) T1
GROUP BY NodeID, Caption
ORDER BY Caption DESC

Both code and image is from Port count report
if anyone is able to proide some advice it would be appreciated.
many thanks in advance
Message was edited by: Phillsb Reference to SQL Code used.