Code

initial
[rrdtool-all.git] / contrib / add_ds / README
1 # README
2 # From: Selena Brewington <selena@chesnok.com>
4 The two scripts included in here are for taking an existing RRD,
5 dumping out its XML contents, mucking with the XML to add an
6 arbitrary number of datasources, and then creating a new RRD with
7 the new XML information. 'add_ds.pl' is what is doing all the
8 work.  'batch.pl' does the legwork of running rrdtool and 
9 moving around the output from the various commands.
11 Easiest way to use these:
12 * Put batch.pl and add_ds.pl in the same directory as the RRDs
13 you want to modify and run:
15     $ ls -1 | ./batch.pl <# new datasources you want to add>
17 You'll end up with an 'xml' directory where all the xml files
18 and your new RRDs are available.  Copy the new RRDs back over
19 the old RRDs once you've convinced yourself that the new RRDs
20 have been formed correctly (try using the rrd-dump tool that is
21 in the cricket/utils directory, for example).
23 I put some options that you can configure at the top of the
24 batch.pl script.  Also, add_ds.pl has a bunch of stuff you can
25 modify at the command line or, again, change inside the script
26 itself - warning: it's not fancy.  Try: ./add_ds.pl -h
28 batch.pl has an 'overwrite' option that can be invoked, but I
29 highly recommend that you check that this script does what you want,
30 the way you want it, before you go and trample all over your 
31 existing RRDs.