SWQL Calculate Percentages and Filter to only above 75%

Solarwinds Gurus.. I been trying to learn SWQL but struggling to get percentages of 90, 95, 99 percentile from interface speed. The formula should be (% Utilization (90th) = Average Output bps (95) / Interface Speed) then filter that column for anything above 75%. Below is the current working report that is a canned report by Solarwinds.

SELECT 
    I.InterfaceID,
    I.InterfaceSpeed,
    N.NodeID,
    N.Caption AS NodeName,
    N.DetailsUrl AS NDetailsUrl,
    N.VendorIcon AS Vendor,
    I.Caption AS Interface_Caption,
    I.InterfaceIcon AS Interface_Icon,
    I.DetailsUrl AS IDetailsUrl,
    AverageInboundBps90th,
    AverageOutboundBps90th,
    AverageInboundBps95th,
    AverageOutboundBps95th,
    AverageInboundBps99th,
    AverageOutboundBps99th
FROM
(
    SELECT 
        InterfaceID,
        AverageInboundBps90th,
        AverageOutboundBps90th,
        AverageInboundBps95th,
        AverageOutboundBps95th,
        AverageInboundBps99th,
        AverageOutboundBps99th
    FROM Orion.NPM.InterfacePercentiles
    WHERE [DateTime] > (GETUTCDATE()-30)
) AS IP
JOIN Orion.NPM.Interfaces I ON I.InterfaceID = IP.InterfaceID
JOIN Orion.Nodes N ON I.NodeID = N.NodeIDSELECT 
    I.InterfaceID,
    I.InterfaceSpeed,
    N.NodeID,
    N.Caption AS NodeName,
    N.DetailsUrl AS NDetailsUrl,
    N.VendorIcon AS Vendor,
    I.Caption AS Interface_Caption,
    I.InterfaceIcon AS Interface_Icon,
    I.DetailsUrl AS IDetailsUrl,
    AverageInboundBps90th,
    AverageOutboundBps90th,
    AverageInboundBps95th,
    AverageOutboundBps95th,
    AverageInboundBps99th,
    AverageOutboundBps99th
FROM
(
    SELECT 
        InterfaceID,
        AverageInboundBps90th,
        AverageOutboundBps90th,
        AverageInboundBps95th,
        AverageOutboundBps95th,
        AverageInboundBps99th,
        AverageOutboundBps99th
    FROM Orion.NPM.InterfacePercentiles
    WHERE [DateTime] > (GETUTCDATE()-30)
) AS IP
JOIN Orion.NPM.Interfaces I ON I.InterfaceID = IP.InterfaceID
JOIN Orion.Nodes N ON I.NodeID = N.NodeID

Parents
  • I was kicking around the API recently and happened upon this little fun bit.  You don't need to do your own calculations. Those are done by the Orion.NPM.InterfacePercentiles entity.

    SELECT [Interfaces].Node.NodeID
          , [Interfaces].Node.Caption AS [NodeCaption]
          , [Interfaces].Node.VendorInfo.DisplayName AS [Vendor]
          , [Interfaces].Node.VendorInfo.Icon AS [_IconFor_Vendor]
          , [Interfaces].InterfaceID
          , [Interfaces].Caption AS [Interface]
          , [Interfaces].DetailsUrl AS [_LinkFor_Interface]
          , [Interfaces].InBandwidth
          , [Interfaces].OutBandwidth
          , [Percents].AverageInboundBps90th
          , [Percents].AverageOutboundBps90th
          , [Percents].AverageInboundBps95th
          , [Percents].AverageOutboundBps95th
          , [Percents].AverageInboundBps99th
          , [Percents].AverageOutboundBps99th
    FROM (
          SELECT InterfaceID
                , AverageInboundBps90th
                , AverageOutboundBps90th
                , AverageInboundBps95th
                , AverageOutboundBps95th
                , AverageInboundBps99th
                , AverageOutboundBps99th
          FROM Orion.NPM.InterfacePercentiles
          -- you MUST put a time filter here - the shorter the better (for performance)
          WHERE [DateTime] > ADDDAY(- 30, GETUTCDATE())
          ) AS [Percents]
    JOIN Orion.NPM.Interfaces AS [Interfaces]
          ON [Interfaces].InterfaceID = [Percents].InterfaceID

    This should have everything you were looking for.

  • Hi  

    Can you please tell me how can I limit this report to show only those WAN interface in the report which has caption like "WAN_INT"

Reply Children
No Data