[rrd-users] Python script to add RRA's to an RRD.
abo at minkirri.apana.org.au
Tue Apr 23 07:16:03 CEST 2013
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;
>From the docstring;
"""rrdtool extended commands.
Adds "summary" and "addrra" rrdtool commands.
The "summary" command will output a short summary of the RRD's DSs
The "addrra" command will create a new rrd with added RRAs. These RRAs
will be populated with as much data as can be derived by rrdxport from
the existing RRAs.
$0 summary <filename>
$0 addrra <filename> <outfile> [RRA:CF:cf args] ...
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
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
Donovan Baarda <abo at minkirri.apana.org.au>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rrd-users