Hi All,
We've set up an external shell script that counts the rows in an Oracle table and captures the result via a data source. I've run the cron log option, and the data source appears correctly. A quick grep of the rrd.log file shows the following:
10/03/2002 9:30 AM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/learnerct_count2.rrd --template learnerct_count2 N:12807543
10/03/2002 9:35 AM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/learnerct_count2.rrd --template learnerct_count2 N:12807816
10/03/2002 9:40 AM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/learnerct_count2.rrd --template learnerct_count2 N:12808198
10/03/2002 9:45 AM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/learnerct_count2.rrd --template learnerct_count2 N:12808554
10/03/2002 9:50 AM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/learnerct_count2.rrd --template learnerct_count2 N:12808974
10/03/2002 9:55 AM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/learnerct_count2.rrd --template learnerct_count2 N:12809369
10/03/2002 10:00 AM - CMD: /usr/bin/rrdtool update /var/www/html/cacti/rra/learnerct_count2.rrd --template learnerct_count2 N:12809779
Obviously we're dealing with some fairly large numbers. I've tried defining the data source as both a Counter and a Derive field. (What we're interested in is the growth rate per 5 minute interval).
When I try charting it, the data shows anything but what was imported. It varies considerably from 12 million plus, to 1. An rrdtool dump of the same data gives the following:
<!-- Round Robin Database Dump -->
<rrd>
<version> 0001 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1033635950 </lastupdate> <!-- 2002-10-03 10:05:50 BST -->
<ds>
<name> learnerct_count2 </name>
<type> COUNTER </type>
<minimal_heartbeat> 600 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> 1.0000000000e+13 </max>
<!-- PDP Status -->
<last_ds> 12810292 </last_ds>
<value> 8.5500000000e+01 </value>
<unknown_sec> 0 </unknown_sec>
</ds>
<!-- Round Robin Archives -->
<rra>
<cf> AVERAGE </cf>
<pdp_per_row> 1 </pdp_per_row> <!-- 300 seconds -->
<xff> 5.0000000000e-01 </xff>
<cdp_prep>
<ds><value> NaN </value> <unknown_datapoints> 0 </unknown_datapoints></ds>
</cdp_prep>
<database>
..
<snip>
..
<!-- 2002-10-03 09:20:00 BST / 1033633200 --> <row><v> 6.1055555556e-01 </v></row>
<!-- 2002-10-03 09:25:00 BST / 1033633500 --> <row><v> 7.4500000000e-01 </v></row>
<!-- 2002-10-03 09:30:00 BST / 1033633800 --> <row><v> 8.4277777778e-01 </v></row>
<!-- 2002-10-03 09:35:00 BST / 1033634100 --> <row><v> 8.9859173127e-01 </v></row>
<!-- 2002-10-03 09:40:00 BST / 1033634400 --> <row><v> 1.2145873843e+00 </v></row>
<!-- 2002-10-03 09:45:00 BST / 1033634700 --> <row><v> 1.2018208844e+00 </v></row>
<!-- 2002-10-03 09:50:00 BST / 1033635000 --> <row><v> 1.3605684755e+00 </v></row>
<snip>
Is there a known problem with COUNT or DERIVE causing overflows, or am I missing something here? Certain data points are interpreted and stored correctly - it seems to be an intermittent problem.
We're running Cacti 0.6.8, rrdtool 1.0.38, PHP 4.1.2.
Puzzled ,
Chris
Problems adding data to RRD's via a new Data Source
Moderators: Developers, Moderators
Problem solved!
It looks as though the large maximum value specified at RRD create was somehow causing an overflow to occur within RRD, and causing the data to be stored in a corrupted manner. Although our absolute figures are high, the rate of consumption was low. The maximum value looks to be associated with the rate, and not the measured value. Hence we dropped the max to a lower figure, and everything worked reliably afterwards. I couldn't find anything in the RRDtool docs that explains that Mins and Max's refer to derrived rates and not the measured value however. Something to watch out for in future.
Chris
It looks as though the large maximum value specified at RRD create was somehow causing an overflow to occur within RRD, and causing the data to be stored in a corrupted manner. Although our absolute figures are high, the rate of consumption was low. The maximum value looks to be associated with the rate, and not the measured value. Hence we dropped the max to a lower figure, and everything worked reliably afterwards. I couldn't find anything in the RRDtool docs that explains that Mins and Max's refer to derrived rates and not the measured value however. Something to watch out for in future.
Chris
Who is online
Users browsing this forum: No registered users and 4 guests