This is expected behaviour.

 

‘Rrdtool fetch’ will return the raw data, using the RRA that most closely 
approximates the requested data resolution.  So, if you request a resolution of 
3600, and only have a 300 RRA available, then this will be used.  However, if 
you have a 3600 RRA then this will be chosen.  In addition, RRDTool will ensure 
the time window is fully covered before selecting a resolution; so you need to 
be careful of fencepost errors where only the last sample is unavailable at 
your selected resolution and so it fails back to a lower granularity RRA.  The 
graph function, on the other hand, will perform on-the-fly aggregation and 
calculation to generate a data set  in the required resolution before graphing.

 

If you want to have the data pre-aggregated, then either ensure that a suitable 
RRA exists in the RRD, or else use ‘rrdtool xport’, which is like the graph 
function but returns the data instead (after calculation and aggregation if 
necessary)

 

Steve

 

Steve Shipway

T: +64 9 3737 599 ext 86487

E: s.ship...@auckland.ac.nz <mailto:s.ship...@auckland.ac.nz> 

(GNU Terry Pratchett)

 

From: rrd-users 
[mailto:rrd-users-bounces+s.shipway=auckland.ac...@lists.oetiker.ch] On Behalf 
Of Olivier
Sent: Wednesday, 4 November 2015 5:29 a.m.
To: rrd-users@lists.oetiker.ch
Subject: [rrd-users] RRDTool lib fetch

 

Hello,

 

I'm looking for documentation on rrdtool library. I'm actually using it through 
PHP and PECL project. I'm using function rrd_fetch() to grab data from a 
specific .rrd file.

I can see that 'resolution' parameter is not respected (as rrd_graph is doing) 
: RRD seems to find the most accurate resolution available, but returns the raw 
data. For example, if I have data with resolution =60 and I request resolution 
=3600, data is not aggregated, and I have one row every minute instead of one 
per hour.

First, I want to know if this is an expected behaviour. In that case, it means 
that rrd_graph is doing this aggregate itself. Is there a way to ask rrdtool to 
do the math for me ?



Olivier

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

Reply via email to