Today, Steven Wagner wrote forth saying...

> Yeah, I already figured that out.
> 
> I am going to be a very sad panda if I have to nuke all these RRDs because 
> the format's changed.

sad is bad.  

here is a way to convert your old RRDs to the new format (i think).

this is untested

# rrdtool tune my_old.rrd --data-source-rename ganglia:sum

i would back it up before you do it (of course).

unformatunately, all your RRDs in your __SummaryInfo__ directories cannot 
by converted with rrdtool tune.

you can convert the __SummaryInfo__ rrds by doing the following (again 
untested).

# rrdtool dump my_old.rrd > out.xml

in the out.xml file.. you need to change the datasources to read the 
following..... there are two datasources "sum" and "num".  Sum is the sum 
of all the machines metrics and num is the number of machines which were 
summed.  The old format only had one DS called "ganglia".  To get the 
number of nodes, the old gmetad made another RRD to num_nodes.rrd which 
you can use to grab the "num" data.

<rrd>
   <version> 0001 </version>
   <step> 15 </step> <!-- Seconds -->
   <lastupdate> 1031597578 </lastupdate> <!-- 2002-09-09 11:52:58 PDT -->

   <ds>
      <name> sum </name>
      <type> GAUGE </type>
      <minimal_heartbeat> 30 </minimal_heartbeat>
      <min> NaN </min>
      <max> NaN </max>

      <!-- PDP Status -->
      <last_ds> UNKN </last_ds>
      <value> 3.6168600000e+04 </value>
      <unknown_sec> 0 </unknown_sec>
   </ds>

   <ds>
      <name> num </name>
      <type> GAUGE </type>
      <minimal_heartbeat> 30 </minimal_heartbeat>
      <min> NaN </min>
      <max> NaN </max>

      <!-- PDP Status -->
      <last_ds> UNKN </last_ds>
      <value> 1.1960000000e+03 </value>
      <unknown_sec> 0 </unknown_sec>
   </ds>

<!-- Round Robin Archives -->


once your changed the xml, run

# rrdtool restore out.xml my_new_rrd.rrd

do you think we should make some conversion scripts for the 2.5.0 release?  

i'm sorry that the RRD format is changed but it's necessary for ganglia to 
grow.

-matt




Reply via email to