RAG statuses and alerts for volumes, memory, CPU, interfaces & maybe some components as well?

Years ago I ignored the system defaults and used Custom Properties to create alerts for capacity, etc. (https://thwack.solarwinds.com/product-forums/network-performance-monitor-npm/f/forum/18600/red-amber-green-to-match-custom-property-alert-thresholds) As an alerting method it worked nicely, but the red and amber and green colours remained dependant on the system default levels and so a RAG view was not representative of the actual situation.

 Looking at just the volumes for a moment

Now we can edit each volume, override the general system defaults and set individual criteria for each of the thresholds. Both the alerts and RAG work fine with this. It’s a great solution.

Node Details > left tab to Vital Stats > select a disk volume for Volume Details > Edit Volume > tick the box Override Orion General Thresholds near the bottom of the page and it shows -

But sadly it is a one by one process, very manual, very tedious and prone to errors.

What I’d like to do is to import a bunch of numbers into some new custom properties and then copy these into the correct tables by alert, PowerShell or whatever. The [dbo].[VolumesThresholds] had both the system default values and the unique values and seems an ideal place to write into. But it’s a view, not a table, and therefore not editable. Looking at the construction of the view through SQL Server Management Studio shows that it’s very complicated and I can’t work out where the real records live.

In the [dbo].[VolumesThresholds] view the system defaults are called GlobalWarningValue and GlobalCriticalValue, while the unique settings are Level1Value and Level2Value, but these unique setting labels are quickly obfuscated.

Has anyone found them?

Is there a better way?

I’m aiming for a single method that will test the unique settings and trigger alert actions and well as showing true RAG status.

  • Unfortunately there's no good solution. You can edit multiple nodes or entities in the UI at once, however it's trivial at best to do so that way for numerous entities. I have a script that handles creating and updating these thresholds through the API sort of. It's odd but it works and I owe it to  for pointing this out to me but I'd rather use the API and API only within scripts rather than talk to the API, then have to switch over to direct SQL.... ugh.

    Anyway, here's a SQL query that will get you going.. takes some of the guessing out of it for you. Smile Orion thresholds are stored in the [SolarWindsOrion].[dbo].[Thresholds] table. This assumes your SolarWinds database name is [SolarWindsOrion].

    SELECT CASE
    WHEN tn.EntityType = 'Orion.Nodes'
    THEN n.Caption
    WHEN tn.EntityType = 'Orion.Volumes'
    THEN v.Caption
    WHEN tn.EntityType = 'Orion.NPM.Interfaces'
    THEN i.Caption
    ELSE 'Unkown?'
    END AS [Entity Caption],
    tn.EntityType, tn.Name, t.InstanceId, t.ThresholdType, t.ThresholdNameId, t.ThresholdOperator, t.Warning, t.Critical, 
    t.WarningFormula, t.CriticalFormula, t.BaselineFrom, t.BaselineTo, t.BaselineApplied, t.BaselineApplyError,
    t.WarningPolls, t.WarningPollsInterval, t.CriticalPolls, t.CriticalPollsInterval, t.WarningEnabled, t.CriticalEnabled
    FROM [SolarWindsOrion].[dbo].[Thresholds] AS t
    INNER JOIN [SolarWindsOrion].[dbo].[ThresholdsNames] AS tn ON tn.Id = t.ThresholdNameId
    LEFT JOIN [SolarWindsOrion].[dbo].[NodesData] AS n ON ( tn.EntityType = 'Orion.Nodes' AND n.NodeID = t.InstanceId )
    LEFT JOIN [SolarWindsOrion].[dbo].[Volumes] AS v ON ( tn.EntityType = 'Orion.Volumes' AND v.VolumeID = t.InstanceId )
    LEFT JOIN [SolarWindsOrion].[dbo].[Interfaces] AS i ON ( tn.EntityType = 'Orion.NPM.Interfaces' AND i.InterfaceID = t.InstanceId )

    Good luck in your adventures... 

  • Also here's how to run a straight SQL query via the SolarWinds API in PowerShell using SwisPowerShell.

    Invoke-SwisVerb -SwisConnection $swis -EntityName 'Orion.Reporting' -Verb 'ExecuteSQL' -Arguments $query

  • I think what we really need is "Create" power here in the "Orion.Thresholds" object.  Currently, you can only "read" this one.