4 Replies Latest reply on Apr 15, 2012 9:00 PM by Bill Robinson

    List Server Group by Server Name

      I'm not seeing any support or unsupport blcli command to accomplish this; wondering if anyone has a fast/easy solution.


      In short, I've a list of 50 or so servers that I want to identify the server group tree. Search finds the host, but no reference to the group is indicated; the same when using a filter on all servers.


      I thought about writing a script, to pull a list of all server groups (a HUGE list), and then parse through that list, branch by branch, get the list of servers in the group, and write all this to a file... THEN a could loop through my list of servers and search the file for corresponding entries.


      If my server list were 100's maybe this would make sense, but seems much work for what I'd hope has a simple solution...





        • 1. Re: List Server Group by Server Name
          Bill Robinson

          You can get a list of servers in a group, but not the other way around.


          What are you trying to accomplish here ?

          • 2. Re: List Server Group by Server Name



            Alll of our servers (as many other BL clients) are organized by application teams groups with sub group organizations for environment (UAT, PROD, etc.).


            There are huge numbers of groups, each with large numbers of subgroups and further subgroups.


            Hence, 'finding' the tree that a server lives in is difficult. Knowing the branch of the tree is relevant and often necessary; for knowing what roles should be associated to a server (roles are usually associated to specific branches) or for knowing what department (people) have some level of responsibility for a server.


            Using the tables or search commands will locate a server, but not provide any indication of what branch it is in. Same with the current blcli calls.


            I see this as a product gap -- as indicated by other request from users for exactly this functionality (some requests years old).


            Perhaps you could help with a work around? Whether via script (ugh) or a new 'unsupported' blcli command?



            • 3. Re: List Server Group by Server Name

              As a script (off the top of my head, haven't even tried this, sure it won't work..)



              startGroup ="/"
              echo "==========================================" > ${outputFile}
              echo "========== `date`" > ${outputFile}

              echo "GROUP = ${group}" >> ${outputFile}
              blcli Server listServersInGroup ${group} >> ${outputFile}
              subGroupCnt = `blcli ServerGroup listChildGroupsInGroup ${group} | wc -l`
              while [ i -lt ${subGroupCnt} ]
              echo $i
                for subGroup in `blcli ServerGroup listChildGroupsInGroup ${group}
                 echo "subGROUP = ${subGroup}" >> ${outputFile}
                 blcli Server listServersInGroup ${subGroup} >> ${outputFile}
              let "i++"



























































              • 4. Re: List Server Group by Server Name
                Bill Robinson

                yeah - something like that is what you'd need to do.  you may want to reconsider how you assign permissions, group membership and start using smart groups more.   since we don't have inheritance based on group membership, basing rbac on what group a server is in is probably not the best plan.  i'd look into using properties and smart groups.