[rrd-developers] Re: API for reading RRD metadata

Tiago Pedroso tfp at novis.pt
Thu Oct 4 11:38:59 MEST 2001


On Thu, Oct 04, 2001 at 12:08:23AM +0200, Alex van den Bogaerdt wrote:
>
> Matt Zimmerman wrote:
>
> > I haven't been following RRDtool 1.1.x development, but I'm
> > wondering whether it will include an API for reading the DS, RRA,
> > PDP and CDP definitions.
>
> Perhaps I do not understand what you're asking for but isn't the
> output of "rrdtool info" sufficient for this?
>
> It shouldn't be too hard to parse and it is architecture independent.

may i disagree ? :)

I had to do some RRD manipulation a couple of weeks ago and used the
perl API that ships with the distribution of rddtool.

Before starting to say evil things about this API I will state for the
record that building such an API is a most praiseworthy effort.

Think that the info command is not very friendly. If i use an API to
connect to some tool/database/framework/etc i expect it to have all the
complexity behind the API but nevertheless being able to use the full
features of the tool with it.

What I'm saying is ... would it be difficult to change the info function
in such a way that it would return an hash reference or something like
it ? I solved the problem implementing another API that hides the
parsing and some other "unpleasant" things.

wouldn't it be great to have things like this:

my $rrd = RRD->new->( filename => "my.rrd" );

my $info = $rrd->info();

foreach my $elem (keys %{$info->{ds}} { 
   print "dsname = $elem\n"; 
   print "dst = ".$info->{ds}{$elem}{type}."\n"; 
   print "hb = ".$info->{ds}{$elem}{minimal_heartbeat}."\n"; 
   print "min = ".$info->{ds}{$elem}{min}."\n"; 
   print "max = ".$info->{ds}{$elem}{max}."\n"; 
}

Am I being to demanding ? Well at least rddtool ships with a perl API
...

best regards
--
Tiago Pedroso - <tfp at novis.pt> <http://www.novis.pt>
Novis Telecom - Carrier - Network Management Solutions 
Rua Henrique Pousão, 432 - 2 Piso - 4461-901 Snra da Hora
tel: 22 0114897

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



More information about the rrd-developers mailing list