8 Replies Latest reply on Jun 8, 2016 3:49 PM by matrook

    Auto Grouping by Node Location.

    matrook

      Dears,

       

      Good day to all, i wondering if we can do auto Grouping to all nodes under each area by few steps rather than creating 100 groups and each group we have to create the query to list the nodes under it.

       

      My point is:

       

      Creat some kind of query to list all the 100 areas as a groups and will list all nodes under the correct area without manually creating all the groups and listing all nodes under a specific area manually.

       

       

      Please help me with this. Thank you very much in advance.

        • Re: Auto Grouping by Node Location.
          john.ta

          If you are wanting groups you would have to build them manually and then create query that says automatically put anything with location=X (if your SNMP is reporting location) in this group.  You cannot have it automatically create groups, but you can kinda do what you are looking for just using node list.  In the "All Nodes" list you can display all nodes grouped by location, which gives you basically what you are looking for.

            • Re: Auto Grouping by Node Location.
              matrook

              Thank you very much brother. unfortunately I need to automate the creation of the groups by location.

              thanks anyway for your reply and support. appreciate it.

                • Re: Auto Grouping by Node Location.
                  john.ta

                  Is your location set on the devices?  Or are you looking to set a location via custom property or something?

                   

                  For example, on a Cisco device, you can set the following command:

                   

                  snmp-server location Home Office

                   

                  This sets the SNMP location as "Home Office" and this is automatically populated by Solarwinds.  You can then view the "All Nodes" list and group based on location.  This essentially gives you what you are looking for, but isn't a Solarwinds "group" however.

                  .thwack.PNG

              • Re: Auto Grouping by Node Location.
                Jan Pelousek

                Hello, this is scenario, which is the group management not ready for, however you're able to simply achieve this by using Orion SDK. Some info is here: Orion SDK Information and is hosted currently on GitHub GitHub - solarwinds/OrionSDK: SDK for the SolarWinds Orion platform, including tools, documentation, and samples in Powe…

                To get you quickly on board, I prepared PowerShell script, which should do what you need. Just modify the IP of your Orion ($Target variable) and the access admin Orion credentials (Connect-Swis part).

                What the script does:

                1. Get distinct values of Location, which are set for Nodes
                2. For each location create dynamic group (Location = 'xyz'). Group is named the same as location and checks if such group doesn't already exist.

                 

                I hope it helps.

                Honza

                  • Re: Auto Grouping by Node Location.
                    matrook

                    THANKS a lot brother for your support and time to reply back. I love your idea and it was my wish. but unfortunately it doesn't work well and I faced many errors and this is the most error I got.

                     

                     

                    Connect-Swis : The term 'Connect-Swis' is not recognized as the name of a cmdlet, function, script file, or operable program. Check

                    the spelling of the name, or if a path was included, verify that the path is correct and try again.

                    At C:\Users\Administrator\Desktop\CreateGroupsForLocations.ps1:43 char:10

                    +     $swis = Connect-Swis -host $Target -UserName ******* -Password "*******"

                    +             ~~~~~~~~~~~~

                        + CategoryInfo          : ObjectNotFound: (Connect-Swis:String) [], CommandNotFoundException

                        + FullyQualifiedErrorId : CommandNotFoundException

                     

                    Get-SwisData : The term 'Get-SwisData' is not recognized as the name of a cmdlet, function, script file, or operable program. Check

                    the spelling of the name, or if a path was included, verify that the path is correct and try again.

                    At C:\Users\Administrator\Desktop\CreateGroupsForLocations.ps1:45 char:28

                    + [System.Array]$locations = Get-SwisData $swis "SELECT DISTINCT Location FROM Ori ...

                    +                            ~~~~~~~~~~~~

                        + CategoryInfo          : ObjectNotFound: (Get-SwisData:String) [], CommandNotFoundException

                        + FullyQualifiedErrorId : CommandNotFoundException

                     

                    Get-SwisData : The term 'Get-SwisData' is not recognized as the name of a cmdlet, function, script file, or operable program. Check

                    the spelling of the name, or if a path was included, verify that the path is correct and try again.

                    At C:\Users\Administrator\Desktop\CreateGroupsForLocations.ps1:46 char:29

                    + [System.Array]$groupNames = Get-SwisData $swis "SELECT Name FROM Orion.Groups"

                    +                             ~~~~~~~~~~~~

                        + CategoryInfo          : ObjectNotFound: (Get-SwisData:String) [], CommandNotFoundException

                        + FullyQualifiedErrorId : CommandNotFoundException

                     

                     

                     

                    I hope its easy for you to help me with. Tank you a lot brother so much.