1 Reply Latest reply on Aug 4, 2017 1:26 PM by johnny ringo

    Host name change in bulk


      Unless I am missing this somewhere in the GUI, Is there an easy way to change the host names in bulk?

      For example:  some nodes have NYC in their name, and I was told to change it to New York City.

      Could I do this in bulk somewhere? or do I need to perform an SQL query for this change?





        • Re: Host name change in bulk
          johnny ringo

          The SolarWinds API as really improved over the last few years but I havent converted my SQL scripts for this into them yet.  My conditions are simple but this is an example of what you could do:


          USE [SolarWindsOrion]

          UPDATE NodesData

            SET Caption =



                WHEN  IP_Address LIKE '%.1' THEN NC.City + '-FIREWALL'

                WHEN  IP_Address LIKE '%.2' THEN N.Sysname

                WHEN  IP_Address LIKE '%.10' AND Vendor LIKE 'net-snmp' THEN NC.City + '-LINUX VM'

                WHEN  IP_Address LIKE '%.15' AND Vendor LIKE 'Windows' THEN NC.City + '-' + N.SysName

                   ELSE IP_Address END


          FROM NodesData N

          INNER JOIN NodesCustomProperties NC ON NC.NodeID = N.NodeID



          For Subnets that meet my where clause, I rename the first IP address I name the Site name + '-FIREWALL', the second IP is usually a network device so I just keep its hostname.  Some other devices are sometimes present so I have conditions set up that look for that and if they are there then they name them accordingly.  Lastly I use the IP address as a last resort.  This is the ELSE statement at the end.  Im sure there are more complicated ones but for where I use this, it meets what I need.


          Hope this helps.