2 Replies Latest reply on Sep 11, 2019 7:12 AM by murphym

    Load Balancing and Elements per node

    murphym

      I am trying to do some load balancing across my 6 additional pollers.

      Since there seems to be no easy way I was going to write a query to find out the number of different elements on each node.

      On the poller page there is this information for each poller:

      Elements  10369 
      Network Node Elements281
      Volume Elements857
      Interface Elements9231

       

      I know "ELEMENTS" is the total for the poller, but how do I find that information by node?

      I know the Network Node Elements can be found in the interfaces table (which makes no sense)

      Where do I find the Volume elements and Interface elements?

        • Re: Load Balancing and Elements per node
          wluther

          murphym Are you just looking for a simple Node "A": 10 Interfaces; 13 Volumes list?

           

          If so, this SWQL query should give you those results.

           

          SELECT
          n.Caption
          ,ISNULL(v.TotalVolumes,0) AS TotalVolumes
          ,ISNULL(i.TotalInterfaces,0) AS TotalInterfaces
          FROM Orion.Nodes AS n
          LEFT OUTER JOIN (SELECT Volumes.Node.NodeID,COUNT(*) AS TotalVolumes FROM Orion.Volumes GROUP BY Volumes.Node.NodeID) AS v ON v.NodeID=n.NodeID
          LEFT OUTER JOIN (SELECT Interfaces.Node.NodeID,COUNT(*) AS TotalInterfaces FROM Orion.NPM.Interfaces GROUP BY Interfaces.Node.NodeID) AS i ON i.NodeID=n.NodeID
          ORDER BY n.Caption

           

          Nothing fancy there, just a simple list of nodes showing the count of interfaces and volumes per each node.

           

          Let us know if you need further assistance.

           

           

          Thank you,

           

          -Will

            • Re: Load Balancing and Elements per node
              murphym

              Thanks,

              I actually had to change the select statement a bit because I think we have a little different layout and I wanted to see the engine it was on:

              This is what I used....

               

              SELECT n.engineid,

              n.Caption

              ,ISNULL(v.TotalVolumes,0) AS TotalVolumes

              ,ISNULL(i.TotalInterfaces,0) AS TotalInterfaces

              FROM dbo.Nodes AS n

              LEFT OUTER JOIN (SELECT Volumes.NodeID,COUNT(*) AS TotalVolumes

                  FROM dbo.Volumes

              GROUP BY Volumes.NodeID) AS v ON v.NodeID=n.NodeID

              LEFT OUTER JOIN (SELECT Interfaces.NodeID,COUNT(*) AS TotalInterfaces

                  FROM dbo.Interfaces GROUP BY Interfaces.NodeID) AS i ON i.NodeID=n.NodeID

              ORDER BY n.EngineID,n.Caption

               

               

              It works great. much appreciated.