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.

2020.2.5 breaks some modern dashboard queries

Hi there!

We're using a swql query to list all active volume alerts and some of the relevant details of those alerts. This query still works in swql studio, as well as in the old dashboard (custom table), but the table widget in our modern dashboard is now empty (query broken after the update to 2020.2.5). 

Here's the query in question:

SELECT o.AlertConfigurations.Name AS [ALERT NAME],
    '/Orion/NetPerfMon/ActiveAlertDetails.aspx?NetObject=AAT:' + ToString(o.AlertObjectID) AS [_LinkFor_ALERT NAME],
    CASE WHEN o.AlertConfigurations.Severity = 2 THEN '/Orion/images/ActiveAlerts/Critical.png'
        WHEN o.AlertConfigurations.Severity = 3 THEN '/Orion/images/ActiveAlerts/Serious.png'
        WHEN o.AlertConfigurations.Severity = 1 THEN '/Orion/images/ActiveAlerts/Warning.png'
        WHEN o.AlertConfigurations.Severity = 0 THEN '/Orion/images/ActiveAlerts/InformationalAlert.png'
        WHEN o.AlertConfigurations.Severity = 4 THEN '/Orion/images/ActiveAlerts/Notice.png'
    END AS [_IconFor_ALERT NAME],
    o.EntityCaption AS [ALERT OBJECT] ,o.EntityDetailsURL AS [_LinkFor_ALERT OBJECT],
    CASE WHEN o.RelatedNodeCaption=EntityCaption THEN 'Self'
        WHEN o.RelatedNodeCaption!=EntityCaption THEN RelatedNodeCaption 
    END AS [RELATED NODE],
    o.RelatedNodeDetailsURL AS [_LinkFor_RELATED NODE],
    ToLocal(o.AlertActive.TriggeredDateTime) AS [ALERT TRIGGER TIME],
    '/Orion/images/StatusIcons/Small-' + p.StatusIcon AS [_IconFor_RELATED NODE],
    CASE WHEN minutediff(o.AlertActive.TriggeredDateTime,GETUTCDATE())>1440
            THEN (tostring(round(minutediff(o.AlertActive.TriggeredDateTime,GETUTCDATE())/1440.0,1)) + ' Days') 
        WHEN minutediff(o.AlertActive.TriggeredDateTime,GETUTCDATE())>60 
            THEN (tostring(round(minutediff(o.AlertActive.TriggeredDateTime,GETUTCDATE())/60.0,1)) + ' Hours') 
        ELSE (tostring(minutediff(o.AlertActive.TriggeredDateTime,GETUTCDATE())) + ' Minutes') 
    END AS [Time Active] ,aa.AcknowledgedBy,
    ah.Message AS [Note],
    round(v.VolumePercentUsed,2) AS [PERCENT USED],
    round(v.VolumeSpaceAvailable/1024/1024/1024,2) AS [GB FREE]
    FROM Orion.AlertActive aa join Orion.AlertObjects o on aa.alertobjectid=o.alertobjectid
    LEFT JOIN Orion.Nodes p on p.nodeid=relatednodeid 
    LEFT JOIN Orion.Volumes v ON v.VolumeID=Substring(EntityNetObjectId, 3, 20)
    LEFT JOIN orion.alerthistory ah on ah.AlertActiveID=aa.AlertActiveID and ah.EventType in (2,3) 
    WHERE o.EntityNetObjectId LIKE 'V:%'

It seems that o.AlertConfigurations.Name no longer works, when using modern dashboard. To me, this feels like a bug.

Does this work for anyone else? 

Kind regards

Ariano

Parents
  • Update: I started a case to get this issue reviewed. 

    Here is a shorter version of the query, just to reproduce the issue:

    SELECT o.AlertConfigurations.Name
    FROM Orion.AlertActive aa join Orion.AlertObjects o on aa.alertobjectid=o.alertobjectid
    WHERE o.EntityNetObjectId LIKE 'V:%'

    This works in 2020.2.4 (old and new dashboard/custom table widget) and in the old dashboard in 2020.2.5.

    It also works in both versions using swql studio.

    Using 2020.2.5 and a modern dashboard leads to empty widgets and error messages ("exceptionMessage": "RunQuery failed, check fault information.\nno viable alternative at input 'NAME' in Select clause",).

  • I can't get that query to work in 2020.2.4 either. BUT, doing the joins manually works. 

    SELECT
      --o.AlertConfigurations.Name,
      AC.Name
    FROM Orion.AlertActive aa
    INNER join Orion.AlertObjects o on aa.alertobjectid=o.alertobjectid
    INNER JOIN Orion.AlertConfigurations AS AC ON O.Alertid=AC.Alertid
    WHERE o.EntityNetObjectId LIKE 'V:%'
Reply
  • I can't get that query to work in 2020.2.4 either. BUT, doing the joins manually works. 

    SELECT
      --o.AlertConfigurations.Name,
      AC.Name
    FROM Orion.AlertActive aa
    INNER join Orion.AlertObjects o on aa.alertobjectid=o.alertobjectid
    INNER JOIN Orion.AlertConfigurations AS AC ON O.Alertid=AC.Alertid
    WHERE o.EntityNetObjectId LIKE 'V:%'
Children
  • Interesting. For me, both versions work just fine in swql studio and the old dashboard, but the modern dashboard still breaks:

    "message": "An error has occurred.",
    "exceptionMessage": "RunQuery failed, check fault information.\nno viable alternative at input 'NAME' in Select clause", ...

    I do have a second installation, still running 2020.2.4 and i can confirm the original query works there in the old and the new dashboard.

  • Had to test in another 2020.2.4 - did not work. Validate query shows green but actually running the query results in error.

    The the manual join and it will work.

  • Thank you for trying! To clarify: when I said "both versions" in my response to you, I meant the manual join as you mentioned. This works fine in 2020.2.4 (as does the o.AlertConfigurations.Name - for me anyways), but in 2020.2.5 it also breaks the modern widget (same error message as before). I'm curious what the official response will be...

  • So this:

    SELECT
    --o.AlertConfigurations.Name,
    AC.Name
    FROM Orion.AlertActive aa
    INNER join Orion.AlertObjects o on aa.alertobjectid=o.alertobjectid
    INNER JOIN Orion.AlertConfigurations AS AC ON O.Alertid=AC.Alertid
    WHERE o.EntityNetObjectId LIKE 'V:%'

    does not work for you in 2020.2.5? It does work for me.

  • I made the mistake to test with the modified complete query, which did not work in the modern dashboard, while it does in swql studio and the old dashboard. 

    The short version on its own works, as it should. Good! But now for the strange part: I slightly reduced the query to this:

    SELECT ac.Name AS [ALERT NAME],
        o.EntityCaption AS [ALERT OBJECT] ,o.EntityDetailsURL AS [_LinkFor_ALERT OBJECT],
        CASE WHEN o.RelatedNodeCaption=EntityCaption THEN 'Self' 
            WHEN o.RelatedNodeCaption!=EntityCaption THEN RelatedNodeCaption 
        END AS [RELATED NODE],
        o.RelatedNodeDetailsURL AS [_LinkFor_RELATED NODE],
        ToLocal(o.AlertActive.TriggeredDateTime) AS [ALERT TRIGGER TIME],
        CASE WHEN minutediff(o.AlertActive.TriggeredDateTime,GETUTCDATE())>1440 
                THEN (tostring(round(minutediff(o.AlertActive.TriggeredDateTime,GETUTCDATE())/1440.0,1)) + ' Days') 
            WHEN minutediff(o.AlertActive.TriggeredDateTime,GETUTCDATE())>60 
                THEN (tostring(round(minutediff(o.AlertActive.TriggeredDateTime,GETUTCDATE())/60.0,1)) + ' Hours') 
            ELSE (tostring(minutediff(o.AlertActive.TriggeredDateTime,GETUTCDATE())) + ' Minutes')
        END AS [Time Active],
        aa.AcknowledgedBy, 
        ah.Message AS [Note],
        round(v.VolumeSize/1024/1024/1024,2) AS [VolSize],
        round(v.VolumePercentUsed,2) AS [PERCENT USED],
        round(v.VolumeSpaceAvailable/1024/1024/1024,2) AS [GB FREE]
    FROM Orion.AlertActive aa join Orion.AlertObjects o on aa.alertobjectid=o.alertobjectid
        LEFT JOIN Orion.Nodes p on p.nodeid=relatednodeid 
        LEFT JOIN Orion.Volumes v ON v.VolumeID=Substring(EntityNetObjectId, 3, 20)
        LEFT JOIN orion.alerthistory ah on ah.AlertActiveID=aa.AlertActiveID and ah.EventType in (2,3) 
        INNER JOIN Orion.AlertConfigurations AS ac ON O.Alertid=AC.Alertid
    WHERE o.EntityNetObjectId LIKE 'V:%'

    Now it not only validates correctly, but also shows results when testing the query within the new dashboard.

    I can see the correct results and I can save the query and setup the widget, but saving the widget settings still results in the same error message and the widget remains empty. Disappointed

    Edit: now I removed everything related to AlertConfigurations (inluding the join) to see what happens and it still breaks in the modern dashboard, while it still works fine in swql studio.

    Edit 2: I also tried adding a new widget to a new dashboard and using the modified query there. Same result, sadly.

    I think i will leave it at that, for the time being. I found some other broken table widgets on a different dashboard. Those are related to SRM Objects (File Shares, NAS Volumes). I don't think this is related to the queries themselves, since they all work in 2020.2.4 and still do in 2020.2.5 when I check them using swql studio.