[rrd-users] Fetch a particular data source with rrdtool
Sanjit Jhala
sjhalaz at gmail.com
Fri Jul 9 00:30:43 CEST 2010
Actually looking at this more, I think your code fetches all the values
between the give time range. I am only interested in fetching the values of
a couple of variables, not all. Is there a way to do that? (prefereable via
Ruby/Python bindings or rrdtool command line interface).
-Sanjit
On Wed, Jul 7, 2010 at 11:51 PM, Landon Stewart <lstewart at superb.net> wrote:
> Hi Sanjit,
>
> I am successfully using the perl module RRDTool::OO for this purpose.
> Something like the following would print values between the two time stamps
> given on the command line as parameters:
>
> #!/usr/bin/perl
> use RRDTool::OO;
> $rrd = RRDTool::OO->new( file => "rrdfile.rrd" );
> $rrd->fetch_start(
> start => @ARGV[0],
> end => @ARGV[1],
> resolution => "300",
> cfunc => "MAX"
> );
> $rrd->fetch_skip_undef();
> while(my($time, @value) = $rrd->fetch_next()) {
> print "$time:",sprintf("%.2f", $value[0]),"\n" if $value[0];
> print "$time:",sprintf("%.2f", $value[1]),"\n" if $value[1];
> }
>
> On Wed, Jul 7, 2010 at 8:44 PM, Sanjit Jhala <sjhalaz at gmail.com> wrote:
>
>> I want to fetch the data for some specific statistics in the RRD and graph
>> them with my own graphing tool instead of rrdgraph. Is it possible to fetch
>> a particular statistic stored in the rrdtool database using something like
>> rrdfetch?
>>
>> As I understand it rrdfetch fetches values for all the variables stored in
>> RRD. Looking at rrdgraph it allows me to graph a specific stat without
>> having to fetch values for all the stats. Is it possible to fetch just one
>> or a specific set of statistics that I am interested in instead of all of
>> them?
>>
>> -Sanjit
>>
>> _______________________________________________
>> rrd-users mailing list
>> rrd-users at lists.oetiker.ch
>> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>>
>>
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20100708/796f8cb3/attachment.htm
More information about the rrd-users
mailing list