This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

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

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

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

  • Hey KMSigma, I am encountering this issue still, any word on when this issue may be resolved?

  • The inability to select "Compact Date" in DateTime fields in Modern Dashboards has been fixed in HF5 for the SolarWinds Orion Platform 2020.2.6.  Please visit your customer portal to download any hotfixes or use the Centralized Upgrade process to perform an online upgrade.

  • By this do you mean just the inability to select compact or all the other issues I encountered?

Reply Children
  • I only checked on the Compact Date Selection issue.  Multiple issues were remedied within that hotfix, but I didn't ask for the complete list of fixes.

  • You reminded me that I completely omitted your other concerns at the top of this post and fixated on the thing that was most definitely a bug.  Thanks for reminding me.

    Most of your other concerns are about the SWQL language/functions and not the Modern Dashboards specifically.  I can address a few of them here.

    • Converting integers to real: To convert an integer to a decimal, you can multiply it by 1.0.  This forcibly converts the integer type to a real type.  I use this all the time when working with aggregate functions.  Depending on the need, you are correct, I'll add a Round function if necessary.
    • Date Manipulation: The DateTime function is old and I've never had much success with it (personally).  Through some magic the API already can recognize when a string is in a Date/Time format and will automatically use the passed data in that way.  If you want just the date (or month, or hour, or minute), you are correct, the DateTrunc function is better.  If you want to add or difference, there are several options available to you (AddDate, AddDay, AddMinuteDayDiff, HourDiff, etc.) and are outlined on the SWQL Functions (Date/Time Functions) - SolarWinds Orion SDK GitHub. I've only recently started using the DownSample function and pretty much fell in love with what it can do.
    • String Manipulation: I'll agree here that there are some limitations to what's been implemented in the SWQL Functions for string manipulation.  Honestly it makes me think of working with Excel years ago.  But between the ToString, CharIndex, SubString, Replace, and Len functions, I can do most of what I need. I've also used the array functions to do some string manipulation, but only in very select scenarios.

    Between these and the ability to to subqueries, I'm only encountered a handful of scenarios I haven't been able to complete.

    If there's a function you absolutely have to have, you should consider putting in a Feature Request for the platform (or upvote one that already exists).  If you do, add the tag "SWQL" so it can be isolated from other requests.

  • How do you do an expandable tree view in the modern dashboard?

  • Currently not possible because it wasn't intended to be part of the "dashboard" idea.  Modern Dashboards were intended (at least when first developed) to be a replacement for NOC views (ie. a view where you don't click on things and it shows).

    That doesn't mean that people haven't expanded on their uses (myself included) and want additional features.  This is one reason the product managers dump a list of Feature Requests when planning the next versions. Along with that list is the inclusion of saved maps.

    Are Modern Dashboards "done"? Absolutely not, but they are making incremental progress as dictated by the people who use them, share their content, and participate in User Experience studies.