1 Reply Latest reply on Mar 30, 2010 4:37 PM by MarieB

    outage duration ( how cutomize jTimes SQL script )

      hi

      i tried this SQL Script from jtimes ( thanks jtimes :*)  : Outage Duration Last Month

      -------------------------------

      SELECT
      StartTime.EventTime,
      Nodes.Caption,
      Nodes.Location,
      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) AND (StartTime.NetObjectType = 'N') AND
      eventtime between dateadd(month, -1, getdate()) and getdate()
      ORDER BY StartTime.EventTime DESC
      ------------------------------------------------

      but the result dose not shown all my Device downtime duration like cisco switches and router !!!!