[rrd-users] XML dump/restore: How to handle "cdp_prep"?

Christian Schrötter rrdtool at lists.kb19.at
Sat Aug 16 18:07:20 CEST 2014


Hello list!

I'm writing a small PHP script to dump a (Munin) RRD file, change some 
things with SimpleXML and restore it to a RRD file:

* GROW each RRA like rrdresize by a new format definition.
* Import old (deleted) data from another (dumped) RRD file.

This works great, but I'm not sure what to do with the "cdp_prep" XML 
node, especially with the *value elements. Am I supposed to leave it 
unchanged (the rrdresize way), delete the whole node or change it to 
another value?

> <cdp_prep>
> 	<ds>
> 		<primary_value>7.0714381033e+01</primary_value>
> 		<secondary_value>6.5151843957e+01</secondary_value>
> 		<value>7.0289869143e+01</value>
> 		<unknown_datapoints>0</unknown_datapoints>
> 	</ds>
> </cdp_prep>

Because I don't understand the usage of this, I'm a little bit 
confused.
Or is there a right way to "update/sync" it? Thanks for any hints! :-)

-- 
With kind regards,
Christian Schrötter



More information about the rrd-users mailing list