Custom SWQL Query to Identify the Top 10 SolarWinds Orion Nodes by Their Number of Enabled SAM Components

Since SolarWinds Server & Application Monitor (SAM) went to node based licensing, it isn't super easy to determine which nodes have the most SAM components assigned to them. Below is a SWQL query which can be used to display the top 10 nodes with the most enabled SAM components in your environment.

SELECT TOP 10 Count(c.ComponentID) AS [Components]
    , c.Application.Node.NodeID
     , c.Application.Node.Caption AS [Node]
     , c.Application.Node.IP_Address AS [IP]
     , c.Application.Node.Vendor
     , c.Application.Node.MachineType
FROM Orion.APM.Component c
WHERE c.Disabled = 'False'
GROUP BY c.Application.Node.NodeID
    , c.Application.Node.Caption
    , c.Application.Node.IP_Address
    , c.Application.Node.Vendor
    , c.Application.Node.MachineType
ORDER BY [Components] DESC

If you're unfamiliar with SWQL and how to run it, I'll list a few ways below.
  1. You can go to https://<OrionURL>/orion/Admin/swis.aspx in your environment, past the code in the box, and execute it. You'll have to replace "https://<OrionUrl>" with the URL for your environment, of course.
  2. If you have the OrionSDK installed, you can run it in SWQL Studio.
  3. If you have the OrionSDK installed, you can run the query with the "Get-SwisData" PowerShell cmdlet.
  4. You can use the query above as a data source for a report or custom dashboard widget.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Issue Where SolarWinds Orion Agents Show As Connected But They Are Not Updating Statistics (RESOLVED)

This issue can easily slip by unnoticed. All of that status indicators still show green, so everything is good, right? Not so! Statistics an...