Discussion:
[rrd-users] not being able to get exactly updates made
(too old to reply)
Alceu R. de Freitas Jr.
2014-10-08 05:39:51 UTC
Permalink
Greetings,

My name is Alceu and I'm a newbie with RRDTool.

I'm trying to create a POC by using RRDTool::OO Perl module (available on CPAN).

I'm not sure where I'm doing a mistake, but it seems I'm not being able to set the database as desired.

For testing, I don't want any interpolation in the update data.

To create the database, I chose a step of 600 seconds (10 min). The data that I have is exactly 600 seconds after each other. In total, I have 1319 lines of data, so I also set the rows parameter to 1319. Also, to be sure, set the heartbeat to 600 seconds.

My first row of sample data starts at 1408735271. I've already tried several combinations of the start parameter (1408735270, (1408735271 - 600)) but I'm always getting the following result with fetch:

1408756800: 8.65

When in fact it should be:

1408735271: 9.75


This is how I'm fetching the data:

$rrd->fetch_start( start => 1408735271, end => 1409547002 );
$rrd->fetch_skip_undef();
while ( my ( $time, $value ) = $rrd->fetch_next() ) {
print "$time: ", defined $value ? $value : "[undef]", "\n";
}


The start and end are using the timestamps from the first and last sample of data.

Am I not following the concepts of RRDTool or there is possibly a bug with RRDTool::OO?

Thank you,
Alceu
Simon Hobson
2014-10-08 07:08:27 UTC
Permalink
Post by Alceu R. de Freitas Jr.
Am I not following the concepts of RRDTool
Yes
Post by Alceu R. de Freitas Jr.
or there is possibly a bug with RRDTool::OO?
No bug - it's working as designed.

See "Rates, normalizing and consolidating" on this page
http://www.vandenbogaerdt.nl/rrdtool/
Steve Shipway
2014-10-08 23:35:37 UTC
Permalink
You may not want interpolation, but you’re getting it. All RRD data are normalised to fit in with the interval steps, and you cannot switch this off because of the way the RRD is structured.



If you want to avoid this, then ensure your data are submitted with a timestamp exactly on the interval boundary – IE, if your interval is 600s, then (timestamp mod 600) should be zero if you want to make normalisation a null operation.



Steve



Steve Shipway

***@auckland.ac.nz
Alceu R. de Freitas Jr.
2014-10-09 19:44:06 UTC
Permalink
Thanks Simon, this is a very good tutorial. I'm wondering why those explanations were not in the introductory documentation about RRDTools due it's relevance.

Regards,

Alceu
Post by Simon Hobson
Post by Alceu R. de Freitas Jr.
Am I not following the concepts of RRDTool
Yes
Post by Alceu R. de Freitas Jr.
or there is possibly a bug with RRDTool::OO?
No bug - it's working as designed.
See "Rates, normalizing and consolidating" on this page
http://www.vandenbogaerdt.nl/rrdtool/
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Loading...