Hello there! I am trying to create a report that will show hosts that are not in a group. How would this be done?
SELECT n.NodeID, n.Caption, n.IP_AddressFROM SolarWinds.dbo.Nodes nWHERE n.NodeID NOT IN (SELECT cms.EntityID FROM SolarWinds.dbo.ContainerMemberSnapshots cms JOIN SolarWinds.dbo.Containers c ON c.ContainerID = cms.ContainerID WHERE cms.EntityType = 'Orion.Nodes' AND c.Name = 'YOUR GROUP NAME' )
SELECT
n.NodeID, n.Caption, n.IP_Address
FROM SolarWinds.dbo.Nodes n
WHERE
n.NodeID NOT IN
(
SELECT cms.EntityID
FROM SolarWinds.dbo.ContainerMemberSnapshots cms
JOIN SolarWinds.dbo.Containers c ON c.ContainerID = cms.ContainerID
cms.EntityType = 'Orion.Nodes' AND
c.Name = 'YOUR GROUP NAME'
)
Alex - Thank you VERY much. I was unclear however, I am looking for hosts that belong to no groups, not a specific group. How would I do that?
Pleasure. To do this simply remove last line "c.Name = 'YOUR GROUP NAME'" and also remove "AND" and the end of the previous line
So I followed you instructions (I think lol) and I got invalid Query. I cut and pasted the text in you original response and of course replaced it with a group name. It failed. I then remove the AND plus that last lint before the ) and that failed as well. Any advice?