Alert Graphic Display to get specific Applications or specific nodes in this code

I can get all Nodes but only one show specific Applications and Nodes only, so any help would be greatly appreciated.Thanks

SELECT
Count(c.AlertObject.AlertActive.TriggeredMessage) AS TheCount
, CASE WHEN D.Link is null then NULL
ELSE CONCAT(D.Link,'?filters=', c.InstanceSiteId, '_Orion.AlertConfigurations_Severity:eq:', c.Severity)
END AS Link
, CASE WHEN c.Severity = 2 then '#950000'
WHEN c.Severity = 3 then '#DD2C00'
WHEN c.Severity = 1 then '#FEC405'
WHEN c.Severity = 0 then '#176998'
WHEN c.Severity = 4 then '#999999' END AS [Color]
, CASE WHEN c.Severity = 2 then 'Critical'
WHEN c.Severity = 3 then 'Serious'
WHEN c.Severity = 1 then 'Warning'
WHEN c.Severity = 0 then 'Informational'
WHEN c.Severity = 4 then 'Notice' END AS [Severity]
, CASE WHEN c.Severity = 2 then 'severity_critical'
WHEN c.Severity = 3 then 'severity_critical'
WHEN c.Severity = 1 then 'severity_warning'
WHEN c.Severity = 0 then 'severity_info'
WHEN c.Severity = 4 then 'severity_info' END AS [StatusIcon]
, CASE WHEN c.Severity = 2 then 1
WHEN c.Severity = 3 then 2
WHEN c.Severity = 1 then 3
WHEN c.Severity = 0 then 4
WHEN c.Severity = 4 then 5 END AS [severity_order]
FROM Orion.AlertConfigurations c
LEFT JOIN
(
SELECT TOP 1 '/apps/platform/dashboard/' + TOSTRING(DashboardID) as Link
FROM Orion.Dashboards.Instances
WHERE DisplayName = 'Servers Summary - Alert Status'
ORDER BY DashboardID
) D ON 1=1
WHERE c.AlertObject.AlertActive.TriggeredMessage <> ''
AND (c.AlertObject.Node.Category=2)
GROUP BY c.Severity, D.Link, c.InstanceSiteId
ORDER BY severity_order

What it looks like below image:

  • what do you see when you try the following: It includes all alerts


    SELECT COUNT([ActiveAlerts].AlertActiveID) AS [AlertCount]
    , CASE [ActiveAlerts].AlertObjects.AlertConfigurations.Severity
    WHEN 0 THEN 'Informational'
    WHEN 1 THEN 'Warning'
    WHEN 2 THEN 'Critical'
    WHEN 3 THEN 'Serious'
    WHEN 4 THEN 'Notice'
    ELSE CONCAT('Unknown Severity: ', [ActiveAlerts].AlertObjects.AlertConfigurations.Severity)
    END AS [SeverityText]
    -- The logic here is that there may be other severity types added later (as positive integers),
    -- so the ones we have defined, we'll have as negative and sort ascending by this number.
    , CASE [ActiveAlerts].AlertObjects.AlertConfigurations.Severity
    WHEN 0 THEN -2 -- Informational
    WHEN 1 THEN -3 -- Warning
    WHEN 2 THEN -5 -- Critical
    WHEN 3 THEN -4 -- Serious
    WHEN 4 THEN -1 -- Notice
    ELSE [ActiveAlerts].AlertObjects.AlertConfigurations.Severity
    END AS [SeveritySort]
    , CASE [ActiveAlerts].AlertObjects.AlertConfigurations.Severity
    WHEN 0 THEN '#0099ff' -- Informational "Light Blue"
    WHEN 1 THEN '#f99d1a' -- Warning "Gold"
    WHEN 2 THEN '#ff0000' -- Critical "Red"
    WHEN 3 THEN '#fa8072' -- Serious "Light Red"
    WHEN 4 THEN '#4169e1' -- Notice "Blue"
    END AS [Color]
    , [ActiveAlerts].AlertObjects.AlertConfigurations.Severity
    FROM Orion.AlertActive AS [ActiveAlerts]
    GROUP BY [ActiveAlerts].AlertObjects.AlertConfigurations.Severity
    ORDER BY [SeveritySort]

  • also something i used before for few particular servers

    SELECT COUNT(1) AS Count_Items

         , Status

    FROM Orion.Nodes

    WHERE NodeName IN (

        'CAP-P........',

        'CAP-P0.......',

        'ILV-.......',

        'ILV-.......',

        'MND-.......',

        'MND-.......',

        'ODT.......',

        'ODT.......',

        'ODT.......',

        'ORTV........'

    )

    GROUP BY Status;



  • Hi Thanks for getting back to me and I get the display below, but I am trying to for example get just a few specific servers and applications only within this type of notification?

  • You can try something i have posted below for specific servers. As far as application goes, that would be good to see such a widget and someone else may help with that. 

  • I believe you are re inventing the wheel. Look at the following example someone created already. you can find the application info from this particular dashboard.

    All in on Modern Dashboards

    there is a modern dashboard for server and network. use the server one, then go to the application widget and copy the same query and use it the way you want it. 


    This is an example picture for you to see:

  • So whats the things in quotes abbreviated short for the object names?

  • oh those were my 8 Domain controllers so i choosed all of them but you can do it in many other ways.

  • Hey Thanks for the quick reply and this may work, so let me try it and get back to you and since I am not a programmer or developer excuse my questions, but how do I get this embedded within the dashboard to only show specific objects we want to see?