ok, im opening a new discussion as suggested by others so I can get help on this specific request and not getting suggestions on how to do it another way. this is what I need:
I need to have a report showing up in NPM in the nodes detail that would show when the event node down shows and how long (duration) the node was down. Seems pretty simple, yet I know nothing of SQL so I need help. I was given a script that works in the Report Write tool, but not on the web. I need this available (same output) in the web and based on only the node your looking at. Right now, in the report writer, it shows all nodes. On the web, it needs to show for that specific node.
Here is the SQL I was given that works in the report writer but not in the Web.
SELECT * from (
SELECT
StartTime.EventTime AS Down_Event_time,
(SELECT TOP 1
EventTime
FROM Events AS Endtime
WHERE EndTime.EventTime >= StartTime.EventTime
AND EndTime.EventType = 5
AND EndTime.NetObjectType = 'N'
AND EndTime.NetworkNode = StartTime.NetworkNode
AND EventTime IS NOT NULL
ORDER BY EndTime.EventTime) AS UpEventTime,
Nodes.Caption, StartTime.Message, DATEDIFF(Mi, StartTime.EventTime,(SELECT TOP 1 EventTime FROM Events AS Endtime
WHERE EndTime.EventTime > StartTime.EventTime AND EndTime.EventType = 5 AND EndTime.NetObjectType = 'N'
AND EndTime.NetworkNode = StartTime.NetworkNode ORDER BY EndTime.EventTime)) AS OutageDurationInMinutes
FROM Events StartTime INNER JOIN Nodes ON StartTime.NetworkNode = Nodes.NodeID
WHERE (StartTime.EventType = 1)
) as uptimetable
WHERE outageDurationInMinutes IS NOT NULL
ORDER BY Caption desc
The above is what shows in the report tool, but i need this in the web and filtered based on the node your looking at.
When I add this report to the web on NPM, I get the below:
So can anyone help me getting this to work properly in the web PLEASE ! Thanks.