Brink,
Are you asking how to find nodes that don't belong to ANY groups? I wanted to ensure my dynamic queries were working and use this in a Custom Query resource to return that:
SELECT
n.caption as Node
, n.DetailsUrl AS [_LinkFor_Node]
, '/Orion/images/StatusIcons/Small-' + n.StatusLED AS [_IconFor_Node]
, n.customproperties.system
, n.Contact
, n.location
FROM Orion.Nodes n
left join Orion.ContainerMembers c on c.MemberPrimaryID = n.nodeid
where c.MemberPrimaryID is NULL
Inversely this will return groups which have no members:
SELECT
G.ContainerID
, G.Name
, G.DetailsURL as [_LinkFor_Name]
, '/Orion/images/StatusIcons/Small-' + G.StatusDescription + '.gif' AS [_IconFor_Name]
, G.pollingenabled
, G.unmanaged
FROM Orion.Groups G
left outer join Orion.ContainerMembers M on G.containerid = M.containerid
where m.containerid is null
order by containerid desc
Credit to anyone else who might have supplied these to me. You're awesome.