[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Moving to new Hobbit server
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Moving to new Hobbit server
- From: David Pullman <dpullman (at) mel.nist.gov>
- Date: Tue, 28 Feb 2006 22:34:34 -0500
- References: <OF5A10E3A0.DB5B990B-ONCC257123.00357B52-CC257123.00358280@zespri.com> <44044174.4070407@mel.nist.gov> <44050C79.1070602@zandahar.net>
- User-agent: Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929)
ZanDAhaR wrote:
If I do a uname -m they both say i686, uname -p one says unknown other
says athlon. Should this be an issue ? Also if they are different enough
will the graphs just not work or be corrupted or not update ? Can
someone please assist me in how to import/export the rrd files then as I
have never done that before. Been looking in the rrd docs but still not
entirely sure what I need/want.
If there is a problem, you'll know real quick if you start the new
server and there are errors in your rrd-data.log. It will report an
error updating every file and say something about the file having been
created on another architecture.
I did an rsync of everything and did some trial runs with the new
server, saw those errors, and realized I had to convert.
It was something along the lines of using rrdtool dump, which makes xml
files, rsyncing them over, then doing a rrdtool restore. I did two
shell scripts, one on each server, and I just did the rsync command to
copy only .xml. I don't have the first script, since that box got
recycled, but the second one was still around.
1. Use a script to descend into the rrd directories for each host, and
do a rrdtool dump for each .rrd file. That will make an xml file for
each test for each host.
2. rsync the .xml files over.
3. Use a script to descend into the dirctories and usr rrdtool restore
for each xml file to make an rrd file.
(My distro of rrdtool does not include rrddump, although the man pages
refer to it. But rrdtool dump apparently does the same thing.)
Here's a sample script on the receiving end. Our host names end in
.gov. I did it as root, so I had to add a chown in the script.
#!/bin/sh
RRDDIR="/opt/hobbit/data/rrd"
cd $RRDDIR
for HOST in *.gov
do
cd $HOST
for f in *.xml
do
echo $HOST
b=`echo $f | sed 's/\.xml//'`
`rrdtool restore $f $b.rrd`
chown hobbit:hobbit $b.rrd
done
cd $RRDDIR
done
--David