<div dir="ltr">G'day,<div><br></div><div>I've seen a few posts asking about how to add an RRA to an RRD without many decent solutions. Apparently the perl rrd library has something to do this, but I'm a Python guy so I whipped this up. AFAIK it's the only tool that populates the new RRA's data from existing RRA's using xport;</div>
<div><br></div><div><a href="http://minkirri.apana.org.au/~abo/projects/rrdcollect/rrdtoolx.py">http://minkirri.apana.org.au/~abo/projects/rrdcollect/rrdtoolx.py</a><br></div><div><br></div><div style>From the docstring;</div>
<div style><br></div><div style>"""rrdtool extended commands.<br></div><div><div><br></div><div>Adds "summary" and "addrra" rrdtool commands.</div><div><br></div><div>The "summary" command will output a short summary of the RRD's DSs</div>
<div>and RRAs.</div><div><br></div><div>The "addrra" command will create a new rrd with added RRAs. These RRAs</div><div>will be populated with as much data as can be derived by rrdxport from</div><div>the existing RRAs.</div>
<div><br></div><div>Usage:</div><div> $0 summary <filename></div><div> $0 addrra <filename> <outfile> [RRA:CF:cf args] ...</div><div>"""</div><div><br></div><div style>It's a bit rough and ready (no decent cmdline checking, error reporting, help etc), but it works. I'll probably be polishing this up a bit over the next couple of days, and maybe add functionality to remove RRAs and add/remove DS's.</div>
<div style><br></div><div style>It works by running rrdtool to dump, modify, and restore xml. It will probably break trying to add RRA's with fancy CF's not supported by rrdtool xport. </div><div><br></div>-- <br>
Donovan Baarda <<a href="mailto:abo@minkirri.apana.org.au">abo@minkirri.apana.org.au</a>>
</div></div>