Migrating BB rrd data to Hobbit

Charles Jones jonescr at cisco.com
Sun Nov 13 07:34:12 CET 2005


It would be nice if Hobbit came with a tool, that you could run on your 
bb servers rrd directory, or a copy of it, and it would automagically 
copy the data to the host-based subdirs that hobbit uses.

I have a BB server that has been running for about 1.5 years. I have a 
Hobbit server I have been running in unison for several months, (via the 
BBRELAY option on the bb server).  Soon I am going to totally 
decommission the bb server and use only the Hobbit server.

However, I do not wish to lose the trends history that the bb server 
has. Is there any sort of tool to migrate the rrd data from bb to 
hobbit? I started doing it manually, and it wasn't very fun.

The method I used to move the memory rrd data over is:

First off, I noticed that the directory structure of the 
~hobbit/data/rrd directories and files  is different from the 
~bb/bbvar/rrd directories and files:

[*hobbit*]$ ls data/rrd/host.my-domain.net  #Note that hobbit stores the 
rrds in subdirs
**disk,bigdisk.rrd   *memory.physical.rrd*  tcp.http.host.my-domain.net,.rrd
disk,boot.rrd      *memory.real.rrd*      tcp.http.host.my-domain.net.rrd
disk,root.rrd      *memory.swap.rrd*      tcp.ssh.rrd
la.rrd             procs.rrd            users.rrd
*memory.actual.rrd*  tcp.conn.rrd
(Hmm it looks like there is a duplicate 
tcp.http.host.my-domain.net,|.rrd? No idea where that came from, but I 
digress.)

[*bbhost*]$ ls bbvar/rrd |grep host     #Note that bb stores all of the 
rrds in one dir
host.my-domain.net.disk,bigdisk.rrd
host.my-domain.net.disk,boot.rrd
host.my-domain.net.disk,root.rrd
host.my-domain.net.la.rrd
*host,my-domain,net.memory.actual.rrd
host,my-domain,net.memory.physical.rrd
host,my-domain,net.memory.real.rrd
host,my-domain,net.memory.swap.rrd*
host.my-domain.net.procs.rrd
host.my-domain.net.tcp.conn.rrd
host.my-domain.net.tcp.http.host.my-domain.net.rrd
host.my-domain.net.tcp.ssh.rrd
host.my-domain.net.users.rrd

So it looks like on the bbhost, for some reason, the host name is comma 
delimited....but only for the memory rrd files? This is strange. Ah well 
I just need to get them to the hobbit server, and with the proper 
filenames, and in the proper subdirs. So I scp'd all of the memory rrd 
files to the hobbit server into /tmp/mem, and then:

[hobbit] $ cd ~hobbit/data/rrd; for hostdir in `ls`; do BBHOST=`echo 
$hostdir|sed 's/\./,/g'`; cp -vf /tmp/mem/$BBHOST.memory.real.rrd 
$hostdir/memory.real.rrd; done 

 I repeated this command for the "swap", "actual", and "real" files.
The sed command was to generate the comma-delimited filenames I needed 
to find the files. This command copied all of the memory rrd files into 
the proper subdirs.

I'm not sure why only the memory rrd files on my bb server are 
comma-delimited.  Maybe some misconfiguration I did in the past? The 
memory graphs look normal in the trends column though...ah well.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20051112/71a4deb6/attachment.html>


More information about the Xymon mailing list