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.

600+ Groups to add ... how please

Hi,

Our setup is running quite smoothly but we now need to integrate a new client with an older version of Solarwinds. It isn't feasible to update their SWI setup, and it is already running at 15-% of/over capacity. Ther way forward as we see it would be to get the groups created, export their nodes list, and then re-import once we've aligned any CPs. But, they have >600 groups with most of them being sub groups.

Can someone walk me through the how of "creating" the groups as I really don't want to be doing it manually. Or at the very least can point me at a post that already shows this?

Unfortunately we have rudimentary Powershell and SWQL skills sets, so really would need a bit of hand-holding on this, or at worst someone's ABC that we could adapt.

  • So in almost all cases where someone showed me an environment with 600 groups in it I could usually see a fairly clear pattern where they didn't even need those groups, they just needed to get a better understanding of how to use custom properties.  There are a few exceptions but to be honest those exceptions are usually pretty advanced/rare use cases.  So before you sat down and buried some poor sucker in copy/paste work for the next week you might review "What are we even doing with these groups?" and make sure it is worth the investment to bring them over.  It can get a bit iffy to have someone remotely try to hold your hand through a Powershell script if you don't already have a pretty good handle on SWQL and the scripting in general.

    I had a colleague at my old job who I know had written a full powershell script to migrate groups from one environment to another, maybe he can weigh in with an example of that kind of code if he still has a copy handy. ?

  • Marc,

    I hear what you say but I'm not sure I totally understand. The 'sucker' is mostly likely to be me and thus my question.

    But let's address my elephant .... I have a, let's say, ok handle on CPs but I don't see how they replace or supplement groups? The use situation is could be broken down this way:

    > Client
        >> Location
            >> Building / Site 1
            >> Building / Site 2
            >> etc

    So, as you say, perhaps this is our issue and maybe you can explain for me an alternative way with CPs?

    Each site group will need to have its own map if this makes any difference?

  • Every layer there would be a custom property, clients, locations, sites. If you want to see their status aggregated then the all nodes widget can be sorted by up to 3 layers of custom properties so it would end up looking almost identical to the group tree you describe.
    If you do already happen to have corresponding properties that match the scheme you described then I actually do have an example script in my github to take a set of custom properties and build out a nested group tree to match them, https://github.com/Mesverrum/MyPublicWork/blob/master/AppAndAppRoleGroupBuilder.ps1
    That would need some work to match to your scenario but the concept is there. I used a version of that running as a scheduled task to build and maintain a group tree for a company with some 400 locations before.

    As far as the map for each site, there's a few ways you can get there but they are probably all just as tedious/script heavy as building groups so that's a wash.

    Hopefully you can use that code to get you along.
  • Thank you as always Marc.

    I'll take your suggestions and put it to the guys to see what's what. I've also just found out that I now have access to the old Solarwinds for this client, so I'm going to go and see how they have done this. They may already have taken the approach of using CPs but I was basing what they have done on conversations thus far.

    The maps unfortunately are non-negotiable and will need to be created/associated.

  • If the topology of your gear is being picked up nicely then each group will get their automatic map and when those work they are great, but i find that I'm never quite that lucky and end up preferring to build my own mapping.  Since I know that I wouldn't personally be interested in spending a lot of time doing anything relating to the old maps on a current release you could add a custom query widget with this query to the group details page.  It would require an extra click to pull up your map, but it's better than nothing while we continue to lean on SW to come up with a built in solution to that particular loss.

    mesverrum_0-1607965304047.png

    SELECT 
    
    displayname as Map
    , '/ui/maps/viewer/' + projectid as _linkfor_Map
    , case when displayname = '${name}' then 'Custom Map for this Group'
    else 'Other Maps Containing this Group'
    end as Type
    
    
    FROM Orion.Maps.Projects
    where displayname = '${name}'
    or data like '%Orion.Groups_${id}/%'
    
    order by type, map

    If it's not obvious I would save the map with the exact same name as the group for it to be my "official" map and then anything that didn't match that but contains a reference to this group would be the rest.

  • I truly appreciate that Marc and actually that code I am able to follow it through**.

    One option I can see is rather than having a "live map" is that we export all their current maps and use your code to associate the group and map name together. So when a 'relevant' piece of kit is looked at it 'associates' the map to it. Hmmm. 

    ** which is very different from me 'writing' it but at least I understand it.