1 Reply Latest reply on Apr 4, 2014 11:14 AM by derhally

    Using SWis query to get interface utilization


      I am trying to use the SDK SWis (and not use ODBC), but am having some issues with getting the right query together.   I am familiar with table joins and date manipulation in SQL, but so far cannot see how to pull it all together in SWis. 


      for example, show min/max/avg utilization for yesterday for a router interface managed by NPM.      showing the router, interface description, min/max/avg ... for yesterday.. or for each day this  month.   or for prime shift hours each weekday this month.   etc.... you see what I mean.



      I found a related query in the report writer, but it uses SQL.  i need examples of date manipulation.  and avg/max function calls in SWIS .  


      are these examples somewhere in the SWis toolkit and I have just not spotted them yet?





      Don M





      TOP (100) PERCENT

      CONVERT(DateTime, FLOOR(CAST(dbo.InterfaceTraffic.DateTime AS Float)), 0) AS DayRound,

      1. dbo.InterfaceTraffic.NodeID,
      2. dbo.InterfaceTraffic.InterfaceID,
      3. dbo.Interfaces.Caption,

      AVG(dbo.InterfaceTraffic.In_Averagebps) AS In_Averagebps,

      MIN(dbo.InterfaceTraffic.In_Minbps) AS In_Minbps,

      MAX(dbo.InterfaceTraffic.In_Maxbps) AS In_Maxbps,


        • Re: Using SWis query to get interface utilization

          The "Orion SDK.pdf" that comes with the SDK should have a list of supported functions and various constructs.


          For the query in your comment, here is a SWQL version that returns the utilization for all interfaces in the last 24 hours


          SELECT InterfaceID, AVG(InAveragebps) AS InAvgBps, MIN(InMinbps) AS InMinBps, MAX(InMaxbps) AS InMaxBps

          FROM Orion.NPM.InterfaceTraffic

          WHERE DateTime > (GETDATE() - 1)

          GROUP BY InterfaceID


          SWQL is very similar to SQL.  There are differences and those should be documented in that pdf.