[hobbit] Renaming a host and keeping the history - lessons learned

Henrik Stoerner henrik at hswn.dk
Wed Aug 30 07:35:35 CEST 2006


On Tue, Aug 29, 2006 at 03:50:34PM -0700, Charles Jones wrote:
> I have several hosts that I had to rename. Their DNS and hostname names 
> changed but IPs remained the same. Example:
> myhost-web-1 -> myhost-demoweb-1
> myhost-app-3 -> myhost-demoapp-1
> myhost-db-2 -> myhost-demodb-1
> 
> I wanted to keep the historical trending info, so I proceded as follows:
> 1. Stopped the Hobbit server
> 2. Made the changes to bb-hosts, simply replacing the hostnames
> 3. renamed data/*hist*/myhost-web-1.* to data/*hist*/myhost-demoweb-1 
> (did the same for the other hosts)
> 4. renamed data/*histlogs*/myhost-web-1 to 
> data/*histlogs*/myhost-demoweb-1 (did the same for the other hosts)
> 5. renamed data/*hostdata*/myhost-web-1 to 
> data/*hostdata*/myhost-demoweb-1 (did the same for the other hosts)
> 6. renamed data/*rrd*/myhost-web-1 to data/*rrd*/myhost-demoweb-1 (did 
> the same for the other hosts)
> 7. Restarted Hobbit

You could have saved yourself a lot of work if you'd read this first:
http://www.hswn.dk/hobbit/help/hobbit-tips.html#renamehost

    How do I rename a host in the Hobbit display?

    First, change the ~/server/etc/bb-hosts file so it has the new name.
    Then to move your historical data over to the new name, run

       ~/server/bin/bb 127.0.0.1 "rename OLDHOSTNAME NEWHOSTNAME"

That takes care of all the renaming you did manually, plus it
transparently changes the Hobbit status while it is running to use
the new hostname. (It won't change the client hostname configuration, 
though).

In general you should *never* have to stop/start Hobbit. The only
exception is (some) changes to the hobbitserver.cfg configuration
file. Adding, deleting or renaming hosts never requires a restart.


Regards,
Henrik




More information about the Xymon mailing list