Renaming a host and keeping the history - lessons learned

Charles Jones jonescr at cisco.com
Wed Aug 30 00:50:34 CEST 2006


I started to type this email to describe a problem I was having, and in 
the process I figured it out. I thought I would share it for amusement 
and learning purposes :)

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

After the restart, the new hostnames appeared, but the only status I had 
was conn and ssh. After double-checking that I renamed the files 
properly and then wondering why I was getting no status updates it hit 
me. The hobbit *clients* had not been restarted! So Hobbit was polling 
them (I use /pulldata/), and they were reporting their old hostnames. 
:-) I restarted the clients on the hosts, and viola! They restarted with 
their proper hostnames and Hobbit could now recognize them.

I am pleased to report that now everything is now as it should be, and 
the trending data is intact.

Ways I could have figured this out quicker:
1. Thinking it all the way through from the beginning. I was smart 
enough to stop Hobbit before I began so that it would not create or 
overwrite the rrd and other files that I was renaming, but I didn't 
think to restart the clients.
2. I could have checked the ghosts report (hobbitd status) and noticed 
that the clients were reporting with their old names (I didn't notice 
this until after I fixed it)

Hopefully this "problem" and resolution will prove helpful to someone 
... even if it's only to help them chuckle at my newbie mistake :)

-Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20060829/2930f02d/attachment.html>


More information about the Xymon mailing list