Sorry, my previous reply was for node availability. Here is the correct code for interface availability
use netperfmonIF exists (SELECT * FROM dbo.sysobjects where id = object_id(N'dbo.SUMTABLE'))
DROP TABLE SUMTABLE
go SELECT EventTime,Interfaces.Caption,NetObjectID,NodeID,
DATEDIFF(MINUTE, StartTime.EventTime,(SELECT TOP 1 EventTimeFROM Events AS EndtimeWHERE EndTime.EventTime > StartTime.EventTime AND EndTime.EventType = 11AND EndTime.NetObjectType = 'I'AND EndTime.NetObjectID = StartTime.NetObjectIDORDER BY EndTime.EventTime)) AS OutageDurationInMinutesINTO SUMTABLEFROM Events AS StartTime INNER JOIN Interfaces ON StartTime.NetObjectID = Interfaces.InterfaceIDWHERE(StartTime.EventType = 10) AND (StartTime.NetObjectType = 'I')AND (eventtime between '11/01/2008 00:00:00' and '11/30/2008 23:59:59')GROUP BY Interfaces.NodeID,NetObjectID,Interfaces.Caption, Interfaces.InterfaceID,StartTime.EventTime,StartTime.NetObjectID
go
Select DISTINCT Nodes.Caption AS Router_Name, interfaces.caption,
COALESCE(CONVERT(char(10),100-Round(SUM(Convert(float,OutageDurationInMinutes)/(DATEDIFF(Minute, '09/01/2005 00:00:00', '09/30/2005 23:59:59') + 1 )*100),2)),'100') + '%' AS "Avalibility This Month",COALESCE(SUM(OutageDurationInMinutes), 0) AS OutageTimeInMinutesFROM (Nodes INNER JOIN Interfaces ON Interfaces.NodeID = Nodes.NodeID) LEFT JOIN SUMTABLE ON SUMTABLE.NetObjectID = Interfaces.InterfaceID
GROUP BY Nodes.Caption, interfaces.caption, nodes.department
ORDER BY Nodes.Caption
quote:On this issue of interface availability, how would I create a report based on down events to calculate interface availability? Would I use a report similar to the canned Outage Duration report for nodes? Thanks
quote:Originally posted by rosswInterface availability based on Zoran's start.With Percentage.NOTE: I use the custom property Interfaces.Service = "Internet"to define my circuits. Thanks Yahoo chart guy!Im just talking to my self Ross Warren
quote:Originally posted by rgwardRoss...I attempted to set up the SQL report but Report Writer didn't like the GO statement. Can you shed any light? SQL if not my forte.
Hi all,
i'm new in this forum and i'm not skilled on SQL;
i was trying to create a report with your advanced query but i notice that works only with events that are closed inside the month and doesn't work with events that haven't an EndTime inside selected month; then i tried to insert a period that is longer then a month but nothing..
Is there anybody who can help me ?
Thanks in advance.
Prysm
How do I turn off the smiley faces in your post? I may be missing something, but there is no "object_id" in the sysobjects table, there is ID however.... I am running 8.5.1
i am new to orion, i use v 9.1 with sql express on win 2003.
i need availability on interfaces BAD!!!
i tried using the posts in this forum, but it
not wrk much for me. Can u please give me a
step by step approach? i'd apreciate it greatly.
Follow this thread there are many examples available. Here is some more rudimentory code.
mgibson,
Have you uploaded your custom report to the content exchange zone so that more folks can benefit from it?
Thank man.... ur a life saver..
query works great!!!!!!!!!
Hello mgibson,
The report you have created is perfect, really helpfull!I am trying to understand what do I have to change in order to create this report but only for specific interfaces and not for all in the database.F.e. Select specific interfaces using InterfaceID.Can you please help on this?Best RegardsKostas Kanellopoulos
I followed this thread the whole way through in the hope I would be able to get a report that gives me the availability of interfaces selected by a custom property only to find none of these suggestions will run in report writer. Unlike others report writer is all I have, surely there must be a way round the syntax error on the GO command, any ideas would be appreciated.