SWQL issues with modern dashboards

So I've watched labs #86, 91, and 93. I've used the SWQL Functions on Github multiple times/ways. When modern dashboards came out they seemed bugged to me so I've waited a few years and now I figured I would give them a chance with this new deployment I'm working on, and I can say without a doubt they aren't a replacement of Classic dashboards, they are a niche view when you want something colorful and that's all... in my opinion. Continue reading if you want to save yourself the wall-banging headache of figuring this out yourself.

I'll start with what I think is the most glaring issue, there are no built-in widgets. The classic dashboard has 100s of not 1,000s of premade widgets to get you started, the modern dashboard leaves you high and dry. This alone should have been a good indicator that modern dashboards aren't ready for prime time, but I ignored the warning signs.

Well just re-create them yourself you say? Maybe I'm missing something but it doesn't look possible to me. Let's start with the tried and true widget that almost every department wants, the tree view grouped in some way. i.e. department, machine type, region, vendor, etc. The Graphical Query Builder and SWQL have no way to set up an expandable group like that. So it's just going to be a big list that you have to scroll through rather than nested groups that with a quick glance show you where and what isn't green and happy. That's about useless as widgets go.

The labs indicated that SWQL is basically SQL with a few small differences, and they plaster this list:

However, when you try to put commas in big numbers you'll be out of luck.

  • Format? Not found
  • VarChar? Not found
  • Convert? Not found
  • DateAdd? Sometimes if it likes you but you're better off using AddDay
  • AS Decimal? Nope

You'll use Round, and you'll like it!

Dates are next up. Let's say you're using the Graphical Query Builder and you want to use the compact view... I mean it's listed there. Denied!

So go over to SWQL and use DateTime to format it the way you want right? Wrong you'll use DateTrunc and you'll like it!

On top of the issues where you must use Having instead of Where with aggregate functions you'll run into issues where it just won't work. Expect to spend time trying to find a workaround, and then having to settle with what they give you to work with.

I really wanted to move forward to modern dashboards as the graphs are pretty sexy, but the functionality just isn't there, and given all the posts and guides on them are two years old it doesn't seem like they are developing them anymore. Save yourself the headache and use classic dashboards maybe someday they'll circle back around to modern dashboards and we can finally move forward with using them in production environments. What a letdown. Disappointed

  • Thanks for the feedback on the Modern Dashboards.  Did you already check out the content (with customizations) that we've put into the Content Exchange? If you can, would you be able to share the query so we can examine it more closely.  Most (yes, not all) of the customizations should be happening automatically and I'd like to see what you're seeing.

  • I mostly use Modern Dashboards as summary pages and they are useful for wallboard displays. I agree there are various things with them that would make life a bit easier. 

    I have also run into the same DateTime format issue.

    As an example for , any query with a DateTime field:

    e.g SELECT TOP 10 NodeID, DateTime from Orion.ResponseTime

    • Raw output - no formatting


    • Format = Datetime. Datetime Format = Full


    • Format = Datetime. Datetime Format = Compact.  This errors out and you can't save the change.

    So your only option is the super long date format, or the default format, or format the datetime in the SWQL query itself.

  • You should see the same issue if you try to use the functions listed, are you looking for me to make a video of it throwing the error? Find me a way to group like the tree view in classic. Find me a way to put commas into big numbers. If you're confined to only use the modern dashboard you're confined to using SWQL and I've listed several gaps in it which should be easily testable/verifiable. That said here is a query that has the examples I referenced... I think.

    I pasted a screenshot of the error when trying to use compact format for date/time but Shuth below has a more detailed post on it below so I won't go into that one. 

    , N.Caption
    , N.DetailsUrl
    , INT.Name
    , IT.InterfaceID
    -- Date Time insanity
    , datetrunc('minute',IT.datetime) as Date
    , Round(IT.InAveragebps / 8 / 1000000, 1) AS InAvgMBps
    , IT.InMinbps
    , IT.InMaxbps
    , IT.InTotalBytes
    , IT.InTotalPkts
    , Round(IT.OutAveragebps/ 8 / 1000000, 1) AS OutAvgMBps
    , IT.OutMinbps
    , IT.OutMaxbps
    , IT.OutTotalBytes
    -- Number formating woes
    , IT.OutTotalPkts
    , IT.TotalBytes
    , IT.TotalPackets
    , Round(IT.Averagebps/ 8 / 1000000, 1) AS AvgMBps
    , IT.Description
    , Round(IT.OutPercentUtil, 1) AS OutPerUtil
    , Round(IT.InPercentUtil, 1) AS InPerUtil
    , Round(IT.PercentUtil, 1) AS PerUtil
    FROM Orion.NPM.InterfaceTraffic as IT
    INNER JOIN Orion.Nodes N ON N.NodeID = IT.NodeID
    INNER JOIN Orion.NPM.Interfaces INT ON INT.InterfaceID = IT.InterfaceID
    WHERE IT.DateTime >= AddDay(-7, GETUTCDATE())
    AND IT.PercentUtil > 10.0
    ORDER BY IT.PercentUtil DESC

  • This feels like a bug for Modern Dashboards.  Has anyone opened a ticket?  If so, DM me the number and I'm happy to look into it.

  • I can confirm that the formatting of compact is OK as a JSON option

    [Option value of 0 = Compact, Option value of 1 = Full]

    This is most definitely a bug (IMHO) and someone should raise a ticket.

    How did I test this?

    1. I created the table widget using this query:
      SELECT TOP 10 [Nodes].Caption
           , [Nodes].DetailsUrl AS [CaptionUrl]
           , [Nodes].Interfaces.Caption AS [InterfaceCaption]
           , [Nodes].Interfaces.DetailsUrl AS [InterfaceUrl]
           , [Nodes].Interfaces.Traffic.Averagebps AS [AvgBps]
           , [Nodes].Interfaces.Traffic.InAveragebps AS [InAvgBps]
           , [Nodes].Interfaces.Traffic.InMinbps
           , [Nodes].Interfaces.Traffic.InMaxbps
           , [Nodes].Interfaces.Traffic.InTotalBytes
           , [Nodes].Interfaces.Traffic.InTotalPkts
           , [Nodes].Interfaces.Traffic.OutAveragebps AS [OutAvgBps]
           , [Nodes].Interfaces.Traffic.OutMinbps
           , [Nodes].Interfaces.Traffic.OutMaxbps
           , [Nodes].Interfaces.Traffic.OutTotalBytes
           , [Nodes].Interfaces.Traffic.OutTotalPkts
           , [Nodes].Interfaces.Traffic.ObservationTimestamp
      FROM Orion.Nodes AS [Nodes]
      WHERE [Nodes].Interfaces.Traffic.ObservationTimestamp >= AddDay(-7, GETUTCDATE())
        AND [Nodes].Interfaces.Traffic.PercentUtil > 10.0
      ORDER BY [Nodes].Interfaces.Traffic.PercentUtil DESC
    2. I selected the date field's formatting as DateTime and selected full.
    3. I saved the Modern Dashboard.
    4. I exported the Modern Dashboard.
    5. I edited the resulting JSON and flipped the 1 to 0 in the formatter properties for that field.
    6. I saved the JSON file.
    7. I imported it back to my Orion Platform with the -Force parameter to allow overwrite.

    This is my result:

     This is also why I think this is a bug with the UI of the Modern Dashboard builder: definitions that exist and are formatted correctly will render, but you just can't select the Compact option from the drop down and get it to save. 

  • It's one bug of many, and given the modern dashboards have been out over 2 years at this point it's pretty sad it's this buggy.

  • Thanks for the workaround . I'll happily put a ticket in for SolarWinds on this if nobody has yet. I just noticed this last week when building a team dashboard template based off 's template.

  • That would be lovely.  Then DM me the case # so I have a record.  I think the team is already working on it, but having customers state that they are seeing this in the wild is preferred.  After all, if no one opens a ticket, the team doesn't know that the thing isn't working.  

  • Case submitted Grinning sent you the case #. Also was able to use your workaround in my template, nice!

  • Appreciate it - once we have the issue tracked internally, then it can be bubbled up to the devs to see if a HF can be issued to resolve the issue.