SWQL Query Count Application templates applied

I'm having some difficulty with showing an application template count query.

I need to show an application template count that have been applied for an Application Dashboard, so in essence showing all the applications within the business.

Then I would like to drill down to each application and show their statues of each application for their AppOwners.

What I have is this so far;

SELECT Count(TemplateDisplayName) AS TemplateName
FROM n.Applications

 Hopefully someone can assist

  • OK, I've managed to update this a bit more, however I'm now looking for UrlLinks to drill down into the component issues that != 'Up'.

    This code shows my Down KPI for a particular application, however I've done it on the individual App ID's, I'd like it to filter on Custom Groups but I'm not able to get it working with Container filter.

    SELECT COUNT(Name) AS TemplateCount
    FROM Orion.APM.Component
    WHERE ApplicationID IN (1, 2, 5) and Status = '2'