[rrd-users] CDP not working the same on two similar RRDs, only diff when created
Beck, David
David.Beck at travelocity.com
Wed Apr 28 22:54:56 MEST 2004
I have two similar RRDs, only one of which I can get data out of. Something seems to be going on with the consolidated data points, but I can't figure it out. The two RRDs are of the same structure and format, and the same Perl code creates them and updates them (with differing names and data).
The creation code used for both is:
sub createRRD
{
my $rrdname = $_[0];
my $execstr = "set -e; rrdtool create " . $rrdname .
" -s 3600 " . # we want every hour, so 60 x 60
"DS:task:GAUGE:7200:0:U " .
"DS:enh:GAUGE:7200:0:U " .
"DS:low:GAUGE:7200:0:U " .
"DS:med:GAUGE:7200:0:U " .
"DS:high:GAUGE:7200:0:U " .
"DS:urgent:GAUGE:7200:0:U " .
"DS:total:GAUGE:7200:0:U " .
"RRA:MIN:0.5:24:365 " .
"RRA:MAX:0.5:24:365 " .
"RRA:AVERAGE:0.5:1:24 " . # 24 samples for daily average
"RRA:AVERAGE:0.5:24:168 " . # weekly average
"RRA:AVERAGE:0.5:24:720 " . # monthly average
"RRA:AVERAGE:0.5:24:8760 " . # yearly average
"RRA:LAST:0.5:1:72";
system($execstr);
}
The update code is:
sub updateTrackedItem
{
my $rrdname = @_[0];
my $rrdfile = $RRDdir . "/" . $rrdname . "/total.rrd";
if (! -e "$rrdfile") {
warn "Update failed! total.rrd file for '$rrdname' doesn't exist!\n";
return;
}
my ($t, $e, $l, $m, $h, $u, $tt) = collectBugTotals($rrdname, "getTotal");
my $exestr = "rrdtool update $rrdfile N:$t:$e:$l:$m:$h:$u:$tt";
print "Updating with exestr:$exestr\n";
system($exestr);
...
A fetch on the first RRD works fine showing the data I put in. A fetch on the second one shows NaNs. I can run updates manually on either attempting to put values in; in each case there is no error and a 'rrd tool last <name>' shows they were updated. But a fetch on the second RRD always shows NaNs for values.
The only difference I can see is the (now) timestamp for creation.
An 'rrd info' on the second shows it has 'unknown_sec' values equivalent to an offset from the lastupdate value to be a consolidated timestamp in the ds part (in the first that is 0), and it has 'unknown_datapoints' values in a number of the
rra[].cdp_prep[*] structures. Those are zeros in the first rrd.
Can someone tell me what's going on?
Thanks,
David N. Beck
David.Beck at travelocity.com
QA Automation Team
682-605-2786
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list