[rrd-users] Re: Q about copying an existing rrd database and zeroing out the data

This is a discussion on [rrd-users] Re: Q about copying an existing rrd database and zeroing out the data within the RRD Users forums, part of the Networking and Network Related category; >>> Tobias Oetiker writes: Tobi> use rrdtool info this will tell you the structure in an efficient ...


Go Back   Usenet Forums > Networking and Network Related > RRD Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2005
Bill Benedetto
 
Posts: n/a
Default [rrd-users] Re: Q about copying an existing rrd database and zeroing out the data

>>> Tobias Oetiker writes:

Tobi> use rrdtool info this will tell you the structure in an efficient
Tobi> way, use this information to creat the new rrdfiles ... you can
Tobi> call info through the perl interface ...

Sorry but this just isn't crystal clear to me.

If I call RRDs::info, I get a hash that looks like this:
ds[Ping].last_ds = UNKN
ds[Ping].min = 0
ds[Ping].minimal_heartbeat = 900
ds[Ping].type = GAUGE
ds[Ping].unknown_sec = 0
ds[Ping].value = 0.04444
filename = /usr/local/nagios/rrd/tpcmweb-PING.rrd
last_update = 1108591004
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cf = AVERAGE
rra[0].pdp_per_row = 1
rra[0].rows = 50400
rra[0].xff = 0.5
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[0].value = 0.0299737333333333
rra[1].cf = AVERAGE
rra[1].pdp_per_row = 60
rra[1].rows = 43800
rra[1].xff = 0.5
rrd_version = 0001
step = 60

This, of course, is in a hash that I retrieved like this:
my $hash = RRDs::info $oldrrd;

But but I don't see how to get from that $hash to what I think I
need for RRDs::create - namely an array of something like this
"DS:NAME_HERE:GAUGE:600:0:U" (for example) and an array something
like this: "RRA:AVERAGE:0.5:1:576 RRA:AVERAGE:0.5:6:576
RRA:AVERAGE:0.5:24:576 RRA:AVERAGE:0.5:288:576" (for another
example).

All the examples that I see of RRDs::create look like this:
RRDs::create($newrrd, @ds, @rras);
where @ds and @rras look something like what I showed in the last
paragraph.

Is there some easy way to get from the RRDs::info hash to what I
need for RRDs::create?

Sorry if this is brain-dead easy and I just don't see it.

Thanks for any light you can shed on this!

- Bill
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= +=+=+=+=+=+=+=+=+=+=+=+=+=+
Bill Benedetto <bbenedetto@goodyear.com> The Goodyear Tire & Rubber Co.
I don't speak for Goodyear and they don't speak for me. We're both happy.

--
Unsubscribe mailto:rrd-users-request@list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request@list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:07 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0