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:
- Stopped the Hobbit server
- Made the changes to bb-hosts, simply replacing the hostnames
- renamed data/*hist*/myhost-web-1.* to data/*hist*/myhost-demoweb-1 (did the same for the other hosts)
- renamed data/*histlogs*/myhost-web-1 to data/*histlogs*/myhost-demoweb-1 (did the same for the other hosts)
- renamed data/*hostdata*/myhost-web-1 to data/*hostdata*/myhost-demoweb-1 (did the same for the other hosts)
- renamed data/*rrd*/myhost-web-1 to data/*rrd*/myhost-demoweb-1 (did the same for the other hosts)
- 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:
- 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.
- 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