3 Replies Latest reply on May 11, 2017 4:01 PM by josephwdowling

    Interface Utilization for Multiple Interfaces

    josephwdowling

      I need to add 18 interfaces to this query: 9056 works

      DECLARE @StartDate DateTime
              DECLARE @EndDate DateTime

              SET @StartDate = ${FromTime}
              SET @EndDate = ${ToTime}

              SELECT Interfaces.InterfaceId,
              Nodes.NodeID,
              Nodes.Caption AS NodeName,
              Interfaces.Caption AS Interface_Caption,
                      Maxbps_In95,
              Maxbps_Out95,
              Maxbps_In99,
              Maxbps_Out99
              FROM Nodes
              INNER JOIN Interfaces ON Nodes.NodeID = Interfaces.NodeID
              INNER JOIN (
             SELECT InterfaceID = 9056,
            
              dbo.GetInBpsPercentile(InterfaceID, @StartDate, @EndDate,95) AS Maxbps_In95,
              dbo.GetOutBpsPercentile(InterfaceID, @StartDate, @EndDate,95) AS Maxbps_Out95,
              dbo.GetInBpsPercentile(InterfaceID, @StartDate, @EndDate,99) AS Maxbps_In99,
              dbo.GetOutBpsPercentile(InterfaceID, @StartDate, @EndDate,99) AS Maxbps_Out99
              FROM InterfaceTraffic
              WHERE InterfaceTraffic.DateTime >= @StartDate AND InterfaceTraffic.DateTime <= @EndDate
              GROUP BY InterfaceID
              ) TrafficStat
              ON Interfaces.InterfaceID = TrafficStat.InterfaceID