<br><font size=2 face="Arial">Hi Sam,</font>
<br>
<br><font size=2 face="Arial">thank you for your answer.</font>
<br>
<br><font size=2 face="Arial">Hereunder you'll find the output of rrdinfo.</font>
<br>
<br><font size=2 face="Arial">Concerning your script, yes please send it
to me; I'm planning to write a script that'll automatically export *all*
data from a RRD file into several XML files, each of them having the best
resolution possible within the largest time window possible. So, maybe
your tool will help me in that goal.</font>
<br>
<br><font size=2 face="Arial">Cyrille</font>
<br>
<br><font size=2 face="Arial">[root@srv-fhq-mgt test-rrd]# rrdtool info
10.0.1.254_con.rrd | sort</font>
<br><font size=2 face="Arial">ds[ds0].last_ds = "1495"</font>
<br><font size=2 face="Arial">ds[ds0].max = 1.0000000000e+05</font>
<br><font size=2 face="Arial">ds[ds0].min = 0.0000000000e+00</font>
<br><font size=2 face="Arial">ds[ds0].minimal_heartbeat = 600</font>
<br><font size=2 face="Arial">ds[ds0].type = "GAUGE"</font>
<br><font size=2 face="Arial">ds[ds0].unknown_sec = 0</font>
<br><font size=2 face="Arial">ds[ds0].value = 3.4833500000e+05</font>
<br><font size=2 face="Arial">ds[ds1].last_ds = "1495"</font>
<br><font size=2 face="Arial">ds[ds1].max = 1.0000000000e+05</font>
<br><font size=2 face="Arial">ds[ds1].min = 0.0000000000e+00</font>
<br><font size=2 face="Arial">ds[ds1].minimal_heartbeat = 600</font>
<br><font size=2 face="Arial">ds[ds1].type = "GAUGE"</font>
<br><font size=2 face="Arial">ds[ds1].unknown_sec = 0</font>
<br><font size=2 face="Arial">ds[ds1].value = 3.4833500000e+05</font>
<br><font size=2 face="Arial">filename = "10.0.1.254_con.rrd"</font>
<br><font size=2 face="Arial">last_update = 1219224533</font>
<br><font size=2 face="Arial">rra[0].cdp_prep[0].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[0].cdp_prep[0].value = 1.6240000000e+03</font>
<br><font size=2 face="Arial">rra[0].cdp_prep[1].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[0].cdp_prep[1].value = 1.6240000000e+03</font>
<br><font size=2 face="Arial">rra[0].cf = "AVERAGE"</font>
<br><font size=2 face="Arial">rra[0].pdp_per_row = 1</font>
<br><font size=2 face="Arial">rra[0].rows = 8656</font>
<br><font size=2 face="Arial">rra[0].xff = 5.0000000000e-01</font>
<br><font size=2 face="Arial">rra[1].cdp_prep[0].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[1].cdp_prep[0].value = 1.6780000000e+03</font>
<br><font size=2 face="Arial">rra[1].cdp_prep[1].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[1].cdp_prep[1].value = 1.6780000000e+03</font>
<br><font size=2 face="Arial">rra[1].cf = "AVERAGE"</font>
<br><font size=2 face="Arial">rra[1].pdp_per_row = 3</font>
<br><font size=2 face="Arial">rra[1].rows = 35077</font>
<br><font size=2 face="Arial">rra[1].xff = 5.0000000000e-01</font>
<br><font size=2 face="Arial">rra[2].cdp_prep[0].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[2].cdp_prep[0].value = 1.6260000000e+03</font>
<br><font size=2 face="Arial">rra[2].cdp_prep[1].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[2].cdp_prep[1].value = 1.6260000000e+03</font>
<br><font size=2 face="Arial">rra[2].cf = "AVERAGE"</font>
<br><font size=2 face="Arial">rra[2].pdp_per_row = 12</font>
<br><font size=2 face="Arial">rra[2].rows = 19113</font>
<br><font size=2 face="Arial">rra[2].xff = 5.0000000000e-01</font>
<br><font size=2 face="Arial">rra[3].cdp_prep[0].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[3].cdp_prep[0].value = 1.6240000000e+03</font>
<br><font size=2 face="Arial">rra[3].cdp_prep[1].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[3].cdp_prep[1].value = 1.6240000000e+03</font>
<br><font size=2 face="Arial">rra[3].cf = "MAX"</font>
<br><font size=2 face="Arial">rra[3].pdp_per_row = 1</font>
<br><font size=2 face="Arial">rra[3].rows = 8657</font>
<br><font size=2 face="Arial">rra[3].xff = 5.0000000000e-01</font>
<br><font size=2 face="Arial">rra[4].cdp_prep[0].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[4].cdp_prep[0].value = 1.7870000000e+03</font>
<br><font size=2 face="Arial">rra[4].cdp_prep[1].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[4].cdp_prep[1].value = 1.7870000000e+03</font>
<br><font size=2 face="Arial">rra[4].cf = "MAX"</font>
<br><font size=2 face="Arial">rra[4].pdp_per_row = 3</font>
<br><font size=2 face="Arial">rra[4].rows = 35077</font>
<br><font size=2 face="Arial">rra[4].xff = 5.0000000000e-01</font>
<br><font size=2 face="Arial">rra[5].cdp_prep[0].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[5].cdp_prep[0].value = 1.7870000000e+03</font>
<br><font size=2 face="Arial">rra[5].cdp_prep[1].unknown_datapoints = 0</font>
<br><font size=2 face="Arial">rra[5].cdp_prep[1].value = 1.7870000000e+03</font>
<br><font size=2 face="Arial">rra[5].cf = "MAX"</font>
<br><font size=2 face="Arial">rra[5].pdp_per_row = 12</font>
<br><font size=2 face="Arial">rra[5].rows = 19113</font>
<br><font size=2 face="Arial">rra[5].xff = 5.0000000000e-01</font>
<br><font size=2 face="Arial">rrd_version = "0003"</font>
<br><font size=2 face="Arial">step = 300</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Sam Stickland <sam_mailinglists@spacething.org></b>
</font>
<p><font size=1 face="sans-serif">20/08/2008 13:04</font>
<td width=59%>
<table width=100%>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td valign=top><font size=1 face="sans-serif">Cyrille Bollu <Cyrille.Bollu@fedasil.be></font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td valign=top><font size=1 face="sans-serif">rrd-users@lists.oetiker.ch</font>
<tr>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td valign=top><font size=1 face="sans-serif">Re: [rrd-users] RE rrdupdate
behaviour when data already exist</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>Hi,<br>
<br>
I have a working script that can replay MRTG style RRD files into <br>
another RRD file (with differing RRA definations). It preserves the <br>
average and max DS's by extrapolating the minimum required data for the
<br>
rrd updates.<br>
<br>
I wrote it for converting MRTG RRD files to Torrus, but it's pretty <br>
general, if a little rough and ready. It uses an RRD file as a template
<br>
to produce a new file containing the MRTG data:<br>
<br>
# ./convert-to-torrus.pl mrtg.rrd template.rrd out.rrd<br>
<br>
If template.rrd file contained data then you can use the merged-rrd.py
<br>
script (in contrib/) to combine it with 'out.rrd'.<br>
<br>
Let me know if you want a copy now - when I have a little more time it
<br>
will be available from the Torrus Wiki.<br>
<br>
In answer to your question about growing the RRA - it depends on how you
<br>
created the file. If you post the output of "rrdtool info my.rrd |
sort" <br>
I can have a look.<br>
<br>
Sam<br>
<br>
Cyrille Bollu wrote:<br>
><br>
> Alex,<br>
> Other rrdtool gurus,<br>
><br>
> I gave a try to my modifications and it's working (almost :-) ) great.<br>
><br>
> However I still have a concern:<br>
><br>
> The RRA created don't contain the *exact* amount of rows specified;
<br>
> They have 8656 instead of 8640 (1 point per row), 35077 instead of
<br>
> 35040 (3 points per row), and, what's ennoying me, 19113 instead of
<br>
> 43800 (12 points per row). I understand that this is due to the lack
<br>
> of data in the original MRTG log files. But, in the future, I want
to <br>
> use the RRD files created to store data in a RRA with 43800 rows/12
<br>
> point per row.<br>
><br>
> So my question is: Will subsequent calls to rrdupdate make the 12
<br>
> points/row RRA grow or is it definitivelly limited to 19113 rows?<br>
><br>
> And, if it is limited, will rrdresize help me?<br>
><br>
> Side question: Is it possible to add an RRA to a RRD file (using <br>
> rrdtool-1.2)?<br>
><br>
> Best regards,<br>
><br>
> Cyrille<br>
><br>
><br>
><br>
><br>
> *Cyrille Bollu/FHQ/USERS/FEDASIL*<br>
><br>
> 09/07/2008 17:30<br>
><br>
> <br>
> A<br>
> Cyrille
Bollu <Cyrille.Bollu@fedasil.be><br>
> cc<br>
> Alex
van den Bogaerdt <alex@ergens.op.het.net>, <br>
> rrd-users@lists.oetiker.ch, rrd-users-bounces@lists.oetiker.ch<br>
> Objet<br>
> rrdupdate
behaviour when data already exist (was: Tips and thoughts <br>
> on how to optimally import data points from MRTG .log files into new
<br>
> RRD databases)Link <br>
> <Notes://FHQMAIL01/C1256FB30037352A/E8700555BBB69B0380256C3F003DA467/C65863980A382D55C1257481002F23CC>
<br>
><br>
><br>
><br>
><br>
> <br>
><br>
><br>
><br>
><br>
> Great Alex,<br>
><br>
> It was almost as simple as I thought.<br>
><br>
> For the record, I modified function "log2rrd" in file MRTG_lib.pm
as <br>
> follow:<br>
><br>
> sub log2rrd ($$$) {<br>
> ...<br>
> my %next;<br>
> my $rrd;<br>
> # CBU 2008.07.09: Change the way MRTG l.log files are converted into
<br>
> RRD databases<br>
> # my @steps = qw(300 1800 7200 86400);<br>
> # my %sizes = ( 300 => 600, 1800 => 700, 7200 =>
775, 86400 => 797);<br>
> my @steps = qw(300 900 3600);<br>
> my %sizes = ( 300 => 8640, 900 => 35040, 3600
=> 43800);<br>
> open R, "<$$cfg{logdir}$$rcfg{'directory'}{$router}$router.log"
or<br>
> die "ERROR: opening <br>
> $$cfg{logdir}$$rcfg{'directory'}{$router}$router.log: $!";<br>
> debug('rrd',"converting <br>
> $$cfg{logdir}$$rcfg{'directory'}{$router}$router.log");<br>
> ...<br>
> </ds><br>
> RRD $first_step{300} = 0; # invalidate<br>
> # CBU 2008.07.09: Change the way MRTG l.log files are converted into
<br>
> RRD databases<br>
> addarch(1,'AVERAGE','in','out',\%store,\%first_step,\$rrd);<br>
> addarch(3,'AVERAGE','in','out',\%store,\%first_step,\$rrd);<br>
> addarch(12,'AVERAGE','in','out',\%store,\%first_step,\$rrd);<br>
> addarch(1,'MAX','maxin','maxout',\%store,\%first_step,\$rrd);<br>
> addarch(3,'MAX','maxin','maxout',\%store,\%first_step,\$rrd);<br>
> addarch(12,'MAX','maxin','maxout',\%store,\%first_step,\$rrd);<br>
> # addarch(1,'AVERAGE','in','out',\%store,\%first_step,\$rrd);<br>
> # addarch(6,'AVERAGE','in','out',\%store,\%first_step,\$rrd);<br>
> # addarch(24,'AVERAGE','in','out',\%store,\%first_step,\$rrd);<br>
> # addarch(288,'AVERAGE','in','out',\%store,\%first_step,\$rrd);<br>
> # addarch(6,'MAX','maxin','maxout',\%store,\%first_step,\$rrd);<br>
> # addarch(24,'MAX','maxin','maxout',\%store,\%first_step,\$rrd);<br>
> # addarch(288,'MAX','maxin','maxout',\%store,\%first_step,\$rrd);<br>
> $rrd .= <<RRD;<br>
> </rrd><br>
> RRD<br>
><br>
> if ( $OS eq 'NT' ) {<br>
> open (R, "|$$cfg{rrdtool} restore
- <br>
> $$cfg{logdir}$$rcfg{'directory'}{$router}$router.rrd");<br>
> ...<br>
> }<br>
><br>
> Now, I have one additionnal question:<br>
><br>
> For a few months, we are also collecting data from these sensors via
<br>
> another monitoring system using rrdtools.<br>
><br>
> So, I would like to import data from this other monitoring system
into <br>
> the .RRD that I will generate from MRTG (ie: using "rrdtools
update").<br>
><br>
> But, since there will already be some data, I'm wondering what will
be <br>
> the behaviour of rrdtools in this case (ie: when one inserts values
at <br>
> times when there are already data).<br>
><br>
> Can you enlighten me?<br>
><br>
> Best regards,<br>
><br>
> Cyrille<br>
><br>
><br>
><br>
> *Cyrille Bollu <Cyrille.Bollu@fedasil.be>*<br>
> Envoyé par : rrd-users-bounces@lists.oetiker.ch<br>
><br>
> 09/07/2008 10:32<br>
><br>
> <br>
> A<br>
> Alex
van den Bogaerdt <alex@ergens.op.het.net><br>
> cc<br>
> rrd-users@lists.oetiker.ch,
rrd-users-bounces@lists.oetiker.ch<br>
> Objet<br>
> Re:
[rrd-users] Tips and thoughts on how to optimally import data
<br>
> points from MRTG .log files into new RRD databases<br>
><br>
><br>
><br>
> <br>
><br>
><br>
><br>
><br>
><br>
><br>
> rrd-users-bounces@lists.oetiker.ch wrote on 09/07/2008 02:25:35:<br>
><br>
> > > I know that I can convert my MRTG .log file to RRD databases
by <br>
> adding the<br>
> > > "LogFormat: rrdtool" line in MRTG's configuration
files. However, <br>
> the RRA<br>
> > > generated by doing this don't satisfy me.<br>
> ><br>
> > I don't remember when/where/what, but I'm almost 100% sure I've
seen<br>
> > a solution for this. Try google.<br>
> ><br>
><br>
> I'm pretty sure also but you already gave me a very good tip hereunder
<br>
> :-)<br>
><br>
> ><br>
> ><br>
> > I suggest looking in MRTG or RateUp, find the part where it creates
the<br>
> > new database and modify that part.<br>
> ><br>
><br>
> Great! I didn't realized MRTG was written in Perl.<br>
><br>
> Actually, I think I'll have to modify function "log2rrd"
in file <br>
> MRTG_lib.pm:<br>
><br>
> sub log2rrd ($$$) {<br>
> ...<br>
> my @steps = qw(300 1800 7200
86400);<br>
> my %sizes = ( 300 => 600,
1800 => 700, 7200 => 775, 86400 <br>
> => 797);<br>
> ...<br>
><br>
> Am I dreaming? Could it be so simple? :-)<br>
><br>
> Thanks Alex<br>
><br>
> Cyrille_______________________________________________<br>
> rrd-users mailing list<br>
> rrd-users@lists.oetiker.ch<br>
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users<br>
><br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> rrd-users mailing list<br>
> rrd-users@lists.oetiker.ch<br>
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users<br>
> <br>
<br>
</font></tt>
<br>