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.

All Groups with count of members in title

All,

I saw a post for a feature enhancement where the groups names would include a count of the members in paran's. The requester had seemed to be able to do this with SWQL, but my swql skills are limited, I'm wondering if anyone has seen this or has a solution to provide an output that looks similar to this:

grouped_nodes_with_count_2.png

This would be really useful in our environment, as a quick reference to the node levels within the groups.

I was referencing this thread in Thwack when I came across it:

but the example SWQL was never posted...

Appreciate any help on this.

Thanks

SteveT

  • I'm assuming their SWQL resource doesn't have all the fun javascript expanding menus unless they completely rolled their own resource.

    Basically it would be something like

    Select Name, count(name) as [Count] from orion.containers group by name

    Thats off the top of my head though, it could be orion.container if you get an error.  You could probably get a lot more elaborate with how you present that data but this is the basic info.

  • I finally got something close with a custom SWQL:

    SELECT   g.Name

    , g.detailsURL as [_Linkfor_Name]

    , '/Orion/images/StatusIcons/Small-' + g.StatusDescription + '.gif' AS [_IconFor_Name]

    , g.Description

    , Count(cm.ContainerID) as [Group Members]

    FROM Orion.Groups g

    INNER JOIN Orion.ContainerMembers cm on cm.containerid = g.containerid

    GROUP BY g.Name;

  • Change INNER JOIN to FULL JOIN and it will show empty groups as well.