[rrd-users] Fetch a particular data source with rrdtool
Sanjit Jhala
sjhalaz at gmail.com
Fri Jul 9 00:13:37 CEST 2010
Hi Landon,
Thanks for the info. Does anyone know if there is a similar API to do this
in the Ruby/Python bindings?
-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/8978f686/attachment.htm
More information about the rrd-users
mailing list