I'm trying to find the table that joins Orion.Group (or Orion.Container) to Orion.APM.Applications.
The Orion.ContainerMembers table only have information about Nodes, but I can't find applications there.
Thank you juniordev. I managed to find what I needed with the following query:
SELECT app.NodeID as NodeId, app.ApplicationID as AppID, app.FullyQualifiedName as AppName, c.Name as GroupName
FROM Orion.APM.Application app
LEFT JOIN Orion.ContainerMemberSnapshots cms on cms.MemberUri = app.Uri
LEFT JOIN Orion.Container c on c.ContainerID = cms.ContainerID
I know it is not completely correct but maybe it is helpful for you. This code gives you for a node applications.
SELECT cm.ContainerID, n.Caption, apps.Name
FROM Orion.ContainerMembers cm
inner join Orion.Nodes n on CONCAT('swis://<hostname>/Orion/Orion.Nodes/NodeID=', n.NodeID) = cm.MemberUri
inner join Orion.APM.Application apps on apps.NodeID = n.NodeID
WHERE MemberEntityType = 'Orion.Nodes'
AND n.NodeID = 12009
You must change <hostname> info according to your system/hostname. And this code referred to Orion.Nodes Entity Type. You should change for that your purpose.
How often is ContainerMemberSnapshots updated ?
Also how is it updated ?
The ContainerMemberSnapshots are being updated so often, how you set the refresh frequency when creating the container (the first screen when adding/editing the group). It's by default set to 1 minute, so basicaly this means, that each minute there's evaluated the group membership ("Dynamic query" conditions + Static members), calculated the group availability and the tables are updated (as well as the account limitations based on the Containers are applied).
This is an interesting question.
I was baffled by this too, but as I was querying SWQL Studio for and API query to use, using ContainerMemberSnapshots was the table that actually reflected what I see in the Solarwinds UI.
I've tried adding nodes / apps / components / etc to groups and checked what was the behaviour in the ContainerMemberSnapshots table, and that is the one that seems to be updated. Would it be possible that there are more tables linking Groups to other entities in SW?