SolarWinds Lab Episode #93–A Step-by-Step Guide to Building Modern Dashboards on the Orion Platform

December 9, 2020

Turning data into information and information into decisions are some of the most common challenges facing any monitoring professional. A clean, easy-to-interpret dashboard can go a long way in turning those raw numbers into actionable decisions. In this heavily requested follow-up episode, Kevin M. Sparenberg, technical content manager for THWACKRegistered, presents a step-by-step build for modern dashboards. This live and in-depth working session builds on lessons learned from previous SolarWinds Lab episodes (#85, #86, and #91). To get the most from this session, we strongly encourage you to review those episodes, and come prepared with your questions.

At the end of this SolarWinds Lab, you'll have the skills necessary to:

  • Craft a dashboard for your or another team
  • Explain the difference and benefits of the four widget types
  • Use your SWQL skills to craft custom data needed by your teams

Additional Resources:

SolarWinds Lab Episode #85 - How Well Do You Know the Orion Platform? Tips, Tricks, and How-Tos

SolarWinds Lab Episode #86 - Orion ASK 101: Intro to PowerShell and Orion API

SolarWinds Lab Episode #91 - Customizing the Orion Platform With the SolarWinds API and SWQL

Query examples from the episode are attached below.

Anonymous

Top Comments

  • Is it possible when using Perfstack to save the "Display Transforms"? Reason: I need to show an API Poller result as "Difference".

  •  Very nice examples 

    One thought to the use of the new API Pollers together with the new dashboards. I got the error that the value I used for my widget is 'nvarchar'?! After a while I figured out that the number was to big (8GB in byte) so I used the ABS() SWQL function  and some '/1024' divisors to come to an integer (from byte to megabyte). 

    Here is the result it also changes the color when the free value below 80% maybe it helps others:

    -- SWQL query for getting used and free Heap memory (in byte) for a propotional widget
    -- Challenge: 
    --   1. No Free but a "Total" value given
    --   2. Values to big and stored as string but ABS() helps :)
    -- Using a join to the same table to get total and used value for caclculationg free
    -- Also set some colors depending on how much memory is used
    -- Notice:
    --   'Heap Memory Usage Max' is the total amount of heap memory for the JVM
    --   'Heap Memory Usage' is the used memory
    -- Both names set as 'Display Name' for the metric when the API poller was created
    SELECT 
        -- Set Values
        CASE 
            -- turning value max into free value
            WHEN AP.RequestDetails.ValueToMonitors.DisplayName = 'Heap Memory Usage Max' THEN ((ABS(AP.RequestDetails.ValueToMonitors.Metric)/1024/1024)-(ABS(AP2.RequestDetails.ValueToMonitors.Metric)/1024/1024)) 
            WHEN AP.RequestDetails.ValueToMonitors.DisplayName = 'Heap Memory Usage' THEN (ABS(AP.RequestDetails.ValueToMonitors.Metric)/1024/1024)
        END AS Value,
        -- Set Names
        CASE 
            -- turning Name max into free Name
            WHEN AP.RequestDetails.ValueToMonitors.DisplayName = 'Heap Memory Usage Max' THEN 'Free Heap Memory (MB)' 
            WHEN AP.RequestDetails.ValueToMonitors.DisplayName = 'Heap Memory Usage' THEN 'Used Heap Memory (MB)'
        END AS Name,
        -- Set Colors
        CASE 
            WHEN AP.RequestDetails.ValueToMonitors.DisplayName = 'Heap Memory Usage Max' THEN 
                -- Change 'Free' color from green to red if it is under 80%
                    WHEN (((abs(AP.RequestDetails.ValueToMonitors.Metric)/1024/1024)-(abs(AP2.RequestDetails.ValueToMonitors.Metric)/1024/1024))/(abs(AP.RequestDetails.ValueToMonitors.Metric)/1024/1024)*100) < 20 THEN '#FCA01D'
                    -- Setting to nice green color
                    WHEN (((abs(AP.RequestDetails.ValueToMonitors.Metric)/1024/1024)-(abs(AP2.RequestDetails.ValueToMonitors.Metric)/1024/1024))/(abs(AP.RequestDetails.ValueToMonitors.Metric)/1024/1024)*100) > 20 THEN '#1caa23'
                END
            WHEN AP.RequestDetails.ValueToMonitors.DisplayName = 'Heap Memory Usage' THEN '#0079AA'
        END AS Color
    FROM Orion.APIPoller.ApiPoller AP
    JOIN Orion.APIPoller.ApiPoller AP2 on AP2.ID=AP.ID
    -- The Api Poller Name
    WHERE AP.Name = '[Your API Poller Name]' 
    -- First: Both values, Total and used (for me it's the values starting with  'Heap Memory Usage'
    AND AP.RequestDetails.ValueToMonitors.DisplayName like 'Heap Memory Usage%'
    -- Second: Only the value of used Memory
    AND AP2.RequestDetails.ValueToMonitors.DisplayName = 'Heap Memory Usage'

     If you put that to a Donut you my get something like that:

    Donut_Example.png

  • Depends on how the custom property is attached, but if it was a Node-based custom property, it would go something like this:

    SELECT Min([CPU].AvgLoad) AS MinAvgCpuLoad
    , Max([CPU].MinLoad) AS MaxMinCpuLoad
    , Avg([CPU].AvgPercentMemoryUsed) AS AvgPercentMemory
    , [CPU].Node.Vendor
    FROM Orion.CPULoad AS [CPU]
    WHERE [CPU].DateTime >= GETUTCDATE() - 7
    AND [CPU].Node.CustomProperty.PropertyName = 'PropertyValue'
    GROUP BY [CPU].Node.Vendor
    ORDER BY AvgPercentMemory DESC

    This of course depends on your Property Name and the values.  But this should be a good place to start.

  •  
    Great job nice examples !!!

    By the way how do I add CP filter to each of those examples ?
    Or can I do it ones per dashboard?I basically need to have 3 copies for 3 different groups ...

  • As Kevin mentions in this lab episode, sometimes the best form of flattery is stealing someone else's creation. (only with regards to those shared freely) In that spirit, share your modern dashboard creations with us! If you were in live chat, I mentioned it was coming and for a limited time you can get some sweet THWACK points for sharing.

    Show us your customized dashboards