cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

Load Balancing and Elements per node

Jump to solution

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?

Labels (1)
Tags (2)
0 Kudos
1 Solution

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

View solution in original post

2 Replies

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

View solution in original post

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.

0 Kudos