Showing posts with label Query. Show all posts
Showing posts with label Query. Show all posts

How to Bulk Disable/Enable Topology Polling on All SolarWinds Orion Nodes (SQL)

If you're not familiar with topology polling, it is used by SolarWinds Orion to determine the node-to-node dependencies. So, for example, if a switch goes down you would get an alert for the switch and not for all of the dependent child nodes that are plugged into the switch.

One of the SolarWinds Orion environments that I took over had topology polling disabled on a large portion of the nodes. This prevented a lot of dependencies from being created which otherwise would have been.

Of course, you could go through all of the nodes one at a time, hit the list resources button, and add topology polling back to each one of them. Or, you could run a simple SQL query to enable it on each of the nodes that have it disabled.

Let's start by identifying which nodes have topology polling disabled. The select statement below will find all of them and also get the related node information from the NodesData table so that you sanity check what you're going to change.

SELECT n.Caption
, n.IP_Address
, n.Vendor
, n.MachineType
, p.PollerID
, p.PollerType
, [Enabled]
FROM Pollers p
INNER JOIN NodesData n ON n.NodeID=p.NetObjectID
WHERE PollerType LIKE 'N.Topology%' AND [Enabled] = 0

If all of the results look good to you, the query below can be used to enable topology polling on any nodes that have the setting explicitly disabled.

UPDATE Pollers
SET [Enabled] = 1
WHERE PollerType LIKE 'N.Topology%' AND [Enabled] = 0

Easy peasy! I have a couple variations of these on GitHub if you want to go the other way and disable topology polling in mass. Those are linked below

How to Bulk Disable/Enable Multicast Polling on All SolarWinds Orion Nodes (SQL)

When I was doing SolarWinds consulting, I ran into a lot of clients complaining about poor database performance in relation to their multicast routing tables having millions of rows in them. These customers were often looking a quick and easy way to identify all of the nodes which have multicast polling enabled on them, as well as a way to quickly disable it.

First things first. If you want to identify which nodes have multicast polling enabled, you can run the SQL query below in Database Manager or SQL Server Management Studio.

SELECT n.Caption
, n.IP_Address
, n.Vendor
, n.MachineType
, p.PollerID
, p.PollerType
, [Enabled] 
FROM Pollers p
INNER JOIN NodesData n ON n.NodeID=p.NetObjectID
WHERE PollerType LIKE 'N.MulticastRouting%' AND [Enabled] = 1

Whether you have used the query above to identify the nodes with multicast polling enabled or not, the SQL query below can be used to disable multicast polling on any nodes in Orion that currently have them enabled.

UPDATE Pollers
SET [Enabled] = 0
WHERE PollerType LIKE 'N.MulticastRouting%' AND [Enabled] <> 0

If you want to enable multicast polling on them again, you can just change the enabled line to equal one where it currently equals zero, like below.

UPDATE Pollers
SET [Enabled] = 1
WHERE PollerType LIKE 'N.MulticastRouting%' AND [Enabled] = 0

Below are links to these SQL queries on GitHub:

Custom SWQL Query to Identify the Top 10 SolarWinds Orion Nodes by Their Number of NPM Elements

Below is a SWQL query which can be used to determine which nodes in your SolarWinds Orion environment have the most elements. What is an element? In NPM, every node, volume and interface counts as an element. Which leads to, why is this important? For one, SolarWinds Network Performance Monitor (NPM) is typically licensed by the number of elements, unless you are one of the newer nodes based licensing options. If you have a large environment, this also comes in helpful when trying to balance the load across your polling engines. Typically, a polling engine is limited to ~12,000 elements before your polling frequencies start to automatically slow down (unless you're stacking polling engine licenses and have the computer resources to support it).

SELECT TOP 10 i.Interfaces + v.Volumes + 1 AS [Elements]
    , n.Caption AS [Node]
    , n.NodeID
    , n.IP_Address AS [IP]
    , n.Vendor
    , n.MachineType
FROM Orion.Nodes n
INNER JOIN (SELECT COUNT(InterfaceID) AS [Interfaces], NodeID FROM Orion.NPM.Interfaces GROUP BY NodeID) AS i ON i.NodeID=n.NodeID
INNER JOIN (SELECT COUNT(VolumeID) AS [Volumes], NodeID FROM Orion.Volumes GROUP BY NodeID) AS v ON v.NodeID=n.NodeID
GROUP BY n.NodeID
    , n.Caption
    , n.IP_Address
    , n.Vendor
    , n.MachineType
    , i.Interfaces
    , v.Volumes
ORDER BY [Elements] 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.

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.

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...