[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Renaming a host and keeping the history - lessons learned
- To: hobbit (at) hswn.dk
- Subject: Renaming a host and keeping the history - lessons learned
- From: Charles Jones <jonescr (at) cisco.com>
- Date: Tue, 29 Aug 2006 15:50:34 -0700
- Authentication-results: sj-dkim-4.cisco.com; header.From=jonescr@cisco.com; dkim=pass ( 60 extraneous bytes; sig from cisco.com verified; );
- Dkim-signature: a=rsa-sha1; q=dns; l=5148; t=1156891836; x=1157755836; c=relaxed/simple; s=sjdkim4002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=jonescr@cisco.com; z=From:Charles=20Jones=20<jonescr@cisco.com> |Subject:Renaming=20a=20host=20and=20keeping=20the=20history=20-=20lessons=20lear ned; X=v=3Dcisco.com=3B=20h=3D4de/05Aodxz66Ud8/usLUBUBMpg=3D; b=oYVThKA5nilmAcOSdP4mLwADgR9cvKr3SSaerOO/aFJGXL62erkEPKBymaSShnWzvThGmy2O s9kOOqqGCHtoIym+B4IW6G7ToS1et+7NVBObCPEv57hA/J/ZogY9xzpG;
- Organization: Cisco Systems
- User-agent: Thunderbird 1.5.0.4 (X11/20060614)
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