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.

How to get Orion to update the node name from the hostname

Hi all,


 So I know that Orion grabs the system name or hostname and makes that the node name.  My problem is that if we update the hostname then it no longer is the same as the Orion node name.  Is there a way to update this?  I know that it updates automatically in Cirrus, but not Orion.  Any ideas?


 Thanks!


-Jason

  •  If you go to the System Manager

    Right Click and open the Node Details

    On the right hand side there is a Rediscover Node button, This may refresh the host name. Its worth a try! 

  • Rediscover will poll the router for it's current hostname and update the SysName field in the Solarwinds database but it does not update the node name which is the Caption field.

  • Go to system manager right click the node and choose node details then delete the current Name (highlight and hit backspace) and then hit enter it will obtain the new hostname of the device then click Apply Chanages.

  • Hi dm5253,


     That works!  Thanks!  Luckily I only have a few switches that I need to convert using this method.  Anyone know of a way if I had to update say 900 nodes? :)


     -Jason

  •  Get a friend to help update? Overtime maybe?!? haha

  • This doesn't help in the updating, but I wrote a report that I have scheduled to run monthly that lists all of the discrepancies where the caption and host name do not match.  I have this sent to my other admin who then goes through and updates Solarwinds.


    I too would prefer an option to make this automatic, of course you also have the additional problem of updating any labels on the maps that have to be handled.

  • It is possible to make bulk changes using the SQL queries below but you have to keep a couple of things in mind.  First, if you are using a version of NPM prior to 9 then you have to stop the  Network Performance Monitor service prior to running the SQL query to update the caption.  Also, the queries supplied below will not change the caption for any nodes that have a blank sysname field.  This will keep the Caption field from being erased for things like icmp only nodes that do not have anything in the sysname field.  All other nodes will have their caption field set to whatever value is in the sysname field.  If you have specifically renamed a node to something different that what is in the sysname field then that will be overwritten by this query.

     This first query will show you all nodes in your database where the caption and sysname fields do not match and the sysname field is not empty.  This could also be done with a Solarwinds report as mdriskell talked about earlier in the thread.  You can run this query to see which nodes will have their caption fields updated.

    SELECT Caption, SysName, IP_Address FROM Nodes

    WHERE((Caption <> SysName) AND (SysName <> ''))

    ORDER BY Caption

     This query will update the node caption field to whatever value is currently in the sysname field.

    update nodes

    set caption = sysname

    where caption in (SELECT Caption FROM Nodes WHERE ((Nodes.Caption <> Nodes.SysName) AND (Nodes.SysName <> '')))

     

    Use these queries at your own peril and always make a backup of your database before making any major changes. =)

  • sedmo,


     I'm not a SQL programmer, but I was able to copy and past your query straight into the MS SQL Server and both queries worked like a charm.  All of my nodes are updated!


     Thanks!


    -Jason

  • Sedmo,


    Would it be possible for you to post the SQL strings again but have it exclude devices with a blank sysname?  I have about 200 devices that are ICMP only and the sysname on all those would be blank and I wouldn't want it to overwrite my captions.


     Thanks,

  • mdriskell,


     The query is already written to exclude devices with blank sysname.