We are migrating from another Network Monitoring System to Solarwinds and it is my job to automate the transfer of monitoring.
We want to maintain the tree-like group structure we had in the previous NMS, so my eye fell on the 'CreateContainerWithParent' verb. I couldn't find proper documentation for it, but did find out through some experimentation that it takes it's first argument as the ID of the Parent group.
This works wonderfully, except that it will ignore any child definition specified after the first.
So in this case, it will create the group 'Test_Group', under parent group '3', with it's only child being the node with NodeID '724'.
So my question is: is there a way to let this verb accept multiple children, or do I have to manually(through AddDefinition) add children to this group? The latter would be less desirable since it adds more API calls and there are a lot of nodes to transfer.
group_id = swis.invoke('Orion.Container', 'CreateContainerWithParent', '3', 'Test_Group', 'Core', 60, 0, 'Test_Group', True, [ {'Name': 'Test_Node', 'Definition' : 'swis://XXXX-XXXX./Orion/Orion.Nodes/NodeID=724'}, {'Name': 'Apples', 'Definition' : 'swis://XXXX-XXXX./Orion/Orion.Nodes/NodeID=725'} ] )
Thanks!
P.S. For bonus points: where does the 'Name' in the Name/Definition thing go? I've looked around in newly created groups and the nodes in them, but couldn't really find where this information goes.
P.P.S. For additional bonus points: where do groups go when you don't assign 'Core' as their owner? Before I found CreateContainerWithParent, I tried to simply change the owner to the parent group I wanted. The query succeeded and did return a groupID, but when I try to open a webpage for that ID, it doesn't exist.